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
| Field | Required | Description |
|---|---|---|
channel | Yes | 1688 | taobao |
receiver | Yes | Domestic inbound address: name, mobile, province, city, address; 1688 without address_id also needs district |
lines[] | Yes | Prefer id + spec_id + quantity. offer_id and mi_id still work |
response_format | No | standard (default) or upstream |
Shortcuts: POST /v1/orders/1688/preview and POST /v1/orders/taobao/preview (omit channel).
Line mapping {#line-mapping}
- Call
POST /v1/products/detail(or use a search hit). - Copy response
id→lines[].id(same field name — not Taobaosource_product_id). - Copy selected
variants[].sku_id→lines[].spec_id. - Reuse the same
lines[]in create after preview succeeds.
Take ids from product detail — not from a long-lived cache.
lines[] field | 1688 | Taobao |
|---|---|---|
id (preferred) | search/detail id (offerId) | search/detail id (mi_id) — not source_product_id |
offer_id | Compatible alias of id | Compatible alias of id |
mi_id | — | Compatible Taobao alias of id |
spec_id | variants[].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_id → mpId / 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_idrotates 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