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

ToolWhat it returns
get_inventoryCurrent stock for one product across all locations.
list_inventoryInventory rows with paging, sorting, search, and merchant filters.
get_inventory_historyInventory event history for one product — useful for debugging drift.

Writes

ToolWhat it does
update_inventorySubmit a snapshot — sets on-hand absolutely.
adjust_inventorySubmit a delta — adds or subtracts from current.
transfer_inventoryMove on-hand quantity between two locations atomically.