Skip to content

SKU ​

This page explains how to sync product (SKU) master data through the API and query products and low-stock alerts. Order creation and inbound forecasts both look up products under your account by skuCode, and a missing SKU is rejected, so create the SKU first.

Any SKU created or edited through the API enters Pending Review (待审核) status and is reviewed by the warehouse.

Endpoints at a Glance ​

MethodPathPurposescope
POST/open-api/v1/oms/productsCreate a single productoms:write
PUT/open-api/v1/oms/products/{skuCode}Edit a productoms:write
POST/open-api/v1/oms/products/batch/addBulk add (does not overwrite approved SKUs)oms:write
POST/open-api/v1/oms/products/batchBulk add / overwrite (including approved SKUs)oms:write
GET/open-api/v1/oms/products/{skuCode}Get a single productoms:read
GET/open-api/v1/oms/productsPaginated product listoms:read
GET/open-api/v1/oms/products/low-stockLow-stock alertsoms:read
GET/open-api/v1/sku/listPaginated SKU master data (all fields)product:read
GET/open-api/v1/sku/getByCodeGet a SKU by codeproduct:read
GET/open-api/v1/sku/{id}Get a SKU by IDproduct:read

The /oms/products endpoints accept only customer Keys. For /sku/**, a customer Key sees only its own SKUs, and a warehouse Key can see the SKUs of customers in its visible warehouses.

Product Fields ​

FieldTypeRequiredDescription
skuCodestringYesSKU code, unique under your account; may contain only letters, digits, _, -, and spaces; up to 40 characters
productNamestringYesProduct name, up to 200 characters
productNameEnstringNoEnglish name
upcBrandstringNoUPC / brand code
goodsSubjectstringNoProduct category
systemSkustringNoSKU in an external system
hasBatteryintNoContains a battery: 0 no / 1 yes
declarePricedecimalYesDeclared value, >0
unitstringNoUnit of measure
sizeUnitintYes1 = KG/CM, 2 = LB/INCH
weightdecimalYesWeight per unit, >0
length / width / heightdecimalYesLength / width / height per unit, >0
pcsPerCarton / pcsPerPalletintNoPieces per carton / pieces per pallet
cartonWeight / cartonLength / cartonWidth / cartonHeightdecimalNoCarton specifications
safeStockdecimalNoSafety stock, used for low-stock alerts

Product response fields: skuId, skuCode, productName, productNameEn, upcBrand, status (1 enabled), auditStatus (0 pending review / 10 approved), weight, length, width, height, unit.

Create a Single Product ​

POST /open-api/v1/oms/products

  • Request body: the product fields above.
  • Idempotency: if the same skuCode already exists, the existing SKU is returned as is, with msg "Product already exists (idempotent response)" (商品已存在(幂等返回)), and it is not updated.
  • Success msg: "Product synced (pending review)" (商品同步成功(待审核)).
bash
curl -X POST https://api.vmwms.com/open-api/v1/oms/products \
  -H "x-api-key: <YOUR_API_KEY>" -H "x-api-secret: <YOUR_API_SECRET>" \
  -H "Content-Type: application/json" \
  -d '{"skuCode":"SKU-A001","productName":"Desk Lamp","declarePrice":19.9,"sizeUnit":1,
       "weight":1.2,"length":30,"width":20,"height":15,"safeStock":50}'
json
{
  "code": 200,
  "msg": "商品同步成功(待审核)",
  "data": {
    "skuId": "1800000000000000011",
    "skuCode": "SKU-A001",
    "productName": "Desk Lamp",
    "productNameEn": null,
    "upcBrand": null,
    "status": 1,
    "auditStatus": 0,
    "weight": "1.2000",
    "length": "30.0000",
    "width": "20.0000",
    "height": "15.0000",
    "unit": null
  }
}

Edit a Product ​

PUT /open-api/v1/oms/products/{skuCode}

  • Request body: all fields (full overwrite, with the same required-field validation); if safeStock is omitted, the original value is kept.
  • After an edit the SKU returns to pending review.
  • Success msg: "Product updated (pending review)" (商品更新成功(待审核)).
  • SKU does not exist: "SKU-A001 failed to get specification info by ID!" (SKU-A001 ID获取规格信息失败!).
bash
curl -X PUT https://api.vmwms.com/open-api/v1/oms/products/SKU-A001 \
  -H "x-api-key: <YOUR_API_KEY>.<YOUR_API_SECRET>" -H "Content-Type: application/json" \
  -d '{"productName":"Desk Lamp v2","declarePrice":21,"sizeUnit":1,"weight":1.3,"length":30,"width":20,"height":15}'

Bulk Add (Does Not Overwrite Approved SKUs) ​

POST /open-api/v1/oms/products/batch/add

  • Request body: an array of product objects, up to 5000 after de-duplication.
  • Rules: a SKU that does not exist is created (pending review); one that exists but is not yet approved is overwritten; an approved SKU with the same code is skipped; within one batch, the first entry wins for a duplicated SKU.
  • Response data: {flag, uploadCount, updateCount, repeatCount}.
bash
curl -X POST https://api.vmwms.com/open-api/v1/oms/products/batch/add \
  -H "x-api-key: <YOUR_API_KEY>.<YOUR_API_SECRET>" -H "Content-Type: application/json" \
  -d '[{"skuCode":"SKU-A001","productName":"Desk Lamp","declarePrice":19.9,"sizeUnit":1,"weight":1.2,"length":30,"width":20,"height":15},
       {"skuCode":"SKU-A002","productName":"Desk Fan","declarePrice":25,"sizeUnit":1,"weight":2.0,"length":40,"width":30,"height":30}]'
Error messageCause
Import data cannot be empty! (导入数据不能为空!)The array is empty
At most 5000 records per import (每次最多导入5000条)More than 5000 records; split into batches

Bulk Add / Overwrite (Including Approved SKUs) ​

POST /open-api/v1/oms/products/batch

  • Request body: an array of product objects, up to 500.
  • Rules: an existing SKU is always overwritten (including approved ones; the review status is unchanged).
  • Response: data is null.
  • Errors: empty array, "no record"; more than 500, "At most 500" (最多500条).

Get a Single Product ​

GET /open-api/v1/oms/products/{skuCode}

If not found, code 500 is returned with "Product does not exist or access denied: SKU-A001" (商品不存在或无权访问: SKU-A001).

bash
curl https://api.vmwms.com/open-api/v1/oms/products/SKU-A001 -H "x-api-key: <YOUR_API_KEY>.<YOUR_API_SECRET>"

Paginated Product List ​

GET /open-api/v1/oms/products

ParameterRequiredDescription
skuCodeNoFuzzy match
pageNum / pageSizeRecommendedSee Pagination
bash
curl "https://api.vmwms.com/open-api/v1/oms/products?skuCode=SKU&pageNum=1&pageSize=100" \
  -H "x-api-key: <YOUR_API_KEY>.<YOUR_API_SECRET>"

Low-Stock Alerts ​

GET /open-api/v1/oms/products/low-stock

ParameterRequiredDescription
warehouseIdNoIf omitted, the total across all warehouses

Only SKUs with safeStock > 0 whose available quantity is below the safety stock are counted, sorted by shortfall from largest to smallest, up to 200 rows.

json
{
  "code": 200,
  "msg": "操作成功",
  "data": [
    { "skuCode": "SKU-A001", "productName": "Desk Lamp", "safeStock": "50", "available": "12", "shortfall": "38" }
  ]
}

SKU Master Data Queries ​

Paginated SKU List ​

GET /open-api/v1/sku/list

ParameterDescription
skuCodeExact match
keywordFuzzy match on code / external-system SKU / name / UPC
skuCodesMultiple codes, comma-separated, exact match
status0 disabled / 1 enabled
auditStatus0 not reviewed / 10 approved
pageNum / pageSizepageSize is capped at 1000; if omitted it defaults to 1000

The response has more fields than /oms/products, mainly: id, skuCode, systemSku, upcBrand, productName, productNameEn, goodsSubject, productImg, status, auditStatus, auditRemark, hasBattery, declarePrice, sizeUnit, unit, weight, length, width, height, pcsPerCarton, pcsPerPallet, carton specifications, safeStock, remark, createTime, updateTime.

bash
curl "https://api.vmwms.com/open-api/v1/sku/list?skuCodes=SKU-A001,SKU-A002&pageSize=100" \
  -H "x-api-key: <YOUR_API_KEY>.<YOUR_API_SECRET>"

Get a SKU by Code / ID ​

  • GET /open-api/v1/sku/getByCode?skuCode=SKU-A001 (exact)
  • GET /open-api/v1/sku/{id}

If not found or outside your data scope, code 404 "Data does not exist" (数据不存在) is returned.

Common Errors ​

Error messageCause and fix
SKU-A001 SKU code cannot be empty! (SKU-A001 SKU编号不能为空!)skuCode not provided
SKU-A001 SKU code may contain only digits, letters, and - (SKU-A001 SKU编号 只能包含数字、字母和-)The code contains disallowed characters (Chinese characters, slashes, etc.)
SKU-A001 Custom SKU length cannot exceed 40 characters! (SKU-A001 自定义SKU长度不能超过40字符!)Code too long
SKU-A001 SKU name cannot be empty! / SKU name length cannot exceed 200 characters! (SKU-A001 SKU名称不能为空! / SKU名称长度不能超过200字符!)Name missing or too long
SKU-A001 Product volume/weight unit cannot be empty! (SKU-A001 产品体积/重量单位不能为空!)sizeUnit not provided
SKU-A001 Single-unit weight must be greater than 0! (SKU-A001 产品单件重量必须大于0!)weight not provided or ≤0
SKU-A001 Product length / height ... must be greater than 0! (SKU-A001 产品长度 / 高度 … 必须大于0!)Length, width, or height not provided or ≤0
SKU-A001 SKU value cannot be empty! / must be greater than 0! (SKU-A001 SKU价值不能为空! / 必须大于0!)declarePrice not provided or ≤0
Product does not exist or access denied: SKU-A001 (商品不存在或无权访问: SKU-A001)The queried SKU is not under your account

FAQ ​

Why was the information not updated when I pushed the same SKU again? ​

For a SKU that already exists, POST /oms/products returns the original data without updating it. To modify it, use PUT /oms/products/{skuCode}; for bulk changes, use /oms/products/batch.

Why did some SKUs not change after a bulk import? ​

/oms/products/batch/add skips approved SKUs. To overwrite approved SKUs, use /oms/products/batch instead (up to 500 per request).

I created the SKU. Why does order creation still say "SKU not authorized or does not exist" (无权使用或不存在的SKU)? ​

Make sure the skuCode used in the order exactly matches the code it was created with, and that it was created with a Key from the same account. You can first call GET /open-api/v1/oms/products/{skuCode} to confirm.

Why does a SKU go back to pending review after I edit it? ​

A SKU that a customer creates or edits must be re-reviewed by the warehouse. This ensures the warehouse operates and bills based on the correct dimensions and weight.