WMS Inventory API
Last updated 2026-10-13
Query inventory balances, adjust inventory, and move stock between locations.
Query inventory#
GET /api/wms/inventory?warehouse_id=<uuid>&item_id=<uuid>&status=available&page=1&page_size=20
// filters: warehouse_id | location_id | location (code) | item_id | sku | merchant_id | status
// status: available | allocated | hold | damaged | in_transit- Reads the wms_inventory_balance projection (item × location × status × lot).
- Permission: any operational view point (inbound / outbound / putaway / picking / packing / cycle_count / transfer / billing).
Adjust inventory#
POST /api/wms/inventory/adjust
{
"warehouse_id": "<uuid>", // required
"location_id": "<uuid>", // required
"item_id": "<uuid>", // required
"qty_delta": -5, // or qty_after — exactly one is required
"reason_code": "damage", // required, e.g. damage | lost | found
"lot_no": "LOT-001",
"merchant_id": "<uuid>", // required in 3PL edition
"status": "available" // default available
}- qty_after or qty_delta — pass exactly one of them.
- Permission wms.inventory_adjust is a special point: it must be explicitly granted.
Move inventory#
POST /api/wms/inventory/move
{
"warehouse_id": "<uuid>", // required
"to_location_id": "<uuid>", // required
"pallet_lpn": "LPN-20261013-ABC123", // pallet move…
// …or loose stock move:
// "from_location_id": "<uuid>", "item_id": "<uuid>", "qty": 10, "lot_no": "LOT-001",
"notes": "补货上架"
}Adjustment writes only the wms_inventory_ledger (transaction_type=adjust); it never touches wms_inventory_balance directly — the balance projection is maintained by the app layer. Moving from a location locked by a count task fails with LOCATION_LOCKED.