Skip to content

Inventory API

Stock Levels

GET /api/v1/inventory

Returns current stock levels for all products and their variants.

Response

{
"data": [
{
"product_id": "prod-uuid-1",
"product_name": "Premium Arabic Coffee",
"sku": "COF-001",
"stock": 150,
"variants": [
{
"variant_id": "var-uuid-1",
"variant_name": "250g",
"sku": "COF-001-250",
"stock": 80
}
],
"last_modified": "2026-04-20T10:30:00Z"
}
]
}

Stock Movements

GET /api/v1/inventory/movements

Returns the stock change audit log.

Query Parameters

ParameterTypeDescription
limitintegerItems per page (1-200, default 50)
product_idstringFilter by product
sincestringOnly movements after this ISO date

Movement Reasons

ReasonDescription
saleStock decreased by order
refundStock restored by refund
cancelStock restored by cancellation
adjustmentManual stock adjustment
bulk_importBulk CSV import