Warehouses and Locations
This page explains how to query the warehouses available to you and warehouse details, how the warehouse side queries locations and zones, and the customer-information endpoints.
Endpoints at a Glance
| Method | Path | Purpose | scope | Key type |
|---|---|---|---|---|
| GET | /open-api/v1/warehouse/list | Visible warehouse list | warehouse:read | Customer / warehouse |
| GET | /open-api/v1/warehouse/{id} | Basic warehouse details | warehouse:read | Customer / warehouse |
| GET | /open-api/v1/warehouse/detail/{id} | Full warehouse details | warehouse:read | Customer / warehouse |
| GET | /open-api/v1/location/list | Paginated location list | location:read | Warehouse only |
| GET | /open-api/v1/location/{id} | Location details | location:read | Warehouse only |
| GET | /open-api/v1/location/zones | List zones by warehouse | location:read | Warehouse only |
| GET | /open-api/v1/customer/list | Customer list | customer:read | Customer / warehouse |
| GET | /open-api/v1/customer/{id} | Customer details | customer:read | Customer / warehouse |
| GET | /open-api/v1/customer/warehouses | Warehouses bound to a customer | customer:read | Customer / warehouse |
Visible Warehouse List
GET /open-api/v1/warehouse/list
Returns only the warehouses visible to the current Key: for a customer Key, the warehouses currently available to you; for a warehouse Key, your company's warehouses or the specified warehouses. Not paginated; all are returned at once.
| Parameter | Required | Description |
|---|---|---|
warehouseCode | No | Contains match, case-insensitive |
warehouseName | No | Contains match |
status | No | Warehouse status |
Main response fields: id, warehouseCode, warehouseName, warehouseNameEn, warehouseType, partnerType, locationType, status, country, state, city, postalCode, address, companyName, contactName, contactPhone, contactEmail.
curl https://api.vmwms.com/open-api/v1/warehouse/list -H "x-api-key: <YOUR_API_KEY>.<YOUR_API_SECRET>"{
"total": 1,
"rows": [
{
"id": "1800000000000000101",
"warehouseCode": "DEMO-CA1",
"warehouseName": "Demo Warehouse",
"country": "US",
"state": "CA",
"city": "Ontario",
"postalCode": "91761",
"address": "123 Example Rd"
}
],
"code": 200,
"msg": "查询成功"
}For warehouseId in orders and inbound forecasts, use id; for warehouseCode, use warehouseCode.
Warehouse Details
GET /open-api/v1/warehouse/{id}: basic fields.GET /open-api/v1/warehouse/detail/{id}: in addition to the basic fields, includesimgList(warehouse images),whContent(warehouse introduction), andpriceObj/priceJson(pricing information).
If the warehouse is not visible, code 404 "Data does not exist" (数据不存在) is returned.
Locations and Zones (Warehouse Keys Only)
A customer Key calling the endpoints below receives code 403 "This endpoint requires a warehouse (warehouse administrator / warehouse manager) API Key" (该接口需要仓库(仓库管理员 / 库管)API Key).
Paginated Location List
GET /open-api/v1/location/list
| Parameter | Description |
|---|---|
warehouseId | Warehouse ID |
zoneId | Zone ID |
locationCode | Location code, fuzzy match |
status | 0 disabled / 1 enabled |
pageNum / pageSize |
Main response fields: id, warehouseId, warehouseCode, zoneId, locationCode, locationType, status, pArea (area), totalStock (current stock in the location).
curl "https://api.vmwms.com/open-api/v1/location/list?warehouseId=<WAREHOUSE_ID>&pageSize=200" \
-H "x-api-key: <YOUR_STAFF_API_KEY>.<YOUR_STAFF_API_SECRET>"Location Details
GET /open-api/v1/location/{id}. If the location is not in a visible warehouse, code 404 is returned.
List Zones by Warehouse
GET /open-api/v1/location/zones?warehouseId=<WAREHOUSE_ID>
data is an array; each item contains id, warehouseId, zoneCode, zoneName, zoneType, status, zoneCategory.
Customer Information
Customer List
GET /open-api/v1/customer/list
- Customer Key: always returns only your own record; filters have no effect.
- Warehouse Key: returns the customers in visible warehouses, and can filter by
keyword(fuzzy match on code / account / name / company) andstatus(0 disabled / 1 enabled), with pagination.
Main response fields: id, customerCode, customerName, companyName, skuPrefix, status, warehouseNames.
Customer Details
GET /open-api/v1/customer/{id}. A customer Key can only query its own ID; any other returns code 404.
Warehouses Bound to a Customer
GET /open-api/v1/customer/warehouses
| Parameter | Description |
|---|---|
customerId | Required for warehouse Keys; ignored for customer Keys, which always query themselves |
data is an array; each item contains id, customerId, warehouseId, warehouseCode, warehouseName, startTime, endTime, status. If a warehouse Key omits customerId, the message "customerId cannot be empty" (customerId 不能为空) is returned.
FAQ
Why is the warehouse I want to ship from not in the warehouse list?
The list only returns warehouses that are currently enabled and available to you. To use a new warehouse, contact the warehouse to have it enabled first; once enabled, it appears in the list.
The location endpoint says "This endpoint requires a warehouse (warehouse administrator / warehouse manager) API Key" (该接口需要仓库(仓库管理员 / 库管)API Key)
Locations and zones are internal warehouse operations data and are open only to warehouse-side Keys. Customer Keys cannot call them.
Can the warehouse list be paginated?
No, and it does not need to be. The endpoint returns all visible warehouses at once, and pageNum / pageSize have no effect.
