update_inventory

Updated May 21, 20261 min read

Set absolute inventory values by submitting snapshot inventory events. If both on_hand and unavailable are provided, this creates a SNAPSHOT event. If only one field is provided, it creates SNAPSHOT_ONHAND or SNAPSHOT_UNAVAILABLE.

Parameters

NameTypeRequiredDescription
event_timestampstringYesISO 8601 event timestamp. Backend rejects future timestamps and timestamps older than the tolerance window.
location_idstringYes
product_idstringYes
tenantIdstringYes
on_handnumberNoAbsolute on-hand quantity to set.
reasonstringNo
unavailablenumberNoAbsolute unavailable quantity to set.

Example agent prompt

"Update the inventory."

update_inventory(
  tenantId="…",
  product_id="PROD-1234",
  location_id="DXB-WH-01",
  event_timestamp=…
)