NFTRainbow
NFTRainbow 控制台GithubWhat's an NFT?
  • NFTRainbow - NFT 彩虹桥 🌈🌉🦄
  • Tutorials
    • Mints
      • 铸造NFT快速指南
    • Interactive Flowchart
    • By Community
      • NFTRainbow 使用教程
    • Account Solutions
    • Guides
      • 控制台合约代付设置
      • 元数据管理
      • Rainbow 铸造工具简介
  • Docs
    • FAQs
    • Changelog
    • RoadMap
    • Conflux Sponsor
    • Terminology
    • Prices
  • Products
    • Conflux RPC Bridge
    • ERC-6551
    • Web3 Services
  • API Reference
    • Open-API
      • Login
      • Files
      • Metadata
      • Contract
      • Mints
      • Transfers
      • Transaction
      • NFT
      • Burns
    • Swagger-Doc
    • Postman Collection
    • SDKs
      • Go-SDK
    • Common Errors
  • ABOUT THE APIs
    • Authentication
    • Error codes
    • Quotas and rate limits
Powered by GitBook
On this page
  1. API Reference
  2. Open-API

Burns

The burns API provide users the entries to burn the NFTs.

PreviousNFTNextSDKs

Last updated 1 year ago

Burn NFTs

Burn NFT by Admin

The Burn NFT by Admin API helps users to burn the corresponding NFT.

Name
Meaning
Param Type
Data Type

Authorization

Bearer Token

Header

string

Name
Meaning
Param Type
Type
Required

token_id

The id of the NFT

body

string

chain

The chain type. The types include conflux and conflux_test

body

string

contract_address

The address of the contract

body

string

contract_type

The type of the contract

body

string

amount

The amount of the burned NFTs

body

integer

user

The address of the user

body

string

{
    "chain": "conflux_test",
    "contract_address": "cfxtest:acg1rr3cxaykwymwrajgat0vbk44wvzsrj0ftk7wb1",
    "contract_type":"erc721",
    "user": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
    "token_id":"23",
    "amount":1
}
Name
Meaning
Type

created_at

The time of creating the item in the database

string

updated_at

The time of updating the item in the database

string

deleted_at

The time of deleting the item in the database

string

id

The id of the item in the database

integer

amount

The amount of the nft

integer

app_id

The id of the app

integer

chain_id

The id of the chain. 1029-mainnet, 1-testnet

integer

chain_type

The type of the chain. 1-CFX, 2-ETH

integer

contract_type

The type of the contract. 1-ERC721, 2-ERC1155

integer

contract

The address of the nft

string

error

The error during executing tx

string

hash

The hash of the transaction

string

status

The status of the transaction. 0-pending, 1-success, 2-failed

integer

token_id

The id of the token

string

user

The address of the user

string

tx_id

The id of the transaction

integer

mint_type

The type of the minting

integer

error

The error during executing the transaction

string

{
    "id": 106,
    "created_at": "2022-10-11T17:18:29.494+08:00",
    "updated_at": "2022-10-11T17:18:29.494+08:00",
    "deleted_at": null,
    "app_id": 18,
    "chain_type": 1,
    "chain_id": 1,
    "contract": "cfxtest:acdyu08shg7mu816y0xkty81hev50g7gtu2effygtk",
    "contract_type": 1,
    "tx_id": 767,
    "hash": "",
    "status": 0,
    "error": "",
    "user": "cfxtest:aarep2p1rcadt0j1x0gkybggfkk97uxwty45grxxt7",
    "token_id": "23",
    "amount": 1
}
curl --request POST \
  --url https://api.nftrainbow.cn/v1/burns/ \
  --header 'Authorization: Bearer {JWT}' \
  --header 'Content-Type: application/json' \ 
  --data-raw '{
    "chain": "conflux_test",
    "contract_address": "cfxtest:acg1rr3cxaykwymwrajgat0vbk44wvzsrj0ftk7wb1",
    "contract_type":"erc721",
    "user": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
    "token_id":"23",
    "amount":1
}'

The token_id is the number like "123", which type is string

Query Operations

Query specific Burning NFT information

The Query specific Burning NFT information API helps users to query burning record according to id.

Name
Meaning
Param Type
Data Type

Authorization

Bearer Token

Header

string

Name
Meaning
Param Type
Type
Required

id

The id of the record

path

string

Name
Meaning
Type

created_at

The time of creating the item in the database

string

updated_at

The time of updating the item in the database

string

deleted_at

The time of deleting the item in the database

string

id

The id of the item in the database

integer

amount

The amount of the nft

integer

app_id

The id of the app

integer

chain_id

The id of the chain. 1029-mainnet, 1-testnet

integer

chain_type

The type of the chain. 1-CFX, 2-ETH

integer

contract_type

The type of the contract. 1-ERC721, 2-ERC1155

integer

contract

The address of the nft

string

error

The error during executing tx

string

hash

The hash of the transaction

string

status

The status of the transaction. 0-pending, 1-success, 2-failed

integer

token_id

The id of the token

string

user

The address of the user

string

tx_id

The id of the transaction

integer

{
    "id": 106,
    "created_at": "2022-10-11T17:18:29.494+08:00",
    "updated_at": "2022-10-11T17:18:44.02+08:00",
    "deleted_at": null,
    "app_id": 18,
    "chain_type": 1,
    "chain_id": 1,
    "contract": "cfxtest:acdyu08shg7mu816y0xkty81hev50g7gtu2effygtk",
    "contract_type": 1,
    "tx_id": 767,
    "hash": "0xc7bc8b1e33c30cd0e522d973b8ab63880549125ec12389701e7e54a6d6836bb0",
    "status": 1,
    "error": "",
    "user": "cfxtest:aarep2p1rcadt0j1x0gkybggfkk97uxwty45grxxt7",
    "token_id": "4646046442",
    "amount": 1
}
curl --request get \
  --url https://api.nftrainbow.cn/v1/burns/105 \
  --header 'Authorization: Bearer {JWT}' \
  --header 'Content-Type: application/json' \ 

Query Burning List

The Query Burning List API helps users to query burning list.

Name
Meaning
Param Type
Data Type

Authorization

Bearer Token

Header

string

Name
Meaning
Param Type
Data Type
Required
Default

page

Page Query

query

integer

1

limit

Page Query

query

integer

10

Name
Meaning
Type

count

The count of the records

string

Items

The array of items

[]BurnTask

The BurnTask struct is showed in the following.

Name
Meaning
Type

created_at

The time of creating the item in the database

string

updated_at

The time of updating the item in the database

string

deleted_at

The time of deleting the item in the database

string

id

The id of the item in the database

integer

amount

The amount of the nft

integer

app_id

The id of the app

integer

chain_id

The id of the chain. 1029-mainnet, 1-testnet

integer

chain_type

The type of the chain. 1-CFX, 2-ETH

integer

contract_type

The type of the contract. 1-ERC721, 2-ERC1155

integer

contract

The address of the nft

string

error

The error during executing tx

string

hash

The hash of the transaction

string

status

The status of the transaction. 0-pending, 1-success, 2-failed

integer

token_id

The id of the token

string

user

The address of the user

string

tx_id

The id of the transaction

integer

{
    "count": 1,
    "items": [
        {
            "id": 1,
            "created_at": "2022-10-10T23:07:17.747+08:00",
            "updated_at": "2022-10-10T23:07:36.485+08:00",
            "deleted_at": null,
            "app_id": 19,
            "chain_type": 1,
            "chain_id": 1029,
            "contract": "cfx:acd1pmsj9crnr79rmmd9ne5pb5dbk51p4ydf6msz5e",
            "contract_type": 2,
            "tx_id": 657,
            "hash": "0x26acea5c8f60aeb8964e6505e33b66cbb017185b93d7ea1fb9d4d80139a307a8",
            "status": 1,
            "error": "",
            "user": "cfx:aat5w71vgxyumvm2bzsxshed027rwjst6e8mt3sam0",
            "token_id": "9262474764",
            "amount": 1
        }
    ]
}
curl --request GET \
  --url https://api.nftrainbow.cn/v1/burns/ \
  --header 'Authorization: Bearer {JWT}' \
  --header 'Content-Type: application/json' \ 

Burn NFT detail

get

Get NFT Burn detail info

Path parameters
idintegerRequired

id

Header parameters
AuthorizationstringRequired

Bearer Open_JWT

Responses
200
OK
application/json
400
Invalid request
application/json
500
Internal Server error
application/json
get
GET /v1/burns/{id} HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Accept: */*
{
  "amount": 1,
  "app_id": 1,
  "block_reason": 1,
  "chain_id": 1,
  "chain_type": 1,
  "contract": "text",
  "contract_type": 1,
  "created_at": "text",
  "deleted_at": {
    "time": "text",
    "valid": true
  },
  "error": "text",
  "hash": "text",
  "id": 1,
  "status": 1,
  "token_id": "text",
  "tx_id": 1,
  "updated_at": "text",
  "user": "text"
}

Obtain the burned NFTs list

get

Get the NFT burned list information.

Header parameters
AuthorizationstringRequired

Bearer Open_JWT

Responses
200
OK
application/json
400
Invalid request
application/json
500
Internal Server error
application/json
get
GET /v1/burns HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Accept: */*
{
  "count": 1,
  "items": [
    {
      "amount": 1,
      "app_id": 1,
      "block_reason": 1,
      "chain_id": 1,
      "chain_type": 1,
      "contract": "text",
      "contract_type": 1,
      "created_at": "text",
      "deleted_at": {
        "time": "text",
        "valid": true
      },
      "error": "text",
      "hash": "text",
      "id": 1,
      "status": 1,
      "token_id": "text",
      "tx_id": 1,
      "updated_at": "text",
      "user": "text"
    }
  ]
}
  • Burn NFTs
  • Burn NFT by Admin
  • POSTBurn NFT
  • Query Operations
  • Query specific Burning NFT information
  • GETBurn NFT detail
  • Query Burning List
  • GETObtain the burned NFTs list

Burn NFT

post

Burn NFT by admin

Header parameters
AuthorizationstringRequired

Bearer Open_JWT

Body
amountintegerOptional
chainstring · enumRequiredPossible values:
contract_addressstringRequired
contract_typestring · enumRequiredPossible values:
token_idstringRequired
userstringOptional
Responses
200
OK
application/json
400
Invalid request
application/json
500
Internal Server error
application/json
post
POST /v1/burns HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 113

{
  "amount": 1,
  "chain": "conflux",
  "contract_address": "text",
  "contract_type": "erc721",
  "token_id": "text",
  "user": "text"
}
{
  "amount": 1,
  "app_id": 1,
  "block_reason": 1,
  "chain_id": 1,
  "chain_type": 1,
  "contract": "text",
  "contract_type": 1,
  "created_at": "text",
  "deleted_at": {
    "time": "text",
    "valid": true
  },
  "error": "text",
  "hash": "text",
  "id": 1,
  "status": 1,
  "token_id": "text",
  "tx_id": 1,
  "updated_at": "text",
  "user": "text"
}