inventory
What the current character is carrying and wearing.
Every item comes back fully resolved against the game's design data: rolled stats decoded and named, gear score, what a vendor pays, footprint, stack rules and an icon URL. There is no second lookup to do.
Request
POST /api/v1/sessions/{accountKey}/actions/inventory
Takes no arguments.
Response
`{ items, backpack, equipment, backpackGrid, equipmentSlots }`. `items` is the union; the other two are views of it.
| Field | Type | Meaning |
|---|---|---|
items[].uid | string | The item's unique id, and what every move/sell/list action takes. Exceeds 2^53, so it travels as a string. |
items[].primary | object[] | The rolled stats: `{id, name, label, value}` each. `name` is the stable key; `label` is for people. |
items[].gearScore | integer | The item's gear score, from the design data. |
items[].vendorPrice | integer|null | What a merchant pays for it. Null — not 0 — when it cannot be sold at all; 0 is a real price for a Poor-tier item. |
items[].tradable | boolean | Whether the item type may be traded. `tradeState` carries the wire's per-copy flag. |
items[].slotId | integer | Its grid position. 0 is the valid top-left cell, not "unplaced". |
items[].width | integer | Footprint in cells, with `height` — enough to lay the grid out without a lookup. |
backpackGrid | object | `{cols, rows}` for the backpack. |
Example response
{
"items": [
{
"uid": "630211546215118851",
"id": "DesignDataItem:Id_Item_AdventurerBoots_3001",
"baseId": "Id_Item_AdventurerBoots_3001",
"shortName": "AdventurerBoots",
"label": "Adventurer Boots",
"rarity": "Uncommon",
"category": "Feet",
"type": "Armor",
"slot": "Feet",
"gearScore": 15,
"count": 1,
"maxStack": 1,
"stackable": false,
"contents": 0,
"gold": false,
"goldCapacity": 0,
"ammo": 0,
"lootState": 0,
"tradable": true,
"tradeState": 1,
"vendorPrice": 12,
"vendorMerchant": "Weaponsmith",
"originName": "",
"inventoryId": 3,
"slotId": 5,
"width": 2,
"height": 2,
"iconKey": "AdventurerBoots",
"iconUrl": "/icons/AdventurerBoots.png",
"primary": [
{ "id": "DesignDataItemPropertyType:Id_ItemPropertyType_Effect_PhysicalDamageReduction",
"name": "PhysicalDamageReduction", "label": "Physical Damage Reduction", "value": 2.4 }
],
"secondary": [
{ "id": "DesignDataItemPropertyType:Id_ItemPropertyType_MoveSpeed",
"name": "MoveSpeed", "label": "Move Speed", "value": -0.5 }
]
}
],
"backpack": [],
"equipment": [ { "uid": "630211546215118851", "inventoryId": 3, "slotId": 5 } ],
"backpackGrid": { "cols": 10, "rows": 5 },
"equipmentSlots": [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]
}
Errors
| Code | When |
|---|---|
action_failed | No character is in the lobby, or the read timed out. |
See also
DarkerAPI is an independent project. It is not affiliated with, endorsed by or associated with IRONMACE Co., Ltd. or Valve Corporation. “Dark and Darker” and related marks belong to their respective owners.