Retrieve Token-type (NFT template)

This API endpoint allows users to fetch detailed information about a specific NFT token type, also referred to as an NFT template, from one of the NFT contracts. Additionally, you can also retrieve all NFT token types associated with an NFT contract.

1. Get NFT template (token-type) by tokenTypeId

Request Endpoint: reference

HTTP

GET /api/v2/contracts/{secretType}/{contractAddress}/token-types/{tokenTypeId}
Parameter
Param Type
Description
Data Type
Mandatory

{secretType}

Path

The blockchain of the contract.

String

{contractAddress}

Path

The contract address whose token-type you want to fetch.

String

{tokenTypeId}

Path

This is the id of the token-type.

String

Example Request:

HTTP

GET /api/v2/contracts/MATIC/0x30d6cff9cb268c59c75a94755b2c60e118d65657/token-types/1

Response Body:

JSON

{
    "success": true,
    "result": {
        "secretType": "MATIC",
        "contractAddress": "0x30d6cff9cb268c59c75a94755b2c60e118d65657",
        "tokenTypeId": 1,
        "onChainStatus": "SUCCEEDED",
        "metadata": {
            "name": "My first NFT",
            "description": "Quantum",
            "image": "https://storage-qa.quantum.io/applications/1f64ded9-2a05-4824-b682-661023359357/StickFigureHi.png",
            "imagePreview": "https://storage-qa.quantum.io/applications/1f64ded9-2a05-4824-b682-661023359357/StickFigureHi.png",
            "imageThumbnail": "https://storage-qa.quantum.io/applications/1f64ded9-2a05-4824-b682-661023359357/StickFigureHi.png",
            "animationUrls": [],
            "attributes": [
                {
                    "type": "system",
                    "name": "tokenTypeId",
                    "value": "1",
                    "traitType": "Token Type ID",
                    "trait_type": "Token Type ID"
                }
            ],
            "contract": {
                "address": "0x30d6cff9cb268c59c75a94755b2c60e118d65657",
                "name": "My first collection",
                "symbol": "MYFICO",
                "image": "https://pbs.twimg.com/profile_images/1669300450649157635/4xg-wsbK_400x400.jpg",
                "imageUrl": "https://pbs.twimg.com/profile_images/1669300450649157635/4xg-wsbK_400x400.jpg",
                "image_url": "https://pbs.twimg.com/profile_images/1669300450649157635/4xg-wsbK_400x400.jpg",
                "description": "Sample description",
                "externalLink": "www.quantum.io",
                "external_link": "www.quantum.io",
                "externalUrl": "www.quantum.io",
                "external_url": "www.quantum.io",
                "media": [],
                "type": "ERC_1155"
            },
            "fungible": false
        }
    }
}

2. Get all NFT templates (token-types)

Request Endpoint: reference

HTTP

GET /api/v2/contracts/{secretType}/{contractAddress}/token-types
Parameter
Param Type
Description
Data Type
Mandatory

{secretType}

Path

The blockchain of the contract.

String

{contractAddress}

Path

The contract address whose token-types you want to fetch

String

Example Request:

HTTP

GET /api/v2/contracts/MATIC/0x30d6cff9cb268c59c75a94755b2c60e118d65657/token-types

Response Body:

JSON

{
    "success": true,
    "result": [
        {
            "secretType": "MATIC",
            "contractAddress": "0x30d6cff9cb268c59c75a94755b2c60e118d65657",
            "tokenTypeId": 1,
            "name": "My first NFT",
            "image": "https://storage-qa.quantum.io/applications/1f64ded9-2a05-4824-b682-661023359357/StickFigureHi.png",
            "imagePreview": "https://storage-qa.quantum.io/applications/1f64ded9-2a05-4824-b682-661023359357/StickFigureHi.png",
            "imageThumbnail": "https://storage-qa.quantum.io/applications/1f64ded9-2a05-4824-b682-661023359357/StickFigureHi.png",
            "fungible": false,
            "onChainStatus": "SUCCEEDED"
        }
    ]
}

Last updated