Inventory
Record an authorized stock change
Record an authorized stock change. Requires the MANAGER role. Idempotent: send an Idempotency-Key.
__Host-qm_session<token>
Session cookie set by sign-in on HTTPS deployments (the hosted demo).
In: cookie
Path Parameters
id*string
Resource id (UUID).
Format
uuidHeader Parameters
X-Requested-With*string
CSRF guard: must be quartermaster on every mutation.
Idempotency-Key*string
A unique key per user action; retries with the same key return the first result.
Length
8 <= length <= 128Request Body
application/json
An authorised stock change with a reason.
An authorised stock change with a reason.
quantity_delta*integer
Range
-1000000 <= value <= 1000000reason*string
Reason given by the person making the change.
Value in
- "COUNT_CORRECTION"
- "WASTE"
- "CONSUMPTION"
- "MANUAL_RECEIPT"
note?string
Optional note.
Length
length <= 500expected_on_hand?integer
Range
0 <= value <= 10000000Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/inventory/0f8fad5b-d9cb-469f-a165-70867728950e/adjustments" \ -H "X-Requested-With: quartermaster" \ -H "Idempotency-Key: 3b8c2c1e-6f6d-4a59-9a43-8f0c2a9e1d22" \ -H "Content-Type: application/json" \ -d '{ "quantity_delta": -20, "reason": "WASTE", "note": "Damaged sleeve" }'{ "item": { "id": "string", "sku": "string", "name": "string", "category": "food_packaging", "unit": "string", "on_hand": 0, "inbound_confirmed": 0, "committed": 0, "available": 0, "avg_daily_usage": 0, "lead_time_days": 0, "safety_stock": 0, "coverage_days": 0, "reorder_point": 0, "days_of_cover": 0, "status": "OK", "preferred_supplier_id": "string", "data_source": "CHANNEL3_MARKET", "search_query": "string", "keywords": [ "string" ], "lead_time_days_override": 0 }}