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

Migrate from v1 to v3

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.

3. Removed Endpoints

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 Tokens v1Get all tokens v3This endpoint is used to get all tokens in a contract and can be further filtered based on the tokenTypeId
Create company/minter wallets v1Replaced by the mass minting feature.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.

4. New Endpoints

EndpointsDescription
Get supported chains v3This endpoint is used to retrieve the supported chains for the NFT API.
Check Contract Status v3This endpoint is used to check the status of a contract creation request.
Check Token-type Status v3This endpoint is used to check the status of a token-type creation request.
Check Mint Status v3This endpoint is used to check the status of a token mint request.
Get All Tokens v3This endpoint is used to fetch all tokens under a contract.
Get All Company Wallets v3This endpoint fetches all of your company minter wallets.
Update contract owner v3This endpoint updates the owner of an NFT contract. The owner has admin rights to the contract.
Update contract royalty v3This 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)
Dynamic NFTsSet 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.

Endpoints: v1 → v3 mapping

Deprecated EndpointsWhat to use instead?Differences
Get All Contracts v1Get All Contract v3- Path URL changed from /api/minter/contracts to /api/v3/erc1155/contracts
- onChainStatus param in response body (indicates contract on-chain status) which can have possible values:
PENDING, SUCCEEDED, FAILED.
- confirmed param removed from response
- result.id param in response body used to track contract creation request
- Changes in response body (see the API reference for comparison)
Create Contract v1Create Contract v3- Path URL changed from /api/minter/contracts to /api/v3/erc1155/contracts/deployments
- 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
- Changes in response body (see the API reference for comparison)
Get Contract by chain and contract address v1Get Contract by chain and contract address v3- Path URL changed from /api/contracts/{secretType}/{contractAddress} to /api/v3/erc1155/contracts/{chain}/{contractAddress}
- onChainStatus param in response body (indicates contract on-chain status) which can have possible values:
PENDING, SUCCEEDED, FAILED.
- metadata object in response which includes contract metadata
- uri replaced with contractUri in response (URI of contract metadata)
- contractId, version, companyId, childChainManager, and additionalOwners removed from response
- Changes in response body (see the API reference for comparison)
Delete Contract v1Delete Contract v3- Path URL changed from /api/minter/contracts/{contractId} to /api/v3/erc1155/contracts/{chain}/{contractAddress}
- {contractId} removed from the path
- {chain} and {contractAddress} added in the path
Get Contract Metadata v1Get Contract Metadata v3- Path URL changed from /api/contracts/{contractId}/metadata to /api/v3/erc1155/contracts/{chain}/{contractAddress}/metadata
- {contractId} removed from the path
- {chain} and {contractAddress} added in the path
- Changes in response body (see the API reference for comparison)
Update Contract Metadata v1Update Contract Metadata v3- Path URL changed from /api/contracts/{contractId}/metadata to /api/v3/erc1155/contracts/{chain}/{contractAddress}/metadata
- {contractId} removed from the path
- {chain} and {contractAddress} added in the path
- Changes in response body (see the API reference for comparison)
Get All Token-types v1Get All Token-types v3- Path URL changed from /api/minter/contracts/{contractId}/token-types to /api/v3/erc1155/contracts/{chain}/{contractAddress}/token-types
- {contractId} removed from the path
- {chain} 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.
- Changes in response body (see the API reference for comparison)
Create Token-type v1Create Token-type v3- Path URL changed from /api/minter/contracts/{contractId}/token-types to /api/v3/erc1155/token-types/creations
- {contractId} removed from the path
- creations array in request body which can include multiple token-types
- chain and contractAddress added in the request body
- result.id param in response body used to track token-type creation request
- maxSupply is now an attribute instead of a dedicated property in response
- Changes in response body (see the API reference for comparison)
Get Specific Token-type v1Get Specific Token-type v3- 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)
Delete Token-type v1Delete Token-type v3- Path URL changed from /api/minter/contracts/{contractId}/token-types/{typeId} to /api/v3/erc1155/contracts/{chain}/{contractAddress}/token-types/{tokenTypeId}
- {contractId} removed from the path
- {chain} and {contractAddress} added in the path
- {typeId} replaced with {tokenTypeId} in path
Get Token-type Metadata v1Get Token-type Metadata v3- 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)
Update Token-type Metadata v1Update Token-type Metadata v3- 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)
Mint Tokens v1Mint Tokens v3- 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)
Get Specific Token Details v1Get Specific Token Details v3- 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
- 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 }
- contract object in response which includes the contract details
- metadata object in response which includes NFT metadata and attributes
- Changes in response body (see the API reference for comparison)
Get Token Metadata v1Get Token Metadata v3- 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)
Create Company Wallet v1Removed- Endpoint removed in v3 (replaced with the mass minting feature)
Get Company Wallets by chain v1Get Company Wallets by chain v3- Path URL changed from /api/wallets/{chain} to /api/v3/wallets/{chain}
Delete Company Wallet v1Delete Company Wallet v3- Path URL changed from /api/wallets/{chain}/{address} to /api/v3/wallets/{chain}/{address}
Upload Media File v1Upload Media File v3- Path URL changed from /api/media to /api/v3/media
Upload Image v1Upload Image v3- Path URL changed from /api/images to /api/v3/images

Testing

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