Inventory
Aisle-level stock for your machines. Each machine has numbered aisles (slots) holding one product each.
Get bulk inventory
GET /api/v1/inventory — scope inventory:read
Inventory for multiple machines in one call, keyed by machineNo.
Pass machineNos as a comma-separated list or repeated params; omit for all
your machines.
curl "https://api.kiosk-x.ai/api/v1/inventory?machineNos=866903013700011,866903013700022" \
-H "X-API-Key: vtm_e08725ea09876af65f431c6a3742d7c0"
{
"code": 200, "message": "success",
"data": {
"866903013700011": [
{"machineNo": "866903013700011", "aisleNo": 1, "productName": "Aurora Sparkling Water",
"currentStock": 8, "maxStock": 10, "sellingPrice": 5.99, "faulted": false}
],
"866903013700022": [ ... ]
}
}
Get machine inventory
GET /api/v1/inventory/machines/{machineNo} — scope inventory:read
All aisles with full detail:
{
"code": 200, "message": "success",
"data": [{
"aisleNo": 1,
"productName": "Aurora Sparkling Water",
"productCode": "DRK-SW",
"productImageUrl": "https://intelli-verse-x-media.s3.us-east-1.amazonaws.com/kiosk-x/products/prod-drk-sw.png",
"currentStock": 8, "maxStock": 10,
"alertThreshold": 2,
"sellingPrice": 5.99,
"faulted": false
}]
}
Restock machine
POST /api/v1/inventory/machines/{machineNo}/restock — scope inventory:write
Sets aisles to max stock. Omit the body (or send {"aisles": []}) to restock all aisles.
curl -X POST https://api.kiosk-x.ai/api/v1/inventory/machines/866903013700011/restock \
-H "X-API-Key: vtm_e08725ea09876af65f431c6a3742d7c0" \
-H "Content-Type: application/json" \
-d '{"aisles": [1, 2, 3]}'
Returns the updated aisles.
Update aisle
PUT /api/v1/inventory/machines/{machineNo}/aisles/{aisleNo} — scope inventory:write
Partial update of a single aisle:
| Body field | Type | Constraint |
|---|---|---|
currentStock |
int | ≥ 0 (capped at maxStock) |
maxStock |
int | ≥ 0 |
sellingPrice |
number | ≥ 0 |
alertThreshold |
int | ≥ 0 |
faulted |
bool | mark/clear aisle fault |
curl -X PUT https://api.kiosk-x.ai/api/v1/inventory/machines/866903013700011/aisles/1 \
-H "X-API-Key: vtm_e08725ea09876af65f431c6a3742d7c0" \
-H "Content-Type: application/json" \
-d '{"sellingPrice": 6.49, "alertThreshold": 3}'
In the real VTM system inventory changes reach the machine on its next heartbeat (a few minutes). The sandbox applies them instantly.