Order preview API

POST /v1/orders/preview — validate lines, prices, and domestic freight before create. Same receiver + lines body is reused by create and freight estimate.

Related: Create order · Response model

Request body

FieldRequiredDescription
channelYes1688 | taobao
receiverYesDomestic inbound address: name, mobile, province, city, address; 1688 without address_id also needs district
lines[]YesPrefer id + spec_id + quantity. offer_id and mi_id still work
response_formatNostandard (default) or upstream

Shortcuts: POST /v1/orders/1688/preview and POST /v1/orders/taobao/preview (omit channel).

Line mapping {#line-mapping}

  1. Call POST /v1/products/detail (or use a search hit).
  2. Copy response idlines[].id (same field name — not Taobao source_product_id).
  3. Copy selected variants[].sku_idlines[].spec_id.
  4. Reuse the same lines[] in create after preview succeeds.

Take ids from product detail — not from a long-lived cache.

lines[] field1688Taobao
id (preferred)search/detail id (offerId)search/detail id (mi_id) — not source_product_id
offer_idCompatible alias of idCompatible alias of id
mi_idCompatible Taobao alias of id
spec_idvariants[].sku_id (specId)variants[].sku_id (traffic sku). Already-resolved mpSkuId is also accepted

If both id and offer_id are sent, offer_id wins. Otherwise id (then mi_id) is copied to offer_id.

Taobao: Gateway auto batch-checks id/mi_id + traffic sku_idmpId / mpSkuId, then calls upstream /purchase/order/render. You do not need to call /v1/products/batch-check first. If the value is a pure numeric mpId, batch-check is skipped.

Taobao id / mi_id rotates periodically. Do not cache it long-term. Stale ids fail preview, create, and similar. Re-fetch from search or detail right before checkout.

1688 example

POST /v1/orders/preview
{
  "channel": "1688",
  "receiver": {
    "name": "张三",
    "mobile": "15251667788",
    "province": "浙江省",
    "city": "杭州市",
    "district": "滨江区",
    "address": "网商路699号"
  },
  "lines": [
    {
      "id": "554456348334",
      "spec_id": "b266e0726506185beaf205cbae88530d",
      "quantity": 5
    }
  ]
}

Taobao example

Pass search/detail id as lines[].id. Existing clients may still send offer_id or mi_id.

POST /v1/orders/preview
{
  "channel": "taobao",
  "receiver": {
    "name": "张三",
    "mobile": "15251667788",
    "province": "浙江省",
    "city": "杭州市",
    "district": "滨江区",
    "address": "网商路699号"
  },
  "lines": [
    {
      "id": "0000iIpSgysC-ca00kbG-Y-LXZu7WojtOJ5cnKTyzoID9UM",
      "spec_id": "6079564221554",
      "quantity": 5
    }
  ]
}

Response

StandardOrderPreviewResult — see order response models. JSON example: Response format.

Amounts are CNY fen. Check success and unavailable_lines[] before calling create.

Get Support

Need integration help? Contact Developer Support at support@hiobuy.com · Response within 1–2 business days

Email support