The Basics of Minting APIs

This page describes how you can manage your organization NFTs with Lootex API.

Mint NFTs will cost ETH, please carefully monitor Ethereum balance of your organization before proceeding! Please contact Lootex support for more details.

post
Batch Mint NFTs

https://api.forge.lootex.dev/v1/contracts/:contract_address/assets/batch
This endpoint allows you to mint and send NFT to any Ethereum Address(This will cost ETH!)
Request
Response
Request
Path Parameters
contract_address
required
string
Ethereum address of NFT smart contract
Headers
Content-Type
optional
string
application/json
Authorization
required
string
ApiKey {{api_key}} (whereapi_key provided by Lootex support)
Body Parameters
metadata
optional
object
can include following keys use_ipfs, anchor
anchor
optional
boolean
(Beta) enables minting NFT after API request, default: true
use_ipfs
optional
boolean
enables IPFS to store large data, default: false
assets
required
array
asset_object
asset_object
required
object
must have following keys to_address, name, description, image_url, background_color
to_address
required
string
Receiver Ethereum address of minting NFT
name
required
string
Name of NFT (single line)
description
required
string
Description of NFT, supporting line breaks
image_url
required
string
Valid image url of NFT
background_color
required
string
6-digit color code (e.g. FFFFFF)
attributes_map
required
object
Property of minting NFT
Response
200: OK
Minting NFT request is successfully retrieved and ready to go on blockchain
{
"assets": [
{
"name": "Privileged Explorer",
"description": "非常早期的數位收藏品探險家,您有澄澈的眼和勇敢的心,往往能夠在大眾尚未看透趨勢時,就不畏質疑採取行動。這是一個全世界只有 100 個的限量徽章,此徽章代表您已經準備好開啟一段壯遊,探索一個鏈接真實的虛擬世界,挖掘尚未被發現的奇珍異寶。\n\n(#17 out of 100)",
"external_url": "https://dex.lootex.io/assets/0xdbba35892f7bf059c65279c0eebd05d9bb00af1f/17",
"image_url": "https://storage.googleapis.com/lootex-static/MeetTaipei/privileged-explorer.png",
"youtube_url": "",
"animation_url": "",
"background_color": "eeeeee",
"contract_address": "0xdbba35892f7bf059c65279c0eebd05d9bb00af1f",
"owner_address": "0x9478e2c334b4d3d0c8aca26ce22809816d227236",
"token_id": 17,
"token_uri": "https://api.rinkeby.forge.lootex.dev/v1/assets/0xdbba35892f7bf059c65279c0eebd05d9bb00af1f/17",
"attributes": [
{
"trait_type": "ID Number",
"display_type": "number",
"is_onchain": false,
"value": 17
},
{
"trait_type": "Rarity",
"display_type": "string",
"is_onchain": false,
"value": "epic"
},
{
"trait_type": "Issue Date",
"display_type": "string",
"is_onchain": false,
"value": "Nov. 14, 2019"
}
],
"txs": [
{
"id": 3071,
"hash": "0x5b8285d5ec4b0bddbfc06d6809373eb89c6e1301f2ceb2d3c729d92a225188cd",
"data": "0xd3fc98640000000000000000000000009478e2c334b4d3d0c8aca26ce22809816d22723600000000000000000000000000000000000000000000000000000000000000110000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000005468747470733a2f2f6170692e666f7267652e6c6f6f7465782e6465762f76312f6173736574732f3078646242413335383932463742463035396336353237394330454562643035443962623030616631662f3137000000000000000000000000",
"status": "QUEUEING"
}
]
},
{
"name": "Privileged Explorer",
"description": "非常早期的數位收藏品探險家,您有澄澈的眼和勇敢的心,往往能夠在大眾尚未看透趨勢時,就不畏質疑採取行動。這是一個全世界只有 100 個的限量徽章,此徽章代表您已經準備好開啟一段壯遊,探索一個鏈接真實的虛擬世界,挖掘尚未被發現的奇珍異寶。\n\n(#13 out of 100)",
"external_url": "https://dex.lootex.io/assets/0xdbba35892f7bf059c65279c0eebd05d9bb00af1f/13",
"image_url": "https://storage.googleapis.com/lootex-static/MeetTaipei/privileged-explorer.png",
"youtube_url": "",
"animation_url": "",
"background_color": "eeeeee",
"contract_address": "0xdbba35892f7bf059c65279c0eebd05d9bb00af1f",
"owner_address": "0x312ee068322071030a4ce5fb197d3179d0e24889",
"token_id": 13,
"token_uri": "https://api.rinkeby.forge.lootex.dev/v1/assets/0xdbba35892f7bf059c65279c0eebd05d9bb00af1f/13",
"attributes": [
{
"trait_type": "ID Number",
"display_type": "number",
"is_onchain": false,
"value": 13
},
{
"trait_type": "Rarity",
"display_type": "string",
"is_onchain": false,
"value": "epic"
},
{
"trait_type": "Issue Date",
"display_type": "string",
"is_onchain": false,
"value": "Nov. 14, 2019"
}
],
"txs": [
{
"id": 3067,
"hash": "0x88bc1cf916b897bae78149b91dd89ef2f40c4baa1953612159b0175388c32112",
"data": "0xd3fc9864000000000000000000000000312ee068322071030a4ce5fb197d3179d0e24889000000000000000000000000000000000000000000000000000000000000000d0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000005468747470733a2f2f6170692e666f7267652e6c6f6f7465782e6465762f76312f6173736574732f3078646242413335383932463742463035396336353237394330454562643035443962623030616631662f3133000000000000000000000000",
"status": "QUEUEING"
}
]
}
],
"ok": true
}

attribute_map varies from different NFT smart contract, please contact Lootex support for your specific format

Example Request (cURL)

curl --location --request POST "{{host}}/v1/contracts/{{contract_address}}/assets/batch" \
--header "Content-Type: application/json" \
--header "Authorization: ApiKey {{api_key}}" \
--data "{
\"meta\": {
\"use_ipfs\": false
},
\"assets\": [
{
\"to_address\": \"0x312ee068322071030A4Ce5fB197d3179d0e24889\",
\"name\": \"Privileged Explorer\",
\"description\": \"非常早期的數位收藏品探險家,您有澄澈的眼和勇敢的心,往往能夠在大眾尚未看透趨勢時,就不畏質疑採取行動。這是一個全世界只有 100 個的限量徽章,此徽章代表您已經準備好開啟一段壯遊,探索一個鏈接真實的虛擬世界,挖掘尚未被發現的奇珍異寶。\\n\\n(#13 out of 100\",
\"image_url\": \"https://storage.googleapis.com/lootex-static/MeetTaipei/privileged-explorer.png\",
\"background_color\": \"eeeeee\",
\"attributes_map\": {
\"ID Number\": \"13\",
\"Rarity\": \"epic\",
\"Issue Date\": \"Nov. 14, 2019\"
}
},
{
\"to_address\": \"0x9478E2C334B4D3d0C8ACa26CE22809816d227236\",
\"name\": \"Privileged Explorer\",
\"description\": \"非常早期的數位收藏品探險家,您有澄澈的眼和勇敢的心,往往能夠在大眾尚未看透趨勢時,就不畏質疑採取行動。這是一個全世界只有 100 個的限量徽章,此徽章代表您已經準備好開啟一段壯遊,探索一個鏈接真實的虛擬世界,挖掘尚未被發現的奇珍異寶。\\n\\n(#17 out of 100\",
\"image_url\": \"https://storage.googleapis.com/lootex-static/MeetTaipei/privileged-explorer.png\",
\"background_color\": \"eeeeee\",
\"attributes_map\": {
\"ID Number\": \"17\",
\"Rarity\": \"epic\",
\"Issue Date\": \"Nov. 14, 2019\"
}
}
]
}"

get
Retrieve NFT minting info

https://api.forge.lootex.dev/v1/contracts/:contract_address/assets
This endpoint allows you to get necessary information of minted NFT
Request
Response
Request
Path Parameters
contract_address
required
string
Ethereum address of NFT smart contract
Headers
Authorization
required
string
ApiKey {{api_key}} (whereapi_key provided by Lootex support)
Query Parameters
limit
optional
integer
Number of NFT assets retrieved (Default: 100000)
status
optional
string
QUEUEING, PENDING or SUCCESS
token_id_before
optional
integer
Retrieving assets before specific token_id
token_id_after
optional
integer
Retrieving assets after specific token_id
Response
200: OK
NFT minting info is successfully retrieved.
{
"assets": [
{
"name": "Privileged Explorer",
"description": "非常早期的數位收藏品探險家,您有澄澈的眼和勇敢的心,往往能夠在大眾尚未看透趨勢時,就不畏質疑採取行動。這是一個全世界只有 100 個的限量徽章,此徽章代表您已經準備好開啟一段壯遊,探索一個鏈接真實的虛擬世界,挖掘尚未被發現的奇珍異寶。\n\n(#100 out of 100)",
"external_url": "https://dex.lootex.io/assets/0xdbba35892f7bf059c65279c0eebd05d9bb00af1f/100",
"image_url": "https://storage.googleapis.com/lootex-static/MeetTaipei/privileged-explorer.png",
"youtube_url": "",
"animation_url": "",
"background_color": "eeeeee",
"contract_address": "0xdbba35892f7bf059c65279c0eebd05d9bb00af1f",
"owner_address": "0x44bc1e612e11d0acd2c43218ea55717ac28e3a40",
"token_id": 100,
"token_uri": "https://api.forge.lootex.dev/v1/assets/0xdbba35892f7bf059c65279c0eebd05d9bb00af1f/100",
"attributes": [
{
"trait_type": "ID Number",
"display_type": "number",
"is_onchain": false,
"value": 100
},
{
"trait_type": "Rarity",
"display_type": "string",
"is_onchain": false,
"value": "epic"
},
{
"trait_type": "Issue Date",
"display_type": "string",
"is_onchain": false,
"value": "Nov. 16, 2019"
}
],
"txs": [
{
"id": 3157,
"hash": "0xcc5ea30f82bb3b5c77ecc673b1d87e964bf655cbfdd25145627e41f162a55419",
"data": "0xd3fc986400000000000000000000000044bc1e612e11d0acd2c43218ea55717ac28e3a4000000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000005568747470733a2f2f6170692e666f7267652e6c6f6f7465782e6465762f76312f6173736574732f3078646242413335383932463742463035396336353237394330454562643035443962623030616631662f3130300000000000000000000000",
"status": "SUCCESS"
}
]
}
],
"ok": true,
"total_count": 100
}

Example Request (cURL)

curl --location --request GET "{{host}}/v1/contracts/{{contract_address}}/assets?limit=1" \
--header "Authorization: ApiKey {{api_key}}"

put
Update NFT Properties

https://api.forge.lootex.dev/v1/contracts/:contract_address/:token_id
This endpoint allows you to update properties of minted NFT
Request
Response
Request
Path Parameters
contract_address
required
string
Ethereum address of NFT smart contract
token_id
required
string
Token ID of updated NFT
Headers
Content-Type
optional
string
application/json
Authorization
required
string
ApiKey {{api_key}} (whereapi_key provided by Lootex support)
Body Parameters
attributes_map
required
object
Property of minting NFT
Response
200: OK
NFT properties have been successfully updated.
{
"assets": [
{
"name": "Privileged Explorer",
"description": "非常早期的數位收藏品探險家,您有澄澈的眼和勇敢的心,往往能夠在大眾尚未看透趨勢時,就不畏質疑採取行動。這是一個全世界只有 100 個的限量徽章,此徽章代表您已經準備好開啟一段壯遊,探索一個鏈接真實的虛擬世界,挖掘尚未被發現的奇珍異寶。\n\n(#100 out of 100)",
"external_url": "https://dex.lootex.io/assets/0xdbba35892f7bf059c65279c0eebd05d9bb00af1f/100",
"image_url": "https://storage.googleapis.com/lootex-static/MeetTaipei/privileged-explorer.png",
"youtube_url": "",
"animation_url": "",
"background_color": "eeeeee",
"contract_address": "0xdbba35892f7bf059c65279c0eebd05d9bb00af1f",
"owner_address": "0x44bc1e612e11d0acd2c43218ea55717ac28e3a40",
"token_id": 100,
"token_uri": "https://api.forge.lootex.dev/v1/assets/0xdbba35892f7bf059c65279c0eebd05d9bb00af1f/100",
"attributes": [
{
"trait_type": "ID Number",
"display_type": "number",
"is_onchain": false,
"value": 100
},
{
"trait_type": "Rarity",
"display_type": "string",
"is_onchain": false,
"value": "epic"
},
{
"trait_type": "Issue Date",
"display_type": "string",
"is_onchain": false,
"value": "Nov. 16, 2019"
}
],
"txs": [
{
"id": 3157,
"hash": "0xcc5ea30f82bb3b5c77ecc673b1d87e964bf655cbfdd25145627e41f162a55419",
"data": "0xd3fc986400000000000000000000000044bc1e612e11d0acd2c43218ea55717ac28e3a4000000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000005568747470733a2f2f6170692e666f7267652e6c6f6f7465782e6465762f76312f6173736574732f3078646242413335383932463742463035396336353237394330454562643035443962623030616631662f3130300000000000000000000000",
"status": "SUCCESS"
}
]
},
],
"ok": true
}

Example Request (cURL)

curl --location --request PUT "{{endpoint}}/v1/assets/{{contract_address}}/{{token_id}}" \
--header "Content-Type: application/json" \
--header "Authorization: ApiKey {{api_key}}" \
--data "{
\"attributes_map\": {
\"Rarity\": epic,
}
}"