> ## Documentation Index
> Fetch the complete documentation index at: https://catchbackcards.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Token metadata (EVM)

> **No key.** A token's standard NFT metadata: the token's `tokenURI`. Wallets and marketplaces read it from anywhere. It never includes a price or value of any kind. Cached for a few minutes (`Cache-Control: public, s-maxage=300`). A token whose mint hasn't been sent yet answers `404`. A trailing `.json` on the last segment is accepted.



## OpenAPI

````yaml /partner-api/v2/openapi.yaml get /api/partner-nfts/metadata/{chainId}/{tokenId}
openapi: 3.1.0
info:
  title: CatchBack Partner API v2 (wallets & NFTs)
  version: 2.0.0
  summary: >-
    Sell CatchBack packs to your users' own web3 wallets, and let the NFT holder
    sell back or ship.
  description: >-
    The official contract for Partner API v2. Generate clients from this file.


    Each customer pays for their own pack (USDC on Base or Solana, through a
    Unifold Payment

    Intent), and each pulled item is minted as an NFT to the customer's wallet.
    Whoever holds the

    NFT can trade it, sell it back for USDC, or have the physical item shipped.
    Selling back and

    shipping both burn the NFT. Guides: [Overview](/partner-api/v2/overview).


    - **Auth:** every `/api/partner/v2` request sends your key as a bearer
    token, and every key
      needs the scope `nft:orders`. The public token metadata needs no key.
    - **Your program:** your key is linked to your partner program, which fixes
    the chain your
      NFTs mint on (`mint_chain`) and your collection contract. An order, token, quote or shipment
      from another program answers `404`.
    - **Formats:** JSON, UTF-8. Money is USD as a number in dollars (`25`,
    `9.85`). New fields can be
      added to any response; ignore fields you don't know.
    - **Errors:** bodies are `{ "error": "<message>" }`, and errors your
    integration should act on
      also carry a stable `code` (see `ErrorCode`). Branch on the status and the `code`, never on the
      message text. [Errors](/partner-api/v2/errors).
    - **Idempotency:** `POST /orders`, `POST /shipments`, `POST
    /tokens/{tokenId}/shipment` and
      `POST /keys/rotate` require an `Idempotency-Key`. [Idempotency](/partner-api/v2/idempotency).
    - **Sandbox:** the sandbox runs the same API with simulated payments on a
    public testnet. Its base
      URL is issued on request, with a sandbox key. The operations tagged `Sandbox` exist only there
      and answer `404` in production.
  contact:
    name: CatchBack support
    email: support@catchbackcards.com
servers:
  - url: https://catchbackcards.com
    description: >-
      Production. Every payment is real money. The sandbox base URL is issued on
      request.
security:
  - bearerAuth:
      - nft:orders
tags:
  - name: Packs
    description: The packs you can sell, their odds and every item they can pull.
  - name: Orders
    description: >-
      Buy 1-10 packs for one wallet, follow the order to the mint, and prove the
      pull.
  - name: Tokens
    description: A wallet's tokens and one token's item, holder and sell-back schedule.
  - name: Sell-back
    description: >-
      Quote a sell-back, have the holder burn with it, and follow the USDC
      payout.
  - name: Shipments
    description: >-
      Pay shipping for 1-25 tokens, have the holder burn each one, and track the
      box.
  - name: Webhooks
    description: Register, read, test and remove your webhook URL.
  - name: Webhook events
    description: Signed POSTs we send to your webhook URL.
  - name: Keys
    description: Read, rotate and revoke your API key.
  - name: Revenue
    description: Your monthly revenue-share statement.
  - name: Sandbox
    description: Sandbox-only helpers. Every one answers `404` in production.
  - name: Metadata
    description: Public NFT metadata that wallets and marketplaces read with no key.
paths:
  /api/partner-nfts/metadata/{chainId}/{tokenId}:
    get:
      tags:
        - Metadata
      summary: Token metadata (EVM)
      description: >-
        **No key.** A token's standard NFT metadata: the token's `tokenURI`.
        Wallets and marketplaces read it from anywhere. It never includes a
        price or value of any kind. Cached for a few minutes (`Cache-Control:
        public, s-maxage=300`). A token whose mint hasn't been sent yet answers
        `404`. A trailing `.json` on the last segment is accepted.
      operationId: getEvmTokenMetadata
      parameters:
        - name: chainId
          in: path
          required: true
          description: The numeric chain id of your mint chain.
          schema:
            type: string
            pattern: ^[0-9]{1,12}$
          example: '196'
        - name: tokenId
          in: path
          required: true
          description: The decimal `token_id`.
          schema:
            type: string
            pattern: ^[0-9]{1,78}(\.json)?$
          example: '81264573985362058461377125337283195667'
      responses:
        '200':
          $ref: '#/components/responses/TokenMetadata'
        '404':
          $ref: '#/components/responses/UnknownMetadataToken'
        '503':
          $ref: '#/components/responses/MetadataUnavailable'
      security:
        - {}
components:
  responses:
    TokenMetadata:
      description: The token's metadata.
      headers:
        Cache-Control:
          description: '`public, s-maxage=300, stale-while-revalidate=3600`.'
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TokenMetadata'
          example:
            name: Charizard ex 199/165 (PSA 10)
            description: >-
              A physical collectible held in the CatchBack vault. Burn this
              token to sell it back or have it shipped.
            image: https://...
            external_url: https://catchbackcards.com
            attributes:
              - trait_type: Category
                value: pokemon
              - trait_type: Grade
                value: PSA 10
              - trait_type: Status
                value: Vaulted
    UnknownMetadataToken:
      description: No such token, or its mint hasn't been sent yet.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unknown token
    MetadataUnavailable:
      description: Briefly unavailable; retry shortly.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unavailable
  schemas:
    TokenMetadata:
      type: object
      required:
        - name
        - description
        - image
        - external_url
        - attributes
      properties:
        name:
          type: string
          description: The item's name, with its grade where it has one.
        description:
          type: string
        image:
          type:
            - string
            - 'null'
        external_url:
          type: string
        attributes:
          type: array
          description: >-
            `Category`, `Set`, `Year`, `Number`, `Grade`, `Cert`, `Language`,
            `Brand`, `Size` and `Condition` where the item has them, and
            `Status` (`Vaulted`, or `Redeemed` once burned). Never a price.
          items:
            type: object
            required:
              - trait_type
              - value
            properties:
              trait_type:
                type: string
              value:
                type: string
    Error:
      type: object
      required:
        - error
      description: >-
        Every error body. `code` is stable where you might branch on it; some
        errors add the fields below.
      properties:
        error:
          type: string
          description: >-
            For people. The text can change, so branch on the status and the
            `code`.
        code:
          description: >-
            Machine-readable, where you might branch on it. New codes can be
            added, so treat an unknown one like a missing one.
          anyOf:
            - $ref: '#/components/schemas/ErrorCode'
            - type: string
        retry_after_seconds:
          type: integer
          description: On `RATE_LIMITED`.
        odds:
          description: >-
            On `BAD_ODDS` when the pack sells other odds: the choices it sells.
            On `ODDS_UNAVAILABLE` from Create an order: the choice asked for.
          oneOf:
            - type: array
              items:
                $ref: '#/components/schemas/Odds'
            - $ref: '#/components/schemas/Odds'
        reason:
          type:
            - string
            - 'null'
          description: On `PACK_UNAVAILABLE`, why the pack can't open.
        status:
          type: string
          description: On `NOT_PULLED`, the order's status.
        token_ids:
          type: array
          items:
            type: string
          description: On a refusal about particular tokens, the token ids it is about.
        quote_id:
          type: string
          description: >-
            On `TOKEN_IN_SHIPMENT` from the one-token endpoint, the shipment
            waiting for the burn.
        fields:
          type: object
          additionalProperties:
            type: string
          description: >-
            On `BAD_ADDRESS` from a shipment or estimate, each bad address field
            and what is wrong with it.
        order_value:
          type: number
          description: On `COVER_NOT_ALLOWED`.
        min_cover:
          type: number
          description: On `COVER_NOT_ALLOWED`.
        max_cover:
          type:
            - number
            - 'null'
          description: On `COVER_NOT_ALLOWED`; null when the items can't be insured.
        amount:
          type: number
          description: On `PRICE_CHANGED`, the current shipping cost.
        successor:
          type: object
          description: On `ALREADY_ROTATED`, the key that replaced this one.
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
          description: On `ALREADY_ROTATED`, when this key stops working.
    ErrorCode:
      type: string
      description: Every `code` v2 returns. Branch on these, never on the message text.
      enum:
        - RATE_LIMITED
        - AUTH_UNAVAILABLE
        - NO_PROGRAM
        - PROGRAM_INACTIVE
        - NOT_AVAILABLE
        - BAD_JSON
        - BAD_IDEMPOTENCY_KEY
        - IDEMPOTENCY_KEY_REUSED
        - BAD_RECIPIENT
        - BAD_PACK
        - BAD_CATEGORY
        - BAD_ODDS
        - BAD_QUANTITY
        - ODDS_UNAVAILABLE
        - BAD_REFUND_ADDRESS
        - PACK_NOT_OFFERED
        - PACK_UNAVAILABLE
        - WALLET_REFUSED
        - WALLET_BLOCKED
        - SCREENING_UNAVAILABLE
        - UNKNOWN_ORDER
        - NOT_PULLED
        - VERIFY_UNAVAILABLE
        - BAD_CURSOR
        - BAD_LIMIT
        - BAD_STATUS
        - BAD_ADDRESS
        - BAD_PARTNER_USER_REF
        - TOO_MANY_WALLETS
        - UNKNOWN_TOKEN
        - BAD_HOLDER
        - NOT_HOLDER
        - CHAIN_UNAVAILABLE
        - TOKEN_NOT_MINTED
        - TOKEN_BURNED
        - TOKEN_NOT_LIVE
        - NO_OFFER
        - PAYOUT_CHAIN_NOT_SUPPORTED
        - PAYOUT_CHAIN_NOT_ENABLED
        - BAD_PAYOUT_ADDRESS
        - USE_SHIPMENT_ENDPOINT
        - BAD_TOKEN_IDS
        - TOKEN_IN_SHIPMENT
        - BAD_COVER
        - COVER_NOT_ALLOWED
        - COVER_UNAVAILABLE
        - BAD_MAX_COST
        - NOT_SHIPPABLE
        - PARTNER_GOODS
        - COUNTRY_NOT_SUPPORTED
        - OVER_CUSTOMS_CAP
        - RATE_UNAVAILABLE
        - PRICE_CHANGED
        - UNKNOWN_SHIPMENT
        - NOT_PAID
        - ALREADY_REDEEMED
        - HOLDER_CHANGED
        - UNKNOWN_QUOTE
        - INVALID_WEBHOOK_URL
        - WEBHOOK_ACCOUNT_CHANGED
        - WEBHOOKS_UNAVAILABLE
        - UNKNOWN_WEBHOOK
        - KEY_ROTATED
        - BAD_PERIOD
        - INVALID_KEY
        - NO_PREVIOUS_KEY
        - ALREADY_ROTATED
        - UNKNOWN_PAYMENT
        - NOT_BURNED
    Odds:
      type: string
      enum:
        - standard
        - hot
        - chill
        - classic
      description: >-
        The odds a pack is opened at, as in our app's picker. Standard, Hot and
        Chill share one value-band ladder and differ only in the chance of each
        band; Classic is the pack's own bands and chances. A pack that sells
        only its own odds sells just `classic`. [Odds](/partner-api/v2/odds).
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: cb_live_<48 hex>
      description: >-
        Your API key (`cb_live_…`), sent as a bearer token, with the scope
        `nft:orders`. Keep it on your servers: never in a browser, app or
        wallet. Use a separate key per environment. A request from a country on
        our sanctions list gets a `403` with `Access denied`, whether or not it
        has a valid key. See [Authentication and
        keys](/partner-api/v2/authentication).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.