GhostMarket
  • Welcome
    • Quick Navigation
  • User Guides
    • Getting Started
      • NFTs Explained
      • Supported Blockchains
      • Supported Wallets
      • Connecting Wallets
      • Editing User Profiles
      • Editing Collection Profiles
      • Viewing Owned NFTs
      • Profile Verification
      • Collection Verification
      • Enabling Email Notifications
      • Platform Fees
    • Creating & Managing NFTs
      • Creating NFTs
      • Burning NFTs
      • Transferring NFTs
    • Buying & Selling NFTs
      • Browsing NFTs
      • Buying NFTs
      • Selling NFTs
      • Viewing Site Activity
      • Listing Types
    • Platform Features & Tools
      • Bulk Buying
      • Full DEX Swap Support
      • EVM Swap + Buy
      • Favorites
      • Gas Tracker
      • Instant Sell
      • NFT Explorer
      • Self-Minting Platform
      • Sweep Mode
    • GhostMarket Incentives
      • GFUND
      • Staking Incentives
      • Trading Incentives
  • Developer Guides
    • Accessing NFT Data
    • API
    • Blockchain Short Names
    • Configuring Royalties
    • Metadata Specification
    • Minting Tokens
      • EVM NFT Creation
      • Neo N3 NFT Creation
      • Phantasma NFT Creation
    • Neo N3 NFT Contract Template
    • Refreshing Metadata
    • SDK
    • Storing Metadata - IPFS
  • Smart Contracts
    • Trading contracts
    • NFT contracts
    • Fungible Token contracts
    • Royalties contracts
    • Incentives contracts
    • Staking contracts
    • Vesting contract
    • Liquidity Provider Staking contracts
    • Proxy Contracts
    • Wrapper Contracts
    • Audits
  • GhostMarket Token (GM)
  • Roadmap
  • Media Kit
  • Social Media Links
    • 💬 Discord
    • 💬 Telegram
    • 📣 X (Twitter)
    • 📷 Instagram
    • 📖 Medium
    • 🪙CoinMarketCap
    • 🪙CoinGecko
Powered by GitBook
On this page
  1. Developer Guides

Refreshing Metadata

If you update NFT metadata, this API endpoint triggers an update of the GhostMarket metadata database.

PreviousNeo N3 NFT Contract TemplateNextSDK

Last updated 1 year ago

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

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 table for the list of supported chain names.

  • The tokenId is the token id specifying the NFT within the collection (NFT contract)

Example:

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

200: Success Response

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

200: Error Responses

{"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

Blockchain Short Name