> For the complete documentation index, see [llms.txt](https://docs.ghostmarket.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ghostmarket.io/developer-guides/refreshing-metadata.md).

# Refreshing Metadata

GhostMarket indexes and caches NFT metadata, so it can be quickly and efficiently retrieved without requiring multiple accesses of the blockchain RPC nodes.&#x20;

If you update the metadata manually, it may be necessary to force a refresh of our cached metadata.

To do this, use the `refreshMetadata` **API** endpoint, specifying the ***chain***, ***contract*** and ***tokenId*** params as required.

`https://api.ghostmarket.io/api/v2/refreshMetadata`

Request method has to be a **PATCH**, with the following **data**

`data : {chain: "n3", contract: "0xaa4fb927b3fe004e689a278d188689c9f050a8b2", tokenId: "QzAyMzY2"}`

* See the [Blockchain Short Name](#blockchain-short-names) table for the list of supported ***chain*** names.
* The ***tokenId*** is the token id specifying the NFT within the collection (NFT contract)

Example:

```bash
curl -X PATCH 'https://api.ghostmarket.io/api/v2/refreshMetadata' \
-d 'data : {"chain": "n3", "contract": "0xaa4fb927b3fe004e689a278d188689c9f050a8b2", "tokenId": "QzAyMzY2"}'
```

200: Success Response

```json
{ "success": true } // Metadata successfully Updated
```

200: Error Responses

```json
{"error":"Could not find an NFT with token ID XXXXXX"} // ID not existing on server
{"error":"NFT was queued in the last 24h, please wait."} // Metadata refresh is already pending
{"error":"Unsupported value for 'chain' parameter."} // Non-Existent chain name passed
{"error":"Could not find a contract with hash 0xyyyyyyyyyyyyyyy"} //Non-existent contract address passed
```
