NFT API NFT (Non-Fungible Token) API offers NFT minting, transferring, and NFT-related information.
Returns the NFT contract information of a contract address (contract
).
Request URL Path parameters Field Name Description Type Required contract the NFT contract address string Y
Field Name Description Type Required x-network the blockchain networks string Y Authorization Authentication token required to call the API string Y
Responses Field Name Description Type code api request result code, 0: success number message the result message String data API response data json data.name the NFT contract name string data.symbol the NFT contract symbol string
Request sample curl -X 'GET'
'https://sandbox-bc-api.qpyou.cn/core/v1/nft/0xc1aE02F65dA9819bbdE39255698193016F4aB018'
-H 'accept: application/json'
-H 'x-network: polygon'
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJp...'
Response sample {
"code" : 0 ,
"message" : "success" ,
"data" : {
"name" : "Simple NFT" ,
"symbol" : "SNFT"
}
}
Returns the NFT information of a token ID (tokenId
).
Request URL Path parameters Field Name Description Type Required contract the NFT contract address string Y tokenId NFT ID String Y
Field Name Description Type Required x-network the blockchain networks string Y Authorization Authentication token required to call the API string Y
Responses Field Name Description Type code api request result code, 0: success number message the result message String data API response data json data.tokenUri This is the NFT URI. It is formatted as ipfs://{cid}
and with this you can get NFT information using Get Metadata API . string
Request sample curl -X 'GET'
'https://sandbox-bc-api.qpyou.cn/core/v1/nft/0xc1aE02F65dA9819bbdE39255698193016F4aB018/tokens/1'
-H 'accept: application/json'
-H 'x-network: polygon'
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJp...'
Response sample {
"code" : 0 ,
"message" : "success" ,
"data" : {
"tokenUri" : "ipfs://QmZcH4YvBVVRJtdn4RdbaqgspFU8gH6P9vomDpBVpAL3u4"
}
}
Get NFT owner Returns the NFT owner information with a token ID (tokenId).
Request URL Path parameters Field Name Description Type Required contract the NFT contract address string Y tokenId NFT ID String Y
Field Name Description Type Required x-network the blockchain networks string Y Authorization Authentication token required to call the API string Y
Responses Field Name Description Type code api request result code, 0: success number message the result message String data API response data json data.owner the address of the NFT owner string
Request sample curl -X 'GET'
'https://sandbox-bc-api.qpyou.cn/core/v1/nft/0xc1aE02F65dA9819bbdE39255698193016F4aB018/tokens/1/account'
-H 'accept: application/json'
-H 'x-network: polygon'
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJp...'
Response sample {
"code" : 0 ,
"message" : "success" ,
"data" : {
"owner" : "0x9428e6eF51FEb2201676deEc11B7E36F7c1F0765"
}
}
Returns the information of the accounts that are authorized to send specific NFTs.
Request URL Path parameters Field Name Description Type Required contract the NFT contract address string Y tokenId NFT ID String Y
Field Name Description Type Required x-network the blockchain networks string Y Authorization Authentication token required to call the API string Y
Responses Field Name Description Type code api request result code, 0: success number message the result message String data API response data json data.spenders the list of account addresses granted to send the NFT. string[]
Request sample curl -X 'GET'
'https://sandbox-bc-api.qpyou.cn/core/v1/nft/0xc1aE02F65dA9819bbdE39255698193016F4aB018/tokens/1/approval'
-H 'accept: application/json'
-H 'x-network: polygon'
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJp...'
Response sample {
"code" : 0 ,
"message" : "success" ,
"data" : {
"spenders" : [
"0x9428e6eF51FEb2201676deEc11B7E36F7c1F0765"
]
}
}
Check operator’s right to send all NFTs Checks whether the operator
account can send every NFT of owner
or not. All NFTs are minted at the contract
address.
Request URL Path parameters Field Name Description Type Required contract the NFT contract address string Y owner the NFT owner account string Y operator the queried account about the right to send NFTs string Y
Field Name Description Type Required x-network the blockchain networks string Y Authorization Authentication token required to call the API string Y
Responses Field Name Description Type code api request result code, 0: success number message the result message String data API response data json data.isOperator whether the account has the right to send NFTs or not boolean
Request sample curl -X 'GET'
'https://sandbox-bc-api.qpyou.cn/core/v1/nft/0xc1aE02F65dA9819bbdE39255698193016F4aB018/account/0x9428e6eF51FEb2201676deEc11B7E36F7c1F0765/approval/0xFBd488D1b00604d3b05124d80E35FeA9A39C3296'
-H 'accept: application/json'
-H 'x-network: polygon'
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJp...'
Response sample {
"code" : 0 ,
"message" : "success" ,
"data" : {
"isOperator" : true
}
}
Send NFT Creates a transaction that send tokens to a specific address (to
). from
must be the token owner or the account that is delegated with the right to send. If the receiver account (to
) is a contract, this contract can do additional tasks with data
.
Request URL Path parameters Field Name Description Type Required contract the NFT contract address string Y
Field Name Description Type Required x-network the blockchain networks string Y Authorization Authentication token required to call the API string Y
Request body Field Name Description Type Required encoded whether the returned transaction is encoded or not true
: Receive the encoded raw transaction string (data.rawTx
). false
: Receive the decoded data.rawTx
(JSON). boolean N from the account address that sends the token string Y to the account address that receives the token string Y tokenId the token id of the token to be sent string Y data the data that will be sent if the receiver is a contract string N
Responses Field Name Description Type code api request result code, 0: success number message the result message String data API response data json data.rawTx the transaction data string or json data.hashedTx This is hashed data.rawTx
. This value is only returned when the API header x-network
is "polygon" and the Request Body from
is an multi sig wallet address. string data.requestId the unique value that can identify each API request string
Request sample curl -X 'POST'
'http://sandbox-bc-api.qpyou.cn/core/v1/nft/0xA3F4308Ed655f962dD7CA180545c21718fAE49AD/transfer'
-H 'accept: */*'
-H 'x-network: polygon'
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJp...'
-H 'Content-Type: application/json'
-d '{
"encoded": true,
"from": "0xFBd488D1b00604d3b05124d80E35FeA9A39C3296",
"to": "0x9428e6eF51FEb2201676deEc11B7E36F7c1F0765",
"tokenId": "1"
}'
Response sample {
"code" : 0 ,
"message" : "success" ,
"data" : {
"rawTx" : "02f8738301388181c2846fc23ac0846fc23ad882cdc49494853bdc9c6add50d7842d1a3117fab38545747080b8..." ,
"hashedTx" : "0x53e8783e4da707daf58c96a8cea278e7b2a8a5f185af0913b518974556c79076..." ,
"requestId" : "4d4aa1e5-2bfe-4080-b42f-03319810fe29"
}
}
Mint NFT Creates a transaction that mint tokens to a specific address (to
). from
must be the account that has a right to mint.
Request URL Path parameters Field Name Description Type Required contract the NFT contract address string Y
Field Name Description Type Required x-network the blockchain networks string Y Authorization Authentication token required to call the API string Y
Request body Field Name Description Type Required encoded whether the returned transaction is encoded or not true
: Receive the encoded raw transaction string (data.rawTx
). false
: Receive the decoded data.rawTx
(JSON). boolean N from This is the account address that mints the token. It must be the account that has the right to mint. string Y to the account address that receives the token string Y tokenId the token id of the token to be minted string Y tokenUri the metadata URI (data.uri
) that is obtained after uploading the metadata string Y
Responses Field Name Description Type code api request result code, 0: success number message the result message String data API response data json data.rawTx the transaction data string or json data.hashedTx This is hashed data.rawTx
. This value is only returned when the API header x-network
is "polygon" and the Request Body from
is an multi sig wallet address. string data.requestId the unique value that can identify each API request string
Request sample curl -X 'POST'
'https://sandbox-bc-api.qpyou.cn/core/v1/nft/0xA3F4308Ed655f962dD7CA180545c21718fAE49AD/mint'
-H 'accept: */*'
-H 'x-network: polygon'
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJp...'
-H 'Content-Type: application/json'
-d '{
"encoded": true,
"from": "0x9428e6eF51FEb2201676deEc11B7E36F7c1F0765",
"to": "0xFBd488D1b00604d3b05124d80E35FeA9A39C3296",
"tokenId": "11",
"tokenUri": "ipfs://QmZcH4YvBVVRJtdn4RdbaqgspFU8gH6P9vomDpBVpAL3u4/11"
}'
Response sample {
"code" : 0 ,
"message" : "success" ,
"data" : {
"rawTx" : "02f8738301388181c2846fc23ac0846fc23ad882cdc49494853bdc9c6add50d7842d1a3117fab38545747080b8..." ,
"hashedTx" : "0x53e8783e4da707daf58c96a8cea278e7b2a8a5f185af0913b518974556c79076..." ,
"requestId" : "4d4aa1e5-2bfe-4080-b42f-03319810fe29"
}
}
Grant the right to send NFT Creates a transaction that delegates the right to send the specific token to an address (to
). from
must be the token owner.
Request URL Path parameters Field Name Description Type Required contract the NFT contract address string Y tokenId NFT ID String Y
Field Name Description Type Required x-network the blockchain networks string Y Authorization Authentication token required to call the API string Y
Request body Field Name Description Type Required encoded whether the returned transaction is encoded or not true
: Receive the encoded raw transaction string (data.rawTx
). false
: Receive the decoded data.rawTx
(JSON). boolean N from the address of the token owner string Y to the account address that will be granted to send a token string Y
Responses Field Name Description Type code api request result code, 0: success number message the result message String data API response data json data.rawTx the transaction data string or json data.hashedTx This is hashed data.rawTx
. This value is only returned when the API header x-network
is "polygon" and the Request Body from
is an multi sig wallet address. string data.requestId the unique value that can identify each API request string
Request sample curl -X 'POST'
'https://sandbox-bc-api.qpyou.cn/core/v1/nft/0xA3F4308Ed655f962dD7CA180545c21718fAE49AD/approve/1'
-H 'accept: */*'
-H 'x-network: polygon'
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJp...'
-H 'Content-Type: application/json'
-d '{
"encoded": true,
"from": "0xFBd488D1b00604d3b05124d80E35FeA9A39C3296",
"to": "0x9428e6eF51FEb2201676deEc11B7E36F7c1F0765"
}'
Response sample {
"code" : 0 ,
"message" : "success" ,
"data" : {
"rawTx" : "02f8738301388181c2846fc23ac0846fc23ad882cdc49494853bdc9c6add50d7842d1a3117fab38545747080b8..." ,
"hashedTx" : "0x53e8783e4da707daf58c96a8cea278e7b2a8a5f185af0913b518974556c79076..." ,
"requestId" : "4d4aa1e5-2bfe-4080-b42f-03319810fe29"
}
}
Grant the right to send all NFTs Creates a transaction that delegates the right to send all tokens of from
account to an address (to
). The to
account also has the right to send the tokens that the from
account will own in the future.
Request URL Path parameters Field Name Description Type Required contract This is the NFT contract address. The to
account will have the right to send every NFT minted at this contract. string Y
Field Name Description Type Required x-network the blockchain networks string Y Authorization Authentication token required to call the API string Y
Request body Field Name Description Type Required encoded whether the returned transaction is encoded or not true
: Receive the encoded raw transaction string (data.rawTx
). false
: Receive the decoded data.rawTx
(JSON). boolean N from the address of the token owner string Y to the account address that will be granted to send a token string Y
Responses Field Name Description Type code api request result code, 0: success number message the result message String data API response data json data.rawTx the transaction data string or json data.hashedTx This is hashed data.rawTx
. This value is only returned when the API header x-network
is "polygon" and the Request Body from
is an multi sig wallet address. string data.requestId the unique value that can identify each API request string
Request sample curl -X 'POST'
'https://sandbox-bc-api.qpyou.cn/core/v1/nft/0xA3F4308Ed655f962dD7CA180545c21718fAE49AD/approve'
-H 'accept: */*'
-H 'x-network: polygon'
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJp...'
-H 'Content-Type: application/json'
-d '{
"encoded": true,
"from": "0xFBd488D1b00604d3b05124d80E35FeA9A39C3296",
"to": "0x9428e6eF51FEb2201676deEc11B7E36F7c1F0765"
}'
Response sample {
"code" : 0 ,
"message" : "success" ,
"data" : {
"rawTx" : "02f8738301388181c2846fc23ac0846fc23ad882cdc49494853bdc9c6add50d7842d1a3117fab38545747080b8..." ,
"hashedTx" : "0x53e8783e4da707daf58c96a8cea278e7b2a8a5f185af0913b518974556c79076..." ,
"requestId" : "4d4aa1e5-2bfe-4080-b42f-03319810fe29"
}
}
Reclaim the right to send NFT Creates a transaction that takes off the right to send the specific token from an address (to
). from
must be the token owner.
Request URL Path parameters Field Name Description Type Required contract the NFT contract address string Y tokenId NFT ID String Y
Field Name Description Type Required x-network the blockchain networks string Y Authorization Authentication token required to call the API string Y
Request body Field Name Description Type Required encoded whether the returned transaction is encoded or not true
: Receive the encoded raw transaction string (data.rawTx
). false
: Receive the decoded data.rawTx
(JSON). boolean N from the address of the token owner string Y to the address of the account that will be taken off with the right to send a token (this value should be left blank if the Polygon blockchain is used.) string N
Responses Field Name Description Type code api request result code, 0: success number message the result message String data API response data json data.rawTx the transaction data string or json data.hashedTx This is hashed data.rawTx
. This value is only returned when the API header x-network
is "polygon" and the Request Body from
is an multi sig wallet address. string data.requestId the unique value that can identify each API request string
Request sample curl -X 'POST'
'https://sandbox-bc-api.qpyou.cn/core/v1/nft/0xA3F4308Ed655f962dD7CA180545c21718fAE49AD/revoke/1'
-H 'accept: */*'
-H 'x-network: polygon'
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJp...'
-H 'Content-Type: application/json'
-d '{
"encoded": true,
"from": "0xFBd488D1b00604d3b05124d80E35FeA9A39C3296",
"to": "0x9428e6eF51FEb2201676deEc11B7E36F7c1F0765"
}'
Response sample {
"code" : 0 ,
"message" : "success" ,
"data" : {
"rawTx" : "02f8738301388181c2846fc23ac0846fc23ad882cdc49494853bdc9c6add50d7842d1a3117fab38545747080b8..." ,
"hashedTx" : "0x53e8783e4da707daf58c96a8cea278e7b2a8a5f185af0913b518974556c79076..." ,
"requestId" : "4d4aa1e5-2bfe-4080-b42f-03319810fe29"
}
}
Reclaim the Right to Send All NFTs Creates a transaction that takes off the right to send all tokens from an address (to
). from
must be the token owner. In case of ERC-721 token Ethereum, Polygon), to
account address is not required.
Request URL Path parameters Field Name Description Type Required contract the NFT contract address string Y
Field Name Description Type Required x-network the blockchain networks string Y Authorization Authentication token required to call the API string Y
Request body Field Name Description Type Required encoded whether the returned transaction is encoded or not true
: Receive the encoded raw transaction string (data.rawTx
). false
: Receive the decoded data.rawTx
(JSON). boolean N from the address of the token owner string Y to the address of the account that will be taken off with the right to send a token (this value should be left blank if the Polygon blockchain is used.) string N
Responses Field Name Description Type code api request result code, 0: success number message the result message String data API response data json data.rawTx the transaction data string or json data.hashedTx This is hashed data.rawTx
. This value is only returned when the API header x-network
is "polygon" and the Request Body from
is an multi sig wallet address. string data.requestId the unique value that can identify each API request string
Request sample curl -X 'POST'
'https://sandbox-bc-api.qpyou.cn/core/v1/nft/0xA3F4308Ed655f962dD7CA180545c21718fAE49AD/revoke'
-H 'accept: */*'
-H 'x-network: polygon'
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJp...'
-H 'Content-Type: application/json'
-d '{
"encoded": true,
"from": "0xFBd488D1b00604d3b05124d80E35FeA9A39C3296",
"to": "0x9428e6eF51FEb2201676deEc11B7E36F7c1F0765"
}'
Response sample {
"code" : 0 ,
"message" : "success" ,
"data" : {
"rawTx" : "02f8738301388181c2846fc23ac0846fc23ad882cdc49494853bdc9c6add50d7842d1a3117fab38545747080b8..." ,
"hashedTx" : "0x53e8783e4da707daf58c96a8cea278e7b2a8a5f185af0913b518974556c79076..." ,
"requestId" : "4d4aa1e5-2bfe-4080-b42f-03319810fe29"
}
}
Deploy NFT contract Creates a transaction that deploys the standard (ERC-721) NFT contract.
Request URL Field Name Description Type Required x-network the blockchain networks string Y Authorization Authentication token required to call the API string Y
Request body Field Name Description Type Required encoded whether the returned transaction is encoded or not true
: Receive the encoded raw transaction string (data.rawTx
). false
: Receive the decoded data.rawTx
(JSON). boolean N from the account address that deploys the contract string Y name the NFT contract name string Y symbol the NFT contract symbol string Y minter This is the account address who can mint an NFT at this NFT contract. string Y
Responses Field Name Description Type code api request result code, 0: success number message the result message String data API response data json data.rawTx the transaction data string or json data.hashedTx This is hashed data.rawTx
. This value is only returned when the API header x-network
is "polygon" and the Request Body from
is an multi sig wallet address. string data.requestId the unique value that can identify each API request string
Request sample curl -X 'POST'
'https://sandbox-bc-api.qpyou.cn/core/v1/nft/contract'
-H 'accept: */*'
-H 'x-network: polygon'
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJp...'
-H 'Content-Type: application/json'
-d '{
"encoded": true,
"from": "0x9428e6eF51FEb2201676deEc11B7E36F7c1F0765",
"name": "Simple NFT",
"symbol": "SNFT",
"minter": "0x9428e6eF51FEb2201676deEc11B7E36F7c1F0765"
}'
Response sample {
"code" : 0 ,
"message" : "success" ,
"data" : {
"rawTx" : "02f8738301388181c2846fc23ac0846fc23ad882cdc49494853bdc9c6add50d7842d1a3117fab38545747080b8..." ,
"hashedTx" : "0x53e8783e4da707daf58c96a8cea278e7b2a8a5f185af0913b518974556c79076..." ,
"requestId" : "4d4aa1e5-2bfe-4080-b42f-03319810fe29"
}
}