📗
KOMO API V3 Documentation
  • Getting Started
  • Player API Reference
    • Introduction
    • 🔓Account & Authentication
    • 💰NFT and Wallet Portfolio
    • 🎒Inventory
    • 🤝Friend
    • 🏆Tournament
      • Read Tournament Result
    • Tournament Leaderboard
    • Ads
    • 💸Purchasing In-Game Items
  • Admin / Server API Reference
    • Introduction
    • 🙍‍♂️Player Account
    • 🏆Tournament
      • Creating a Tournament
      • Read Tournament Result
      • Managing Tournament (Single Elimination)
      • Managing Tournament (Round Robin)
    • Tournament Leaderboard
Powered by GitBook
On this page
  • Get NFT Portfolio
  • Get Item Rarity and Stock Based on Collection
  • Assign Item NFT
  1. Player API Reference

NFT and Wallet Portfolio

Get NFT Portfolio

GET [endpoint]/v3/wallet/nft

Headers

Name
Type
Description

X-Api-Key*

String

API Key

Authorization*

String

Bearer token

{
    "status": "success",
    "data": [
        {
            "inventory_id": 117756,
            "nft_id": null,
            "name": "Mark 14 #1",
            "image_uri": "https://cdn.alphagames.id/nft-storage/devnet/wows/torpedo-collection/mark-14.png",
            "collection": {
                "address": "BCa8Q2Co3hpceuaBJk8mYZ4ZVQnYs8Dv8iE8EJ7v2yjH",
                "name": "Torpedo Collection"
            },
            "attributes": {
                "Category": "Torpedo",
                "Usage": "Unlimited"
            }
        },
....
        {
            "inventory_id": 118214,
            "nft_id": null,
            "name": "Mark 18 #59",
            "image_uri": "https://cdn.alphagames.id/nft-storage/devnet/wows/torpedo-collection/mark-18.png",
            "collection": {
                "address": "BCa8Q2Co3hpceuaBJk8mYZ4ZVQnYs8Dv8iE8EJ7v2yjH",
                "name": "Torpedo Collection"
            },
            "attributes": {
                "Category": "Torpedo",
                "Usage": "Unlimited"
            }
        }
    ]
}

Get Item Rarity and Stock Based on Collection

GET /v3/nft/stock

Headers

Name
Value

X-Api-Key

API Key

Authorization

Bearer <token>

Query

Name
Type
Description

collection_address*

string

Collection Address

rarity

integer (opsional)

Integer of rarity which set on admin when creating NFT. e.g. 1 for common, 2 for common, 3 for rare, 4 for legendary, 5 for mythical

Response

{
    "status": "success",
    "data": [
        {
            "stock": 800,
            "rarity": 1
        },
        {
            "stock": 200,
            "rarity": 2
        }
    ]
}
{
    "status": "success",
    "data": [
        {
            "stock": 400,
            "group_item": "Mark 14"
        },
        {
            "stock": 400,
            "group_item": "Mark 18"
        }
    ]
}

Assign Item NFT

POST /v3/nft/assign

Headers

Name
Value

X-Api-Key

API Key

Authorization

Bearer <token>

Body

Name
Type
Description

collection_address*

string

Collection Address

group_item*

string

Group Item Name

Response

{
    "status": "success",
    "messages": "NFT Assigned to User",
    "data": {
        "inventory_id": 118214
    }
}
{
    "status": "error",
    "messages": {
        "assignNFTFailed": "Failed to Assign NFT. Possible Empty Stock."
    }
}
PreviousAccount & AuthenticationNextInventory

Last updated 5 months ago

💰