Skip to main content

Refresh NFTs

Overview

The NFT Metadata Refresh API, designed to simplify the process of updating and reindexing NFT metadata. In the fast-paced world of Web3, collection creators often face challenges in maintaining accurate and up-to-date information for their NFTs. Our API streamlines this process, allowing creators to effortlessly index their metadata on our NFTs indexing system, ensuring their collections remain relevant and correctly represented.

Synchronous Refreshing

By using this api, users have to wait until the API complete the refreshing process, tokenIds list can be specified in the request body as well as the maxWait duration in milliseconds (the maximum amount of wait time this call can accept). Without its present, the API treat it as server default time out 10 seconds.

In the response, there are two lists, successes and failures tokenIds, failure reasons can vary and not be exposed. If an NFT keeps fail for a long time, you better should contact to developer support portal.

You can verify the successes list by calling NFT details API

Example:

curl --location 'https://api-gateway.skymavis.com/skynet/ronin/web3/v2/collections/0x814a9c959a3ef6ca44b5e2349e3bba9845393947/tokens/metadata/refresh_sync' \
--header 'Accept: application/json' \
--header 'X-API-KEY: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"tokenIds": ["2010025", "2010026"]
}'

Response:

{
"result": {
"successes": [
"2010025",
"2010026"
],
"failures": []
}
}

Asynchronous Refreshing

By using this api, users don't have to wait until the API complete the refreshing process. The API will return immediately after putting tokenIds to the background queue successfully, results of refreshing operation are not notified in any channel. You should call the NFT details API to verify refresh results.

Example:

curl --location 'https://api-gateway.skymavis.com/skynet/ronin/web3/v2/collections/0x814a9c959a3ef6ca44b5e2349e3bba9845393947/tokens/metadata/refresh_async' \
--header 'Accept: application/json' \
--header 'X-API-KEY: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"tokenIds": ["2010025", "2010026"]
}'

Response:

{
"result": "ok"
}

Notes

  • A submitted NFT (identified by contractAddress and tokenId) can be refreshed maximum only once in five minutes window. Every attempt to refresh the same NFT more than that rate will be ignored.