These docs are for v1.0. Click to read the latest docs for v3.0.

Migration Guide for NFT-API

This is a general guidance for migrating from NFT-API v1 to NFT-API v2.

Intro

This guide outlines the seamless transition from NFT-API v1 to v2, unlocking a realm of new features for creators and collectors alike.

Experience the efficiency of Flash Minting, eliminating timeouts and connection losses during multiple NFT mints. Dive into the dynamic realm of Dynamic NFTs, allowing personalized updates to NFT metadata for a more interactive experience. Stay in the loop with Webhooks, receiving real-time notifications for successful or failed NFT mints.

Join us in embracing these advancements, leaving behind the deprecated NFT-API v1, and ensuring a future-proof integration with our latest and feature-rich NFT-API v2.

Why Migrate?

1. Flash Minting

NFT-API v2 introduces the highly anticipated Flash Minting feature, enabling customers to mint multiple NFTs simultaneously. This enhancement eliminates the risk of timeouts or lost connections due to prolonged processing times or fluctuating gas fees. Flash Minting ensures a smoother and more efficient NFT minting experience.

2. Dynamic NFTs

With NFT-API v2, customers can now enjoy Dynamic NFTs, allowing them to update NFT metadata. This feature empowers creators and collectors to engage with digital assets more dynamically and personally. The dynamic nature of these NFTs introduces a level of interactivity and uniqueness, setting them apart from traditional static NFTs.

3. Webhooks

NFT-API v2 introduces Webhooks, enabling customers to register their webhook endpoints and receive notifications for successful or failed NFT mints. This feature enhances real-time communication and provides better transparency into the minting process.

Deprecated Endpoints (v1)

Deprecated EndpointsWhat to use instead?Differences
Get All Contracts v1Get All Contract v2- Path URL changed
- onChainStatus param in response body (indicates contract on-chain status) which can have possible values:
PENDING, SUCCEEDED, FAILED.
Create Contract v1Create Contract v2- Path URL changed
- result.id param in response body used to track contract creation request
- contractUri param which is the URI of contract metadata in the response body
Get Contract by chain and contract address v1Get Contract by chain and contract address v2- Path URL changed
- onChainStatus param in response body (indicates contract on-chain status) which can have possible values:
PENDING, SUCCEEDED, FAILED.
Delete Contract v1Delete Contract v2- Path URL changed
- {contractId} removed from the path
- {secretType} and {contractAddress} added in the path
Get Contract Metadata v1Get Contract Metadata v2- Path URL changed
- {contractId} removed from the path
- {secretType} and {contractAddress} added in the path
Update Contract Metadata v1Update Contract Metadata v2
Get All Token-types v1Get All Token-types v2- Path URL changed
- {contractId} removed from the path
- {secretType} and {contractAddress} added in the path
- onChainStatus param in response body (indicates token-type on-chain status) which can have possible values:
PENDING, SUCCEEDED, FAILED.
Create Token-type v1Create Token-type v2- Path URL changed
- {contractId} removed from the path
- Request body passed as an array
- secretType and contractAddress added in the request body
- result.id param in response body used to track token-type creation request
Get Specific Token-type v1Get Specific Token-type v2- Path URL changed
- {contractId} removed from the path
- {secretType} and {contractAddress} added in the path
- onChainStatus param in response body (indicates token-type creation status) which can have possible values:
PENDING, SUCCEEDED, FAILED.
Delete Token-type v1Delete Token-type v2- Path URL changed
- {contractId} removed from the path
- {secretType} and {contractAddress} added in the path
Get Token-type Metadata v1Get Token-type Metadata v2- Path URL changed
- {contractId} removed from the path
- {secretType} and {contractAddress} added in the path
Update Token-type Metadata v1Update Token-type Metadata v2- Path URL changed
- {contractId} removed from the path
- {secretType} and {contractAddress} added in the path
-
Mint Tokens v1Mint Tokens v2- Path URL changed
-{contractId} and {typeId} removed from the path
- secretType, contractAddress, and tokenTypeId added in the request body
- result.mints.id param in response body used to track token mint request
Get Specific Token Details v1Get Specific Token Details v2- Path URL changed
- mints object in response body indicating the token mint status
- For fungible tokens (can be multiple tokens):
"mints": { "pending": 1, "succeeded": 3, "failed": 1 }
- For non-fungible tokens (only one token):
"mints": { "pending": 0, "succeeded": 1, "failed": 0 }
Get Token Metadata v1Get Token Metadata v2- Path URL changed
- {contractId} removed from the path
- {secretType} and {contractAddress} added in the path
Create Company Wallet v1Create Company Wallet v2- Path URL changed
Get Company Wallets by chain v1Get Company Wallets by chain v2- Path URL changed
Delete Company Wallet v1Delete Company Wallet v2- Path URL changed
Upload Media File v1Upload Media File v2- Path URL changed
Upload Image v1Upload Image v2- Path URL changed

New Endpoints (v2)

EndpointsDescription
Check Contract Status v2This endpoint is used to check the status of a contract creation request.
Check Token-type Status v2This endpoint is used to check the status of a token-type creation request.
Check Mint Status v2This endpoint is used to check the status of a token mint request.
Get All Tokens v2This endpoint is used to fetch all tokens under a contract.
Get All Company Wallets v2This endpoint fetches all of your company minter wallets.

Removed Endpoints in v2

EndpointsWhat to use instead?Description
Get User's Tokens v1Get Tokens by Chain and Wallet AddressYou can use the alternate endpoint that fetches a user's tokens by blockchain, wallet address, and contract address.
Get fungible and non-fungible TokensGet all tokens v2This endpoint is used to get all tokens in a contract and can be further filtered based on the tokenTypeId

Testing

Thoroughly test your integration with NFT-API v2 in a sandbox environment to identify and address any potential issues before deploying to production.