# 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
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ghostmarket.io/developer-guides/refreshing-metadata.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
