Change the on-hand count
Permission
inventory:writeRate limit writesIdempotent with Idempotency-KeyAdds delta (signed, not 0, within ±100000) to the on-hand count and writes a ledger entry. reason: received | adjustment (default adjustment). On-hand may not drop below what is reserved. An unknown variant is a 422, not a 404. Send an Idempotency-Key header to make retries safe.
Authorization
ESTAGE-API-KeystringheaderrequiredA project key, est_live_…, from Settings → API keys. Call from server code only.
Path parameters
idintegerrequiredBody
application/jsondeltaintegerrequired≥ -100000≤ 100000Signed change; 0 is rejected.
reasonstringnullabledefault "adjustment"One of received, adjustment
notestringnullable≤ 255 charsHeaders
Idempotency-Keystring≤ 255 charsAny unique string per attempt. A retry with the same key gets the first answer back instead of doing the work twice.
RequestcURL
curl --request POST \ --url 'https://api.estage.com/v1/variants/variant-id/inventory/adjust' \ --header 'ESTAGE-API-Key: est_live_your-api-key' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: your-unique-key' \ --data '{ "delta": 24, "reason": "received", "note": "PO-2291 delivery" }'
OK
{
"data": {
"variant_id": 30442,
"on_hand": 32,
"reserved": 1,
"available": 31
}
}Example. Errors are
{ error: { code, message, details } }.