adjust_inventory

Updated September 30, 20261 min read

Adjust inventory by relative deltas rather than absolute replacement. Positive values increase stock and negative values decrease stock. Pass either on_hand_delta or unavailable_delta. Stock is identified by inventory_key only; to start from a product, read its inventory_key with get_product or get_inventory first.

Parameters

NameTypeRequiredDescription
event_timestampstringYesISO 8601 event timestamp. Backend rejects future timestamps and timestamps older than the tolerance window.
inventory_keystringYesInventory to write to.
location_idstringYes—
tenantIdstringYes—
on_hand_deltanumberNoRelative on-hand adjustment. Positive adds stock, negative removes stock.
reasonstringNo—
unavailable_deltanumberNoRelative unavailable adjustment. Positive adds unavailable stock, negative removes it.

Example agent prompt

"Adjust the inventory."

adjust_inventory(
  tenantId="…",
  inventory_key="INV-1234",
  location_id="DXB-WH-01",
  event_timestamp=…
)