> For the complete documentation index, see [llms.txt](https://elacitylabs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://elacitylabs.gitbook.io/docs/api/reference/nft-items.md).

# NFT Items

NFT token search, filtering, and metadata

## POST /nftitems/increaseViews

> Increment view count for an NFT

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"NFT Items","description":"NFT token search, filtering, and metadata"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"paths":{"/nftitems/increaseViews":{"post":{"tags":["NFT Items"],"summary":"Increment view count for an NFT","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contractAddress","tokenID"],"properties":{"contractAddress":{"$ref":"#/components/schemas/Address"},"tokenID":{"type":"string"}}}}}},"responses":{"200":{"description":"Views incremented"}}}}},"components":{"schemas":{"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}}}
```

## Search and filter NFT tokens

> Complex aggregation-based search supporting filters by collection, category, status, price range, traits, and more.

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"NFT Items","description":"NFT token search, filtering, and metadata"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"paths":{"/nftitems/fetchTokens":{"post":{"tags":["NFT Items"],"summary":"Search and filter NFT tokens","description":"Complex aggregation-based search supporting filters by collection, category, status, price range, traits, and more.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Filter type (single, all, etc.)"},"collections":{"type":"array","items":{"$ref":"#/components/schemas/Address"}},"category":{"type":"array","items":{"type":"string"}},"sortby":{"type":"string","enum":["price","listedAt","createdAt","lastSalePrice","viewed","liked","saleEndsAt","oldest"]},"filterby":{"type":"array","items":{"type":"string","enum":["buynow","hasBids","hasOffers","onAuction","721","1155"]}},"address":{"$ref":"#/components/schemas/Address"},"from":{"type":"integer"},"count":{"type":"integer"},"minPrice":{"type":"number"},"maxPrice":{"type":"number"},"traits":{"type":"object"}}}}}},"responses":{"200":{"description":"Token search results","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"tokens":{"type":"array","items":{"$ref":"#/components/schemas/NFTItem"}},"total":{"type":"integer"}}}}}}}}}}}},"components":{"schemas":{"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"NFTItem":{"type":"object","properties":{"contractAddress":{"$ref":"#/components/schemas/Address"},"tokenID":{"type":"string"},"tokenURI":{"type":"string"},"tokenType":{"type":"integer","enum":[721,1155]},"name":{"type":"string"},"imageURL":{"type":"string"},"thumbnailPath":{"type":"string"},"supply":{"type":"integer"},"price":{"type":"number"},"paymentToken":{"$ref":"#/components/schemas/Address"},"priceInUSD":{"type":"number"},"liked":{"type":"integer"},"isAppropriate":{"type":"boolean"},"owner":{"$ref":"#/components/schemas/Address"},"creator":{"$ref":"#/components/schemas/Address"}}}}}}
```

## POST /nftitems/fetchBundles

> Fetch bundles

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"NFT Items","description":"NFT token search, filtering, and metadata"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"paths":{"/nftitems/fetchBundles":{"post":{"tags":["NFT Items"],"summary":"Fetch bundles","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Bundles list"}}}}}}
```

## GET /nftitems/randomTokens

> Get random NFT tokens

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"NFT Items","description":"NFT token search, filtering, and metadata"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"paths":{"/nftitems/randomTokens":{"get":{"tags":["NFT Items"],"summary":"Get random NFT tokens","responses":{"200":{"description":"Random tokens","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/NFTItem"}}}}}}}}}}},"components":{"schemas":{"NFTItem":{"type":"object","properties":{"contractAddress":{"$ref":"#/components/schemas/Address"},"tokenID":{"type":"string"},"tokenURI":{"type":"string"},"tokenType":{"type":"integer","enum":[721,1155]},"name":{"type":"string"},"imageURL":{"type":"string"},"thumbnailPath":{"type":"string"},"supply":{"type":"integer"},"price":{"type":"number"},"paymentToken":{"$ref":"#/components/schemas/Address"},"priceInUSD":{"type":"number"},"liked":{"type":"integer"},"isAppropriate":{"type":"boolean"},"owner":{"$ref":"#/components/schemas/Address"},"creator":{"$ref":"#/components/schemas/Address"}}},"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}}}
```

## GET /nftitems/royalties/{contractAddress}/{tokenID}

> Get royalty information for a token

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"NFT Items","description":"NFT token search, filtering, and metadata"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"paths":{"/nftitems/royalties/{contractAddress}/{tokenID}":{"get":{"tags":["NFT Items"],"summary":"Get royalty information for a token","parameters":[{"name":"contractAddress","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}},{"name":"tokenID","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Royalty info","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"royalty":{"type":"number"},"feeRecipient":{"$ref":"#/components/schemas/Address"}}}}}}}}}}}},"components":{"schemas":{"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}}}
```

## POST /nftitems/transfer721History

> Get ERC-721 transfer history

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"NFT Items","description":"NFT token search, filtering, and metadata"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"paths":{"/nftitems/transfer721History":{"post":{"tags":["NFT Items"],"summary":"Get ERC-721 transfer history","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["address","tokenID"],"properties":{"address":{"$ref":"#/components/schemas/Address"},"tokenID":{"type":"string"}}}}}},"responses":{"200":{"description":"Transfer history"}}}}},"components":{"schemas":{"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}}}
```

## POST /nftitems/transfer1155History

> Get ERC-1155 transfer history

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"NFT Items","description":"NFT token search, filtering, and metadata"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"paths":{"/nftitems/transfer1155History":{"post":{"tags":["NFT Items"],"summary":"Get ERC-1155 transfer history","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["address","tokenID"],"properties":{"address":{"$ref":"#/components/schemas/Address"},"tokenID":{"type":"string"}}}}}},"responses":{"200":{"description":"Transfer history"}}}}},"components":{"schemas":{"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}}}
```

## POST /nftitems/setIsAppropriate

> Mark an NFT as appropriate/inappropriate

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"NFT Items","description":"NFT token search, filtering, and metadata"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}},"schemas":{"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}},"paths":{"/nftitems/setIsAppropriate":{"post":{"tags":["NFT Items"],"summary":"Mark an NFT as appropriate/inappropriate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contractAddress","tokenID","isAppropriate"],"properties":{"contractAddress":{"$ref":"#/components/schemas/Address"},"tokenID":{"type":"string"},"isAppropriate":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Updated"}}}}}}
```

## POST /nftitems/tradeHistory

> Get trade history for an NFT

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"NFT Items","description":"NFT token search, filtering, and metadata"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"paths":{"/nftitems/tradeHistory":{"post":{"tags":["NFT Items"],"summary":"Get trade history for an NFT","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contractAddress","tokenID"],"properties":{"contractAddress":{"$ref":"#/components/schemas/Address"},"tokenID":{"type":"string"}}}}}},"responses":{"200":{"description":"Trade history","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/TradeHistory"}}}}}}}}}}},"components":{"schemas":{"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"TradeHistory":{"type":"object","properties":{"contractAddress":{"$ref":"#/components/schemas/Address"},"tokenID":{"type":"string"},"from":{"$ref":"#/components/schemas/Address"},"to":{"$ref":"#/components/schemas/Address"},"price":{"type":"number"},"paymentToken":{"$ref":"#/components/schemas/Address"},"priceInUSD":{"type":"number"},"value":{"type":"number"},"createdAt":{"type":"string","format":"date-time"}}}}}}
```

## POST /nftitems/getSingleItemDetails

> Get detailed info for a single NFT

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"NFT Items","description":"NFT token search, filtering, and metadata"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"paths":{"/nftitems/getSingleItemDetails":{"post":{"tags":["NFT Items"],"summary":"Get detailed info for a single NFT","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contractAddress","tokenID"],"properties":{"contractAddress":{"$ref":"#/components/schemas/Address"},"tokenID":{"type":"string"}}}}}},"responses":{"200":{"description":"Item details","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"$ref":"#/components/schemas/NFTItem"}}}}}}}}}},"components":{"schemas":{"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"NFTItem":{"type":"object","properties":{"contractAddress":{"$ref":"#/components/schemas/Address"},"tokenID":{"type":"string"},"tokenURI":{"type":"string"},"tokenType":{"type":"integer","enum":[721,1155]},"name":{"type":"string"},"imageURL":{"type":"string"},"thumbnailPath":{"type":"string"},"supply":{"type":"integer"},"price":{"type":"number"},"paymentToken":{"$ref":"#/components/schemas/Address"},"priceInUSD":{"type":"number"},"liked":{"type":"integer"},"isAppropriate":{"type":"boolean"},"owner":{"$ref":"#/components/schemas/Address"},"creator":{"$ref":"#/components/schemas/Address"}}}}}}
```

## POST /nftitems/minted

> Get minted tokens

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"NFT Items","description":"NFT token search, filtering, and metadata"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"paths":{"/nftitems/minted":{"post":{"tags":["NFT Items"],"summary":"Get minted tokens","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Minted tokens list"}}}}}}
```
