Skip to content

Inventory ​

This page explains how to query available stock through the API, stock details by location / batch, and the total available quantity of a single SKU.

Available quantity = on-hand quantity − frozen quantity. The frozen quantity is the portion locked by orders that have not yet shipped.

Endpoints at a Glance ​

MethodPathPurposescope
GET/open-api/v1/oms/inventoryThis customer's available stock (summarized by warehouse + SKU)oms:read
GET/open-api/v1/inventory/now-stockReal-time inventory summaryinventory:read
GET/open-api/v1/inventory/pageStock details (location / batch level)inventory:read
GET/open-api/v1/inventory/{id}A single stock recordinventory:read
GET/open-api/v1/inventory/availableTotal available quantity of a SKUinventory:read

/oms/inventory accepts only customer Keys. For /inventory/**, a customer Key sees its own inventory, and a warehouse Key sees inventory in its visible warehouses.

Available Stock (Summary) ​

GET /open-api/v1/oms/inventory, or GET /open-api/v1/inventory/now-stock (same parameters and response)

Summarized by customer + warehouse + SKU.

ParameterRequiredDescription
skuCodeNoFuzzy match
warehouseIdNoWarehouse ID; empty result for a warehouse that is not visible
pageNum / pageSizeRecommended
Response fieldDescription
skuCode / productNameSKU code / name
warehouseId / warehouseNameWarehouse
totalQtyOn-hand quantity
frozenQtyFrozen (locked) quantity
availableQtyAvailable quantity
locationCountNumber of locations occupied
customerId / customerNameCustomer
bash
curl "https://api.vmwms.com/open-api/v1/oms/inventory?skuCode=SKU-A001&pageSize=100" \
  -H "x-api-key: <YOUR_API_KEY>.<YOUR_API_SECRET>"
json
{
  "total": 1,
  "rows": [
    {
      "customerId": "1800000000000000001",
      "customerName": "Demo Trading",
      "skuCode": "SKU-A001",
      "productName": "Desk Lamp",
      "warehouseId": "1800000000000000101",
      "warehouseName": "Demo Warehouse",
      "totalQty": "120.0000",
      "frozenQty": "8.0000",
      "availableQty": "112.0000",
      "locationCount": 3
    }
  ],
  "code": 200,
  "msg": "查询成功"
}

Stock Details ​

GET /open-api/v1/inventory/page

Shows each stock record by location and batch. Use it to check inventory age, container-number origin, and so on.

ParameterDescription
skuCodeFuzzy match
warehouseIdWarehouse ID
locationIdLocation ID
batchNoBatch number
receiptNoInbound order number
keywordFuzzy match on SKU / product name / inbound order number / batch
pageNum / pageSize

Main response fields: id, skuCode, productName, warehouseId, warehouseName, zoneCode (zone), locationId, locationCode (location), batchNo, containerNo (container number), trackingNo, quantity (on hand), frozenQty, availableQty, receiptNo (inbound order number), inWhDate (warehouse entry time, usable to compute inventory age), dimensions and weight, boxQty, unitVolumeCbm, totalVolumeCbm, totalWeightKg.

bash
curl "https://api.vmwms.com/open-api/v1/inventory/page?skuCode=SKU-A001&pageNum=1&pageSize=100" \
  -H "x-api-key: <YOUR_API_KEY>.<YOUR_API_SECRET>"

A Single Stock Record ​

GET /open-api/v1/inventory/{id}

id comes from the id returned by the stock details endpoint. If the record does not exist or is outside your data scope, code 404 "Data does not exist" (数据不存在) is returned.

Total Available Quantity of a SKU ​

GET /open-api/v1/inventory/available

ParameterRequiredDescription
skuCodeYesSKU code
warehouseIdNoIf omitted, the total across all visible warehouses

data is the total available quantity (a string), or "0" if there is no stock.

bash
curl "https://api.vmwms.com/open-api/v1/inventory/available?skuCode=SKU-A001" \
  -H "x-api-key: <YOUR_API_KEY>.<YOUR_API_SECRET>"
json
{ "code": 200, "msg": "操作成功", "data": "112" }

Beware of codes that contain other codes

This endpoint currently matches skuCode by "contains": querying SKU-A1 also totals the available quantity of codes such as SKU-A1, SKU-A10, and SKU-A1-RED. For the exact value of a single SKU, call now-stock and filter the results by exact skuCode.

FAQ ​

Why does the available stock differ from the number shown on the OMS page? ​

Make sure you are comparing the same measure: available = on hand − frozen. Quantities on orders that have been placed but not yet shipped count as frozen, not available. Also make sure you compare for the same warehouse.

How do I tell whether a SKU can still ship N units? ​

Call now-stock (with skuCode and warehouseId), find the exact skuCode match in the results, and check whether availableQty is ≥ N.

How do I check how much is left from a particular container? ​

Call the stock details endpoint and query by inbound order number using keyword or receiptNo. The returned containerNo is the container number.

How often should I sync inventory? ​

We recommend a full paginated pull no more often than every 5 to 10 minutes. When you need more real-time data, rely on order-placement results and Webhooks rather than polling at high frequency.