跳至主要內容
登入
Apus Platform
文件目錄
inventory

Inventory

Real-time stock — on-hand, reserved and available quantities by SKU and warehouse — plus the warehouses, bins, lots, serials, adjustments, transfers and reservations that move it. The operational balance-sheet inventory that sales, purchasing and manufacturing draw down and replenish. Every mutation is an auditable event.

GET/v1/inventoryScope: inventory:read

List stock levels

Returns on-hand, reserved and available quantities per SKU per warehouse. Filter to items at or below their reorder point to drive replenishment.

Query parameters
skuoptionalstringFilter by stock-keeping unit.
warehouse_idoptionalstringFilter by warehouse id.
below_reorderoptionalbooleanOnly SKUs at or below their reorder point.
limitoptionalintegerPage size, 1–200 (default 50).
cursoroptionalstringPagination cursor from a previous response.
Request
curl "https://api.apusplatform.com/v1/inventory" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "data": [
    {
      "sku": "STEEL-BRKT-08",
      "warehouse_id": "wh_hcm",
      "on_hand": 1840,
      "reserved": 320,
      "available": 1520,
      "reorder_point": 500,
      "below_reorder": false,
      "updated_at": "2026-07-20T03:14:52Z"
    }
  ],
  "has_more": true,
  "next_cursor": "crsr_inv_2f"
}
GET/v1/inventory/{sku}Scope: inventory:read

Retrieve stock for a SKU

Returns aggregated stock for one SKU across every warehouse, plus a per-warehouse breakdown.

Path parameters
skurequiredstringStock-keeping unit.
Request
curl "https://api.apusplatform.com/v1/inventory/STEEL-BRKT-08" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "sku": "STEEL-BRKT-08",
  "unit": "pcs",
  "totals": {
    "on_hand": 2650,
    "reserved": 320,
    "available": 2330
  },
  "warehouses": [
    {
      "warehouse_id": "wh_hcm",
      "on_hand": 1840,
      "reserved": 320,
      "available": 1520
    },
    {
      "warehouse_id": "wh_hanoi",
      "on_hand": 810,
      "reserved": 0,
      "available": 810
    }
  ],
  "updated_at": "2026-07-20T03:14:52Z"
}
POST/v1/inventory/adjustmentsScope: inventory:write

Adjust stock

Records a signed stock adjustment against a SKU at a warehouse. Use a positive quantity_delta to add, a negative one to remove. Every adjustment is an auditable event with a reason.

Body
skurequiredstringStock-keeping unit.
warehouse_idrequiredstringWarehouse the adjustment applies to.
quantity_deltarequiredintegerSigned quantity change (negative removes stock).
reasonrequiredstringOne of cycle_count, damage, correction.
noteoptionalstringFree-text memo kept on the audit trail.
Request
curl -X POST "https://api.apusplatform.com/v1/inventory/adjustments" \
  -H "Authorization: Bearer $APUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "sku": "STEEL-BRKT-08",
    "warehouse_id": "wh_hcm",
    "quantity_delta": -12,
    "reason": "damage",
    "note": "Water damage during monsoon transit"
  }'
Response
{
  "id": "adj_7d21",
  "sku": "STEEL-BRKT-08",
  "warehouse_id": "wh_hcm",
  "quantity_delta": -12,
  "reason": "damage",
  "on_hand": 1828,
  "created_at": "2026-07-20T03:20:00Z"
}
POST/v1/inventory/transfersScope: inventory:write

Transfer stock

Moves stock of a SKU from one warehouse to another. The quantity is deducted from the source on creation and received at the destination when the transfer completes.

Body
skurequiredstringStock-keeping unit.
from_warehouse_idrequiredstringSource warehouse id.
to_warehouse_idrequiredstringDestination warehouse id.
quantityrequiredintegerQuantity to move (positive).
Request
curl -X POST "https://api.apusplatform.com/v1/inventory/transfers" \
  -H "Authorization: Bearer $APUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "sku": "STEEL-BRKT-08",
    "from_warehouse_id": "wh_hcm",
    "to_warehouse_id": "wh_hanoi",
    "quantity": 200
  }'
Response
{
  "id": "trf_5c90",
  "sku": "STEEL-BRKT-08",
  "from_warehouse_id": "wh_hcm",
  "to_warehouse_id": "wh_hanoi",
  "quantity": 200,
  "status": "in_transit",
  "created_at": "2026-07-20T03:25:00Z"
}
GET/v1/inventory/warehousesScope: inventory:read

List warehouses

Returns the warehouses (and distribution centers) stock is held in.

No parameters.

Request
curl "https://api.apusplatform.com/v1/inventory/warehouses" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "data": [
    {
      "id": "wh_hcm",
      "code": "HCM-01",
      "name": "Ho Chi Minh DC",
      "type": "distribution",
      "active": true
    },
    {
      "id": "wh_hanoi",
      "code": "HN-01",
      "name": "Hanoi warehouse",
      "type": "storage",
      "active": true
    }
  ]
}
POST/v1/inventory/warehousesScope: inventory:write

Create a warehouse

Creates a warehouse. code must be unique.

Body
coderequiredstringUnique warehouse code.
namerequiredstringDisplay name.
addressoptionalstringPhysical address.
Request
curl -X POST "https://api.apusplatform.com/v1/inventory/warehouses" \
  -H "Authorization: Bearer $APUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "DN-01",
    "name": "Da Nang warehouse",
    "address": "48 Bach Dang, Hai Chau, Da Nang"
  }'
Response
{
  "id": "wh_danang",
  "code": "DN-01",
  "name": "Da Nang warehouse",
  "created_at": "2026-07-20T03:30:00Z"
}
GET/v1/inventory/warehouses/{id}Scope: inventory:read

Retrieve a warehouse

Returns a single warehouse by its id.

Path parameters
idrequiredstringWarehouse id.
Request
curl "https://api.apusplatform.com/v1/inventory/warehouses/wh_hcm" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "id": "wh_hcm",
  "code": "HCM-01",
  "name": "Ho Chi Minh DC",
  "type": "distribution",
  "address": "12 Nguyen Van Linh, District 7, Ho Chi Minh City",
  "bins_count": 240,
  "active": true,
  "created_at": "2025-01-08T09:00:00Z"
}
GET/v1/inventory/warehouses/{id}/binsScope: inventory:read

List bins

Returns the storage bins (locations) within a warehouse.

Path parameters
idrequiredstringWarehouse id.
Request
curl "https://api.apusplatform.com/v1/inventory/warehouses/{id}/bins" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "data": [
    {
      "id": "bin_a1",
      "code": "A-01-01",
      "zone": "A",
      "type": "pick",
      "occupied": true
    },
    {
      "id": "bin_a2",
      "code": "A-01-02",
      "zone": "A",
      "type": "bulk",
      "occupied": false
    }
  ]
}
GET/v1/inventory/lotsScope: inventory:read

List lots

Returns tracked lots/batches with their quantities and expiry dates. Filter by SKU or warehouse.

Query parameters
skuoptionalstringFilter by stock-keeping unit.
warehouse_idoptionalstringFilter by warehouse id.
limitoptionalintegerPage size, 1–200 (default 50).
cursoroptionalstringPagination cursor from a previous response.
Request
curl "https://api.apusplatform.com/v1/inventory/lots" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "data": [
    {
      "id": "lot_88f2",
      "sku": "PAINT-WHT-5L",
      "lot_number": "L2026-0142",
      "warehouse_id": "wh_hcm",
      "quantity": 340,
      "expires_at": "2027-03-31",
      "unit_cost": {
        "amount": 210000,
        "currency": "VND"
      }
    }
  ],
  "has_more": false,
  "next_cursor": null
}
GET/v1/inventory/lots/{id}Scope: inventory:read

Retrieve a lot

Returns a single lot/batch by its id.

Path parameters
idrequiredstringLot id.
Request
curl "https://api.apusplatform.com/v1/inventory/lots/lot_88f2" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "id": "lot_88f2",
  "sku": "PAINT-WHT-5L",
  "lot_number": "L2026-0142",
  "warehouse_id": "wh_hcm",
  "quantity": 340,
  "manufactured_at": "2026-04-02",
  "expires_at": "2027-03-31",
  "unit_cost": {
    "amount": 210000,
    "currency": "VND"
  },
  "status": "available"
}
GET/v1/inventory/serialsScope: inventory:read

List serial numbers

Returns serial-tracked units and their current status. Filter by SKU or status.

Query parameters
skuoptionalstringFilter by stock-keeping unit.
statusoptionalstringFilter by status: in_stock, reserved, shipped, returned.
limitoptionalintegerPage size, 1–200 (default 50).
cursoroptionalstringPagination cursor from a previous response.
Request
curl "https://api.apusplatform.com/v1/inventory/serials" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "data": [
    {
      "id": "srl_4410",
      "sku": "LAPTOP-14-PRO",
      "serial_number": "SN-2026-004410",
      "warehouse_id": "wh_hcm",
      "status": "in_stock"
    },
    {
      "id": "srl_4411",
      "sku": "LAPTOP-14-PRO",
      "serial_number": "SN-2026-004411",
      "status": "shipped"
    }
  ],
  "has_more": true,
  "next_cursor": "crsr_srl_7a"
}
GET/v1/inventory/reservationsScope: inventory:read

List reservations

Returns active stock reservations. Filter by SKU or by the order they back.

Query parameters
skuoptionalstringFilter by stock-keeping unit.
order_idoptionalstringFilter by the order the reservation backs.
limitoptionalintegerPage size, 1–200 (default 50).
cursoroptionalstringPagination cursor from a previous response.
Request
curl "https://api.apusplatform.com/v1/inventory/reservations" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "data": [
    {
      "id": "rsv_2c81",
      "sku": "STEEL-BRKT-08",
      "warehouse_id": "wh_hcm",
      "quantity": 320,
      "order_id": "so_9f30",
      "status": "active",
      "created_at": "2026-07-19T10:02:00Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
POST/v1/inventory/reservationsScope: inventory:write

Reserve stock

Reserves available stock of a SKU at a warehouse, moving it from available to reserved. Optionally tie the reservation to a sales order.

Body
skurequiredstringStock-keeping unit.
warehouse_idrequiredstringWarehouse to reserve from.
quantityrequiredintegerQuantity to reserve (positive).
order_idoptionalstringSales order the reservation backs.
Request
curl -X POST "https://api.apusplatform.com/v1/inventory/reservations" \
  -H "Authorization: Bearer $APUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "sku": "STEEL-BRKT-08",
    "warehouse_id": "wh_hcm",
    "quantity": 50,
    "order_id": "so_9f30"
  }'
Response
{
  "id": "rsv_2c82",
  "sku": "STEEL-BRKT-08",
  "warehouse_id": "wh_hcm",
  "quantity": 50,
  "order_id": "so_9f30",
  "status": "active",
  "expires_at": "2026-07-27T03:35:00Z",
  "created_at": "2026-07-20T03:35:00Z"
}
POST/v1/inventory/stock-countsScope: inventory:write

Open a stock count

Opens a physical stock-count (cycle count or full inventory) for a warehouse. Counted quantities are reconciled against the system on close.

Body
warehouse_idrequiredstringWarehouse to count.
scopeoptionalstringOne of full, partial (default full).
Request
curl -X POST "https://api.apusplatform.com/v1/inventory/stock-counts" \
  -H "Authorization: Bearer $APUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "warehouse_id": "wh_hcm",
    "scope": "partial"
  }'
Response
{
  "id": "cnt_6712",
  "warehouse_id": "wh_hcm",
  "scope": "partial",
  "status": "open",
  "created_at": "2026-07-20T03:40:00Z"
}

準備好整合了嗎?

在帳戶主控台中建立 API 用戶端以取得憑證,或與整合工程師討論您的使用情境。

noindex