Inventory
Inventory
Read and adjust stock for a variant across your warehouses. These endpoints work
per variant; a variant can hold stock in more than one warehouse.
Requires data:read to read levels and data:write:inventory (or
data:write:*) to adjust.
Read stock levels
GET /papi/v1/variants/{variant_id}/inventory
{
"variantId": "…",
"sku": "WAX-PREM-500",
"levels": [
{
"warehouseId": "…",
"onHand": 120,
"reserved": 8,
"incoming": 50,
"available": 112,
"backorderable": false
}
]
}
| Field | Meaning |
|---|---|
onHand |
Physical quantity in the warehouse |
reserved |
Held for open orders |
incoming |
Expected via purchase orders / transfers |
available |
onHand − reserved — what a storefront can sell |
backorderable |
Whether the variant can be sold below zero available |
Adjust stock
POST /papi/v1/inventory/adjust
Identify the variant by variantId or sku, and the warehouse by
warehouseId or warehouseCode. Then either set an absolute quantity or
apply a delta:
| Field | Notes |
|---|---|
variantId / sku |
Identify the variant (one is required) |
warehouseId / warehouseCode |
Identify the warehouse (one is required) |
setOnHand |
Set the on-hand quantity to this exact value |
deltaOnHand |
Add (or subtract, if negative) this amount |
note |
Optional reason recorded with the adjustment |
Send exactly one of setOnHand or deltaOnHand.
# Receive 25 more units into the main warehouse
curl -X POST https://api-v1.zingasuite.com/papi/v1/inventory/adjust \
-H "Authorization: Bearer zk_live_xxx" \
-H "Content-Type: application/json" \
-d '{ "sku": "WAX-PREM-500", "warehouseCode": "MAIN", "deltaOnHand": 25, "note": "PO-1042" }'
{ "variantId": "…", "warehouseId": "…", "onHand": 145, "available": 137 }
How storefronts use stock
A storefront shows a variant as in stock based on available across the
warehouses mapped to that storefront. Manual availability flags (preorder,
backorder, discontinued) set in the console take precedence over the computed
value. See the ZingaShop Inventory guide for details.