Kingdomly Docs
Search
K

Inventory

(POST)
The Inventory Endpoint at "https://www.kingdomly.app/api/kingdomlyInventoryHandler" allows you to check the inventory of all NFTs owned by a specific wallet address on a specified blockchain chain.

Making a Request

To make a request, you must send a POST request with the following parameters in the request body:
  1. 1.
    walletAddress: The wallet address you want to check the inventory for.
  2. 2.
    chain: The blockchain chain the wallet is on. Currently, the only chain supported is "ETH".
Example Request Body:
{
"walletAddress": "0x8c0Ff0415f1cEdB1d7E8C3D95f9B3B7708Aa6b14",
"chain": "ETH"
}

Making the API Call

Once you have constructed the request body, you can make a POST request to the API to retrieve the entire NFT inventory of the requested wallet address. You can use any HTTP client library or tool (such as curl, Postman, or the HTTP client in your programming language) to make the API request.
Example of a POST request using curl:
curl -X POST \
https://www.kingdomly.app/api/kingdomlyInventoryHandler \
-H 'Content-Type: application/json' \
-d '{
"walletAddress": "0x1111111111111111",
"chain": "ETH"
}'
Example of a POST request using JavaScript:
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"walletAddress": "0x1111111111111111",
"chain": "ETH"
})
};
fetch('https://www.kingdomly.app/api/kingdomlyInventoryHandler', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));

Parsing the Response

The API will respond with a JSON array, where each object in the array represents an NFT owned by the inputted wallet address. Each object will contain the following properties:
  • collectionAddress: The address of the NFT collection the NFT belongs to.
  • tokenId: The unique identifier of the NFT.
  • title: The title of the NFT.
  • description: The description of the NFT.
  • media: An object containing the image of the NFT. The image is stored as a IPFS hash, which can be accessed through a public IPFS gateway.
Example Response:
[
{
collectionAddress: '0x1178d1da81ca8c128c5e81d4295f65dd51e1e3dc',
tokenId: '570',
title: 'NeonTools | Node',
description: 'NeonTools, the fastest node out there!',
media: { image: 'ipfs://QmZacHdKKUgRrEgRrfMj1Lu2mqC6jp9T8yY5HNhDqGFqDz' }
}
]