NFT (Non–Fungible 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
1 2 3 4 5 |
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
1 2 3 4 5 6 7 8 |
{ "code": 0, "message": "success", "data": { "name": "Simple NFT", "symbol": "SNFT" } } |
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
1 2 3 4 5 |
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
1 2 3 4 5 6 7 |
{ "code": 0, "message": "success", "data": { "tokenUri": "ipfs://QmZcH4YvBVVRJtdn4RdbaqgspFU8gH6P9vomDpBVpAL3u4" } } |
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
1 2 3 4 5 |
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
1 2 3 4 5 6 7 |
{ "code": 0, "message": "success", "data": { "owner": "0x9428e6eF51FEb2201676deEc11B7E36F7c1F0765" } } |
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
1 2 3 4 5 |
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
1 2 3 4 5 6 7 8 9 |
{ "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
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
1 2 3 4 5 |
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
1 2 3 4 5 6 7 |
{ "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
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
|
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
1 2 3 4 5 6 7 8 9 10 11 12 |
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
1 2 3 4 5 6 7 8 9 |
{ "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
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
|
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
1 2 3 4 5 6 7 8 9 10 11 12 13 |
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
1 2 3 4 5 6 7 8 9 |
{ "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
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
|
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
1 2 3 4 5 6 7 8 9 10 11 |
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
1 2 3 4 5 6 7 8 9 |
{ "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
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
|
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
1 2 3 4 5 6 7 8 9 10 11 |
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
1 2 3 4 5 6 7 8 9 |
{ "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
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
|
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
1 2 3 4 5 6 7 8 9 10 11 |
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
1 2 3 4 5 6 7 8 9 |
{ "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
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
|
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
1 2 3 4 5 6 7 8 9 10 11 |
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
1 2 3 4 5 6 7 8 9 |
{ "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
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
|
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
1 2 3 4 5 6 7 8 9 10 11 12 13 |
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
1 2 3 4 5 6 7 8 9 |
{ "code": 0, "message": "success", "data": { "rawTx": "02f8738301388181c2846fc23ac0846fc23ad882cdc49494853bdc9c6add50d7842d1a3117fab38545747080b8...", "hashedTx": "0x53e8783e4da707daf58c96a8cea278e7b2a8a5f185af0913b518974556c79076...", "requestId": "4d4aa1e5-2bfe-4080-b42f-03319810fe29" } } |