Set a product's units on hand per location and lot, absolutely, through the inventory kernel

Each level sets onHand (available + allocated + on hold) at a location (a warehouseId addresses its floor location) for one lot (lotNumber or lotId; neither: the stock without a lot). The whole request is ONE stock move in one transaction. A level equal to the stock on hand is unchanged (no ledger row, no message); a product excluded from inventory tracking, or a tenant with tracking off, answers every level skipped. At most 100 levels. 404 unknown product; 422 unresolved_reference (a location, warehouse or lot that does not resolve, a queue location, a group container, a lot the product's lot policy refuses) or inventory_unavailable (onHand below what allocated or on hold keeps); 409 state_conflict, retryable, when another write moved the stock meanwhile.

Scope: products:write, channel:write or admin.

Idempotency: send Idempotency-Key; a retry with the same key replays the first answer.

Rate limit: write class, 1,200 requests per minute per tenant by default (read class 6,000). Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; a refusal is 429 rate_limited with Retry-After.

Path Params
string
required
length between 1 and 300

The uuid, a legacy 24-hex id, or ext:: (URL-encoded).

Body Params
levels
array of objects
required
length between 1 and 100
levels*
string
^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|[0-9a-fA-F]{24})$

A uuid, or a legacy 24-hex id.

string
^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|[0-9a-fA-F]{24})$

A uuid, or a legacy 24-hex id.

string
length between 1 and 255

The product's lot with this lot number.

string
^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|[0-9a-fA-F]{24})$

A uuid, or a legacy 24-hex id.

integer
required
0 to 1000000000

Units on hand (available + allocated + on hold) at the location and lot, absolute.

string
length between 1 and 255

Recorded on the stock ledger rows of this level.

Headers
string
length between 7 and 50

Any string of 7 to 50 characters that identifies this request (an order number, a webhook id). A retry with the same key and the same body answers the first result with Idempotent-Replayed: true; the same key with a different body is 422 idempotency_key_reused; a concurrent request with the same key is 409 in_progress with Retry-After. Recommended on every write.

Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json