POST /metadata/nft

Changed on

Gets the CIP25 metadata for given <policy, asset_name> pairs

Note: policy IDs and asset names MUST be in hex strings. Do not use UTF8 asset names.

Note: This endpoint returns the NFT metadata as a CBOR object and NOT JSON. You may expect a JSON object, but actually Cardano has no concept of on-chain JSON. In fact, on-chain JSON is not even possible! Instead, Cardano stores metadata as CBOR which can then be converted to JSON The conversion of CBOR to JSON is project-dependent, and so Carp instead returns the raw cbor It's up to you to choose how you want to do the JSON conversion. The common case is handled inside the Carp client library.

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /metadata/nft
  • Auth
    none required

Request body

assetsobject required

Example request

{
  "assets": {
    "b863bc7369f46136ac1048adb2fa7dae3af944c3bbb2be2f216a8d4f": [
      "42657272794e617679"
    ]
  }
}

Response

cip25object required

Example response

{
  "cip25": {
    "b863bc7369f46136ac1048adb2fa7dae3af944c3bbb2be2f216a8d4f": {
      "42657272794e617679": "a365636f6c6f72672330303030383065696d616765783a697066733a2f2f697066732f516d534b593167317a5375506b3536635869324b38524e766961526b44485633505a756a7474663755676b343379646e616d656a4265727279204e617679"
    }
  }
}

Changes

    • breaking

      added the pattern [0-9a-fA-F]{0,64} to the request property //

    • info

      added the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      endpoint added