This is a general guidance for migrating from NFT-API v1 to NFT-API v3.
Intro
This guide outlines the migration process from NFT-API v1 to v3, unlocking a realm of new features for creators and collectors alike.
Experience the efficiency of Mass 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.
Configure royalties, update contract owner, and much more with the NFT v3!
Ensure a future-proof integration with our latest and feature-rich NFT-API v3.
Migrating to NFT API v3
1. Base URL Change
The base URL for NFT v3 will become:
https://token-api.venly.io
https://token-api-sandbox.venly.io
2. Replace secretType with chain
Replace secretType with chain everywhere, specifically in the path variable and request bodies.
2.1 Path Params
Replace {secretType} with {chain} in the path of all the endpoints where applicable.
For example, the endpoint to get a specific token details:
Before (v1):
GET /api/contracts/{secretType}/{contractAddress}/tokens/{tokenId}
Now (v3):
GET /api/v3/erc1155/contracts/{chain}/{contractAddress}/tokens/{tokenId}
2.2 Response Bodies
In the response bodies, secretType will be replaced by the chain parameter.
Mass minting allows you to mint a huge number of NFTs simultaneously. You don't need to wait for the entire minting process to be completed before getting your response.
This endpoint adds or updates the royalty information for an NFT contract. You can specify the royalty recipient's wallet address and the royalty percentage. (This endpoint can only be used on NFT contracts created with NFT v3)
Set of endpoints that allow you to update the attributes, properties, and animation URLs of an already minted NFT. These changes apply on the token level.
Path URL changed from /api/minter/contracts/{contractId}/token-types/{tokenTypeId} to /api/v3/erc1155/contracts/{chain}/{contractAddress}/token-types/{tokenTypeId}
{contractId} removed from the path
{chain} and {contractAddress} added in the path
onChainStatus param in response body (indicates token-type creation status) which can have possible values:
*PENDING, SUCCEEDED, FAILED**.
maxSupply is now an attribute instead of a dedicated property in response
Changes in response body (see the API reference for comparison)
Path URL changed from /api/minter/contracts/{contractId}/token-types/{typeId} to /api/v3/erc1155/contracts/{chain}/{contractAddress}/token-types/{tokenTypeId}
Path URL changed from /api/contracts/{contractId}/token-types/{typeId}/metadata to /api/v3/erc1155/contracts/{chain}/{contractAddress}/token-types/{tokenTypeId}/metadata
{contractId} removed from the path
{chain} and {contractAddress} added in the path
{typeId} replaced with {tokenTypeId} in path
maxSupply is now an attribute instead of a dedicated property in response
Changes in response body (see the API reference for comparison)
Path URL changed from /api/contracts/{contractId}/token-types/{typeId}/metadata to /api/v3/erc1155/contracts/{chain}/{contractAddress}/token-types/{tokenTypeId}/metadata
{contractId} removed from the path
{chain} and {contractAddress} added in the path
{typeId} replaced with {tokenTypeId} in path
Changes in response body (see the API reference for comparison)
Path URL changed from /api/minter/contracts/{contractId}/types/{typeId}/tokens to /api/v3/erc1155/tokens/mints
-{contractId} and {typeId} removed from the path
chain, contractAddress, and tokenTypeId added in the request body
result.mints.id param in response body used to track token mint request
Changes in response body (see the API reference for comparison)
Path URL changed from /api/contracts/{secretType}/{contractAddress}/tokens/{tokenId} to /api/v3/erc1155/contracts/{chain}/{contractAddress}/tokens/{tokenId}
{secretType} replaced with {chain} in path
mints object in response body indicating the token mint status
Path URL changed from /api/contracts/{contractId}/tokens/{id}/metadata to /api/v3/erc1155/contracts/{chain}/{contractAddress}/tokens/{tokenId}/metadata
{contractId} and {id}removed from the path
{chain}, {contractAddress}, and {tokenId} added in the path
Changes in response body (see the API reference for comparison)