ESTAGE Support
IdeasMy tickets

Change the on-hand count

Permission inventory:writeRate limit writesIdempotent with Idempotency-Key

Adds 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.

POSThttps://api.estage.com/v1/variants/{id}/inventory/adjust

Authorization

ESTAGE-API-Keystringheaderrequired

A project key, est_live_…, from Settings → API keys. Call from server code only.

Path parameters

idintegerrequired

Body

application/json
deltaintegerrequired≥ -100000≤ 100000

Signed change; 0 is rejected.

reasonstringnullabledefault "adjustment"

One of received, adjustment

notestringnullable≤ 255 chars

Headers

Idempotency-Keystring≤ 255 chars

Any 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 } }.