NFT (NonFungible Token) API offers NFT minting, transferring, and NFT-related information.

Get NFT Contract Information

Returns the NFT contract information of a contract address (contract).

Request URL

Live URL https://bc-api.qpyou.cn/core/v1/nft/{contract}
Sandbox URL https://sandbox-bc-api.qpyou.cn/core/v1/nft/{contract}
HTTP Method GET
Content-Type application/json

Path Parameters

Field Name Description Type Required
contract the NFT contract address string Y

Header Parameters

Field Name Description Type Required
x-network the blockchain networks {ploygon, xpla} 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

Response Sample

Get NFT Information

Returns the NFT information of a token ID (tokenId).

Request URL

Live URL https://bc-api.qpyou.cn/core/v1/nft/{contract}/tokens/{tokenId}
Sandbox URL https://sandbox-bc-api.qpyou.cn/core/v1/nft/{contract}/tokens/{tokenId}
HTTP Method GET
Content-Type application/json

Path Parameters

Field Name Description Type Required
contract the NFT contract address string Y
tokenId NFT ID String Y

Header Parameters

Field Name Description Type Required
x-network the blockchain networks {ploygon, xpla} 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

Response Sample

Get NFT Owner

Returns the NFT owner information with a token ID (tokenId).

Request URL

Live URL https://bc-api.qpyou.cn/core/v1/nft/{contract}/tokens/{tokenId}/account
Sandbox URL https://sandbox-bc-api.qpyou.cn/core/v1/nft/{contract}/tokens/{tokenId}/account
HTTP Method GET
Content-Type application/json

Path Parameters

Field Name Description Type Required
contract the NFT contract address string Y
tokenId NFT ID String Y

Header Parameters

Field Name Description Type Required
x-network the blockchain networks {ploygon, xpla} 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

Response Sample

Get Accout Information Granted to Send NFT

Returns the information of the accounts that are authorized to send specific NFTs.

Request URL

Live URL https://bc-api.qpyou.cn/core/v1/nft/{contract}/tokens/{tokenId}/approval
Sandbox URL https://sandbox-bc-api.qpyou.cn/core/v1/nft/{contract}/tokens/{tokenId}/approval
HTTP Method GET
Content-Type application/json

Path Parameters

Field Name Description Type Required
contract the NFT contract address string Y
tokenId NFT ID String Y

Header Parameters

Field Name Description Type Required
x-network the blockchain networks {ploygon, xpla} 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

Response Sample

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

Live URL https://bc-api.qpyou.cn/core/v1/nft/{contract}/account/{owner}/approval/{operator}
Sandbox URL https://sandbox-bc-api.qpyou.cn/core/v1/nft/{contract}/account/{owner}/approval/{operator}
HTTP Method GET
Content-Type application/json

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

Header Parameters

Field Name Description Type Required
x-network the blockchain networks {ploygon, xpla} 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

Response Sample

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

Live URL https://bc-api.qpyou.cn/core/v1/nft/{contract}/transfer
Sandbox URL https://sandbox-bc-api.qpyou.cn/core/v1/nft/{contract}/transfer
HTTP Method POST
Content-Type application/json

Path Parameters

Field Name Description Type Required
contract the NFT contract address string Y

Header Parameters

Field Name Description Type Required
x-network the blockchain networks {ploygon, xpla} 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

Response Sample

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

Live URL https://bc-api.qpyou.cn/core/v1/nft/{contract}/mint
Sandbox URL https://sandbox-bc-api.qpyou.cn/core/v1/nft/{contract}/mint
HTTP Method POST
Content-Type application/json

Path Parameters

Field Name Description Type Required
contract the NFT contract address string Y

Header Parameters

Field Name Description Type Required
x-network the blockchain networks {ploygon, xpla} 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

Response Sample

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

Live URL https://bc-api.qpyou.cn/core/v1/nft/{contract}/approve/{tokenId}
Sandbox URL https://sandbox-bc-api.qpyou.cn/core/v1/nft/{contract}/approve/{tokenId}
HTTP Method POST
Content-Type application/json

Path Parameters

Field Name Description Type Required
contract the NFT contract address string Y
tokenId NFT ID String Y

Header Parameters

Field Name Description Type Required
x-network the blockchain networks {ploygon, xpla} 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

Response Sample

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

Live URL https://bc-api.qpyou.cn/core/v1/nft/{contract}/approve
Sandbox URL https://sandbox-bc-api.qpyou.cn/core/v1/nft/{contract}/approve
HTTP Method POST
Content-Type application/json

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

Header Parameters

Field Name Description Type Required
x-network the blockchain networks {ploygon, xpla} 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

Response Sample

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

Live URL https://bc-api.qpyou.cn/core/v1/nft/{contract}/revoke/{tokenId}
Sandbox URL https://sandbox-bc-api.qpyou.cn/core/v1/nft/{contract}/revoke/{tokenId}
HTTP Method POST
Content-Type application/json

Path Parameters

Field Name Description Type Required
contract the NFT contract address string Y
tokenId NFT ID String Y

Header Parameters

Field Name Description Type Required
x-network the blockchain networks {ploygon, xpla} 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

Response Sample

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

Live URL https://bc-api.qpyou.cn/core/v1/nft/{contract}/revoke
Sandbox URL https://sandbox-bc-api.qpyou.cn/core/v1/nft/{contract}/revoke
HTTP Method POST
Content-Type application/json

Path Parameters

Field Name Description Type Required
contract the NFT contract address string Y

Header Parameters

Field Name Description Type Required
x-network the blockchain networks {ploygon, xpla} 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

Response Sample

Deploy NFT Contract

Creates a transaction that deploys the standard (ERC-721) NFT contract.

Request URL

Live URL https://bc-api.qpyou.cn/core/v1/nft/contract
Sandbox URL https://sandbox-bc-api.qpyou.cn/core/v1/nft/contract
HTTP Method POST
Content-Type application/json

Header Parameters

Field Name Description Type Required
x-network the blockchain networks {ploygon, xpla} 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

Response Sample