Inventory tools
Updated May 21, 20261 min read
6 tools for working with stock levels across the merchant's
fulfillment locations. Two write models — update_inventory for
absolute snapshots, adjust_inventory for relative deltas — keep
ingestion clean whether your source-of-truth feeds totals or movements.
Snapshot vs delta — pick the right one
update_inventory sets the on-hand quantity to the value you supply
(snapshot). adjust_inventory adds or subtracts from the current
value (delta). Mixing these up in an ingestion job has caused real
inventory drift — pick one based on what your source system emits and
stick with it for that product/location pair.
Reads
| Tool | What it returns |
|---|---|
get_inventory | Current stock for one product across all locations. |
list_inventory | Inventory rows with paging, sorting, search, and merchant filters. |
get_inventory_history | Inventory event history for one product — useful for debugging drift. |
Writes
| Tool | What it does |
|---|---|
update_inventory | Submit a snapshot — sets on-hand absolutely. |
adjust_inventory | Submit a delta — adds or subtracts from current. |
transfer_inventory | Move on-hand quantity between two locations atomically. |