Skip to content
SoulFire LogoSoulFire

Get inventory state

GET
/v1/instances/{instance_id}/bots/{bot_id}/inventory

Returns the current state of the bot's open container/inventory. Includes layout information, slot contents, and carried item. The bot must be online with a valid player.

Authorization

headerAuthorizationBearer <JWT>

Preferred API authentication. Use a JWT with the api audience.

Path Parameters

instance_id*string

The UUID of the SoulFire instance containing the bot.

Formatuuid
bot_id*string

The profile UUID of the bot to get inventory state for.

Formatuuid

Response Body

Response containing the current inventory/container state.

application/json
  1. response

Response containing the current inventory/container state.

layout*

Layout information describing the container structure.

slots*array<>

All slots containing items (empty slots are omitted).

carriedItem?|

Item currently held on the cursor (being moved). Absent if cursor is empty.

selectedHotbarSlot*integer

Currently selected hotbar slot index (0-8).

Formatint32
Example Request
curl -X GET 'http://127.0.0.1:38765/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/bots/497f6eca-6276-4993-bfeb-53cbbbba6f08/inventory'
Example Response
{
  "layout": {
    "title": "string",
    "regions": [
      {
        "id": "string",
        "label": "string",
        "startIndex": 0,
        "slotCount": 0,
        "columns": 0,
        "type": "SLOT_REGION_NORMAL"
      }
    ],
    "totalSlots": 0,
    "buttons": [
      {
        "buttonId": 0,
        "label": "string",
        "iconItemId": "string",
        "description": "string",
        "disabled": true,
        "selected": true
      }
    ],
    "containerType": "string",
    "textInputs": [
      {
        "id": "string",
        "label": "string",
        "currentValue": "string",
        "maxLength": 0,
        "placeholder": "string"
      }
    ],
    "bookPages": [
      {
        "pageNumber": 0,
        "content": "string"
      }
    ],
    "currentBookPage": 0
  },
  "slots": [
    {
      "slot": 0,
      "itemId": "string",
      "count": 0,
      "displayName": "string",
      "iconBase64": "string",
      "iconMimeType": "string"
    }
  ],
  "carriedItem": {
    "slot": 0,
    "itemId": "string",
    "count": 0,
    "displayName": "string",
    "iconBase64": "string",
    "iconMimeType": "string"
  },
  "selectedHotbarSlot": 0
}

Was this page helpful?