Inbound Forecasts
This page explains how to push inbound forecasts (ASNs) through the API, query shipment status, and query expected inbound forecasts that have not finished receiving.
Endpoints at a Glance
| Method | Path | Purpose | scope |
|---|---|---|---|
| POST | /open-api/v1/oms/inbound | Push an inbound forecast | oms:write |
| GET | /open-api/v1/oms/inbound/{packingNo} | Get a shipment by container number | oms:read |
| GET | /open-api/v1/oms/inbound | Paginated shipment list | oms:read |
| GET | /open-api/v1/inbound/expected | Expected inbound (awaiting receipt) | inbound:read |
The /oms/inbound endpoints accept only customer Keys. For /inbound/expected, a customer Key sees its own shipments, and a warehouse Key sees all customers' shipments in its visible warehouses.
Shipment Status
status | Meaning |
|---|---|
| 1 | Pending receipt (submitted) |
| 2 | Receiving / receipt being confirmed |
| 3 | Received |
| 4 | Post-receipt processing |
| 5 | Completed |
| 6 | Canceled |
Shipment response fields: wmsInboundId, wmsInboundNo (system inbound order number), packingNo, warehouseId, customerId, arriveWhDate, status, inboundType, itemCount (number of detail lines), totalExpectedQty (total expected quantity), totalReceivedQty (total received quantity).
Push an Inbound Forecast
POST /open-api/v1/oms/inbound
After submission the shipment status is 1 (pending receipt), and the system generates the inbound order number automatically.
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
packingNo | string | Yes | Container / packing number; no Chinese characters, up to 45 characters; the idempotency key |
warehouseId | long | One of the two | Warehouse ID (takes precedence) |
warehouseCode | string | One of the two | Warehouse code (used when warehouseId is not provided) |
inboundType | int | No | Inbound type; defaults to 1 |
packageType | int | Yes | Packing type: 1 full container / 2 loose cargo / 3 pallet |
containerSize | int | Required for full container | Container size: 20 / 40 / 45 |
containerType | string | No | Container type |
leavePort / arrivePort | string | No | Port of departure / port of arrival |
leaveDate / arriveDate | date | No | Departure / arrival date |
arriveWhDate | date | Yes | Expected warehouse arrival date |
isLiveUpload | int | No | Whether to use live putaway |
mixPallte | int | No | Whether pallets are mixed |
signName | string | No | Signer |
remark | string | No | Remark, up to 500 characters |
items | array | Yes | Detail lines; must not be empty |
items[].skuCode | string | Yes | A SKU code under your account |
items[].expectedQty | decimal | Yes | Expected quantity, >0 |
items[].totalCtn | decimal | Yes | Total cartons, >0 |
items[].totalPallet | decimal | No | Total pallets; defaults to 0 |
items[].marksNos | string | No | Shipping mark number |
items[].ctnPcs | decimal | No | Pieces per carton; defaults to 1 |
items[].ctnLength / ctnWidth / ctnHeight / ctnWeight | decimal | No | Carton dimensions and weight; default 1 |
items[].ctnSizeUnit | int | No | 1 KG/CM (default) / 2 LB/INCH |
items[].remark | string | No | Line remark |
Request Example
curl -X POST https://api.vmwms.com/open-api/v1/oms/inbound \
-H "x-api-key: <YOUR_API_KEY>.<YOUR_API_SECRET>" -H "Content-Type: application/json" \
-d '{
"packingNo": "TEST1234567",
"warehouseCode": "<WH_CODE>",
"packageType": 1,
"containerSize": 40,
"arriveWhDate": "2026-12-20",
"items": [
{ "skuCode": "SKU-A001", "expectedQty": 500, "totalCtn": 50, "ctnPcs": 10,
"ctnLength": 60, "ctnWidth": 40, "ctnHeight": 40, "ctnWeight": 15 }
]
}'Response Example
{
"code": 200,
"msg": "预约入库提交成功",
"data": {
"wmsInboundId": "1800000000000000021",
"wmsInboundNo": "REVDEMO2612030001",
"packingNo": "TEST1234567",
"warehouseId": "1800000000000000101",
"customerId": "1800000000000000001",
"arriveWhDate": "2026-12-20 00:00:00",
"status": 1,
"inboundType": 1,
"itemCount": 1,
"totalExpectedQty": "500",
"totalReceivedQty": "0"
}
}The msg above, 预约入库提交成功, means "Inbound forecast submitted". If a non-canceled shipment already exists for the same container number, the existing shipment is returned with msg "Inbound forecast already exists (idempotent response)" (预约入库已存在(幂等返回)).
Common Errors
| Error message | Cause and fix |
|---|---|
| packingNo (container number) cannot be empty (packingNo(货柜编号)不能为空) | Container number not provided |
| Container number cannot contain Chinese characters (柜号不能包含汉字) | The container number contains Chinese characters |
| Container number length cannot exceed 45 (货柜编号长度不能超过45) | Container number too long |
| arriveWhDate (expected warehouse arrival date) cannot be empty (arriveWhDate(预计到仓日期)不能为空) | Expected arrival date not provided |
| packageType (packing type) cannot be empty (packageType(装箱类型)不能为空) | Packing type not provided |
| A full container requires containerSize (整柜需填 containerSize(柜型)) | containerSize missing when packageType=1 |
| items (detail lines) cannot be empty (items(明细)不能为空) | No detail lines |
| warehouseId or warehouseCode cannot be empty and must be valid (warehouseId 或 warehouseCode 不能为空且需有效) | Warehouse not provided, or the warehouse code is wrong |
| Data does not exist (code 404) (数据不存在) | The warehouse is not one currently available to you |
| SKU not authorized or does not exist: SKU-A001 (无权使用或不存在的SKU: SKU-A001) | The SKU has not been created or is not under your account; create the SKU first |
| SKU quantity must be greater than 0: SKU-A001 (SKU 数量必须大于 0: SKU-A001) | expectedQty is ≤0 |
| Total cartons must be greater than 0: SKU-A001 (总箱数必须大于 0: SKU-A001) | totalCtn is ≤0 |
| TEST1234567 was submitted multiple times in a short period, please wait and try again (TEST1234567 短时间内提交了多次,请稍等再试) | Repeat submission of the same container number within 1 second |
Get a Shipment by Container Number
GET /open-api/v1/oms/inbound/{packingNo}
If the same container number has multiple shipments (for example, rebooked after a cancellation), the latest one is returned (including canceled ones). If none is found, code 500 is returned with "Inbound forecast does not exist or access denied: TEST1234567" (预约入库不存在或无权访问: TEST1234567).
curl https://api.vmwms.com/open-api/v1/oms/inbound/TEST1234567 -H "x-api-key: <YOUR_API_KEY>.<YOUR_API_SECRET>"Paginated Shipment List
GET /open-api/v1/oms/inbound
| Parameter | Required | Description |
|---|---|---|
status | No | Shipment status; see the table above |
startDate / endDate | No | yyyy-MM-dd; filters by creation time |
pageNum / pageSize | Recommended | See Pagination |
curl "https://api.vmwms.com/open-api/v1/oms/inbound?status=1&pageNum=1&pageSize=50" \
-H "x-api-key: <YOUR_API_KEY>.<YOUR_API_SECRET>"Expected Inbound
GET /open-api/v1/inbound/expected
Returns shipments that have not finished receiving, sorted by expected warehouse arrival date from earliest to latest. Warehouse Keys can use it to plan receiving labor.
| Parameter | Required | Description |
|---|---|---|
warehouseId | No | Warehouse ID; an empty list is returned for a warehouse that is not visible |
status | No | If omitted, shipments with status less than 3 (not fully received) are returned |
pageNum / pageSize | Recommended |
curl "https://api.vmwms.com/open-api/v1/inbound/expected?pageSize=100" -H "x-api-key: <YOUR_API_KEY>.<YOUR_API_SECRET>"Receiving Completion Notification
When receiving for a shipment is complete, the system pushes an inbound.received event (including the received quantity of each SKU). To register, see Webhook.
FAQ
The container number was already booked. Can I push it again?
If a non-canceled shipment already exists for the same container number, pushing again returns the original shipment instead of creating a new one. To make changes, first cancel the original shipment in OMS, then push it again.
How do I cancel an inbound forecast?
The new protocol does not currently provide a cancel endpoint, so cancel in OMS. Integrators on the legacy protocol can use packing/cancel; see Legacy-Compatible Protocol.
How do I know how much was received?
Query the shipment by container number and check totalReceivedQty, or register the inbound.received Webhook to have the received details pushed automatically when receiving is complete.
Where do I get the warehouse code?
Call the warehouse list endpoint and take warehouseCode or id.
