📗
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 inventory item
  • Disable Inventory Transfer
  • Remove item from inventory
  • Inject mystery box ticket
  • Inject in-game items
  • Inject alfa voucher (from reward pool)
  1. Player API Reference

Inventory

Get inventory item

GET /v3/inventory

Headers

Name
Value

X-Api-Key*

API Key

Authorization*

Bearer <token>

Response

{
    "status": "success",
    "messages": "Inventory retrieved from database",
    "data": [
        {
            "inventory_id": "01HJ02C1TWCPEMHEWGQNZQ5TKK",
            "game_internal_id": "ship_y471_maikaze",
            "komo_item_name": "Y471 HSF Maikaze",
            "is_transferable": 0
        },
        {
            "inventory_id": "01HJ02PS54E5K1MHKK5DSAWWKF",
            "game_internal_id": "ship_y471_maikaze",
            "komo_item_name": "Y471 HSF Maikaze",
            "is_transferable": 0
        },
        {
            "inventory_id": "01HH4AAHAK8X7861JFJA5R67C9",
            "game_internal_id": "ship_y083_sarushima",
            "komo_item_name": "Y083 LCS Sarushima",
            "is_transferable": 0
        },
        {
            "inventory_id": "01J7ZMW9Q8Y20ZNN7HYQJF0VWP",
            "game_internal_id": "ship_kri_antasena",
            "komo_item_name": "KRI Antasena",
            "is_transferable": 0
        },
        {
            "inventory_id": "01HHKXM99KSD9H0B7JBH57S70Z",
            "game_internal_id": "ship_y467_harekaze",
            "komo_item_name": "Y467 HSF Harekaze",
            "is_transferable": 0
        },
        {
            "inventory_id": "01J8F2RJYZ238YF7CR5KTB5J49",
            "game_internal_id": "battle_pass_12.5",
            "komo_item_name": "Battle Pass Season 12.5",
            "is_transferable": 1
        },
        {
            "inventory_id": "01J8F2RJYZ238YF7CR5KTB5J4A",
            "game_internal_id": "battle_pass_12.5",
            "komo_item_name": "Battle Pass Season 12.5",
            "is_transferable": 0
        }
    ]
}

Disable Inventory Transfer

POST /v3/inventory/disable-transfer

Headers

Name
Value

X-API-Key

API Key

Authorization

Bearer <token>

Body

Name
Type
Description

inventory_id

string

Inventory ID

Response

{
    "status": "success",
    "messages": "Inventory updated"
}
{
    "status": "error",
    "messages": {
        "updateFailed": "Failed to update inventory"
    }
}

Remove item from inventory

POST /v3/inventory/remove

Headers

Name
Value

X-Api-Key*

API Key

Authorization*

Bearer <token>

Body

Name
Type
Description

inventory_id*

string

Inventory ID

Response

{
    "status": "success",
    "messages": "Inventory removed"
}
{
    "status": "error",
    "messages": {
        "inventory_id": "The selected inventory id is invalid."
    }
}
{
    "status": "error",
    "messages": {
        "invalidOwner": "Invalid inventory owner"
    }
}
{
    "status": "error",
    "messages": {
        "invalidGame": "This game is not authorized to remove this item"
    }
}

Inject mystery box ticket

POST /v3/inventory/inject/mystery-box-ticket

Headers

Name
Value

X-API-Key*

API Key

Authorization*

Bearer <token>

Body

Name
Type
Description

qty*

string

amount of ticket injected

Response

{
    "status": "success",
    "messages": "Mystery box ticket added"
}

Inject in-game items

POST /v3/inventory/inject/in-game-item

Before injecting to inventory, make sure the item is available on database alphagames game_items table

Headers

Name
Value

X-Api-Key*

API Key

Authorization*

Bearer <token>

Body

Name
Type
Description

item_list*

string

Stringified json of game_internal_id and qty. Example below

Example Payload

{
    "item_list": "[{\"game_internal_id\":\"life_30_minutes\",\"qty\":2},{\"game_internal_id\":\"other_internal_id\",\"qty\":3}]"
}

Response

{
    "status": "success",
    "messages": "Item injected successfully"
}
{
    "status": "error",
    "messages": {
        "itemNotExists": "Item with game_internal_id other_internal_id is not exist"
    }
}

Inject alfa voucher (from reward pool)

POST /v3/inventory/inject/voucher

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description

name

string

Name of the user

age

number

Age of the user

Response

{
    "status": "success",
    "messages": "All voucher injected successfully"
}
{
    "status": "error",
    "messages": {
        "stockBelowMargin": "Voucher stock for 25000 is below allowed margin."
    }
}
// qty is not integer or below 1
{
    "status": "error",
    "messages": {
        "invalidQty": "Invalid qty"
    }
}

// voucher_value is not available on database
{
    "status": "error",
    "messages": {
        "invalidVoucherValue": "Invalid voucher_value"
    }
}
PreviousNFT and Wallet PortfolioNextFriend

Last updated 7 months ago

🎒