💸 Passionate for NFTs? We can help you to build them!
Overview
Managing NFTs is a process of incorporating NFTs into a particular platform. This usually includes minting NFTs, creating smart contracts, user wallets, transferring and querying for ownership.
Overall Process
Step 1: Mint Your NFT using an API call
1.1 Create an Ownerfy User ID
Before minting an NFTs, you must create a user ID by making an API call using the POST/https://staging.ownerfy.io/api/v1/user/create
endpoint.
You need to provide a request as follows:
curl --request POST \
--url https://staging.ownerfy.io/api/v1/user/create \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '
{
"email": "string",
"phone_number": "string",
"username": "string"
}
If it is successful, you will receive the 200 code response with an Ownerfy User ID:
{
"publicAddress": "0x6984902d0f512445b17cfb76f07d2f53a23d1b68",
"ownerfyUserId": "SDv1QsnsZbLbDIg82egE"
}
1.2 Create a Smart Contract
Develop a smart contract before NFT minting. Read this guide as your reference.
1.3 Mint an NFT
Mint an NFT by calling the API POST/https://staging.ownerfy.io/api/v1/nft/create
endpoint.
Your request body must include the parameters as defined below.
Parameter | Description |
---|---|
contract | It represents your smart contract ID. Leave blank to mint on your default contract. |
nfts | An array contains the NFT details which you want to mint. |
name | The parameter describes the NFT title or name. |
description | A parameter that serves as the NFT description. |
image | The URL of NFT's image, e.g., the URL can be based on the firebase storage. |
You need to provide a request as follows:
curl --request POST \
--url https://staging.ownerfy.io/api/v1/nft/create \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '
{
"contract": "string",
"nfts": [
{
"name": "string",
"description": "string",
"imageUrl": "string"
},
{
"name": "string",
"description": "string",
"imageUrl": "string"
}
}
Whoop!
You can mint multiple NFTs.
1.4 It is Completed! ✅
The success API call will return a JSON body described in the following code.
[
{
"name": "test 1",
"itemId": "KhnCdy",
"transactionId": "ynyLEYvHXksAfVXMkS8H",
"blockchainTokenId": 12275900852,
"contract": "0xf878088e8F106bc98370E8Ebf479512A7c07D576",
"ownerfyTokenId": "KhnCdy",
"blockchain": "polygon",
"openseaLink": "https://testnets.opensea.io/assets/matic/0xf878088e8F106bc98370E8Ebf479512A7c07D576/12275900852"
},
{
"name": "test 2",
"itemId": "ae4kRS",
"transactionId": "N1eq6ptmRu6sLxLkiRO3",
"blockchainTokenId": 22079215101,
"contract": "0xf878088e8F106bc98370E8Ebf479512A7c07D576",
"ownerfyTokenId": "ae4kRS",
"blockchain": "polygon",
"openseaLink": "https://testnets.opensea.io/assets/matic/0xf878088e8F106bc98370E8Ebf479512A7c07D576/22079215101"
}
]