API ドキュメント

WMS 在庫 API

最終更新 2026-10-13

在庫残高の照会、在庫調整、ロケーション間移動。

在庫の照会#

GET /api/wms/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
  • wms_inventory_balance 残高プロジェクション(商品 × ロケーション × ステータス × ロット)を読み取ります。
  • 権限:いずれかの作業ドメインの view ポイント。

在庫調整#

POST /api/wms/inventory/adjust
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 か qty_delta のどちらか一方を必須。
  • wms.inventory_adjust は特別な権限ポイントで、明示的な付与が必要です。

在庫移動#

POST /api/wms/inventory/move
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": "补货上架"
}
調整は wms_inventory_ledger(transaction_type=adjust)にのみ書き込み、wms_inventory_balance には直接触れません。棚卸タスクでロックされたロケーションからの移動は LOCATION_LOCKED になります。