Taobao APIs require an active paid subscription. The 7-day free trial includes 1688 and Weidian only. Calls without the required subscription return HTTP 403 with PAID_SUBSCRIPTION_REQUIRED. Upgrade in the developer center and continue using the same API key.

Order preview API

Procurement order preview and creation cost 0 API Units, including the 1688/Taobao channel shortcuts, in both Self Fulfillment and HIOBuy Fulfillment. They do not consume subscription quota or traffic packs and remain available when API Unit balance is exhausted. API key, scope, subscription/channel access, procurement eligibility and rate limits still apply. Order charges and procurement fees still apply.

POST /v1/orders/preview checks availability, prices, and domestic freight before create. Preview, create, and freight estimate share the receiver + lines structure. For Taobao create, use the identifier pair returned by preview as described below.

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

  1. Call POST /v1/products/detail (or use a search hit).
  2. Copy response id → lines[].id (same field name — not Taobao source_product_id).
  3. Copy selected variants[].sku_id → lines[].spec_id.
  4. Require success === true. For Taobao create, use the product/SKU pair returned by preview; for 1688, retain the requested identifiers.

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_id—Compatible 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_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_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.

Taobao: detail SKU, preview, and create

spec_id is the order request field name. For preview, copy product.id (mi_id) into lines[].id and the selected product.variants[].sku_id into lines[].spec_id. Do not use Taobao source_product_id (the original item_id). Gateway resolves the pair through batch-check before render; a separate client batch-check call is not required.

After a successful standard preview, copy each returned sellers[].lines[].offer_id to create lines[].id and that same line’s spec_id to create lines[].spec_id. For Taobao these are the resolved mpId + mpSkuId. Keep the pair together and preserve quantity and receiver. The self unified-create path also resolves the original detail pair; HIOBuy Fulfillment (warehouse) create forwards the identifiers to the warehouse without another Gateway batch-check. Use the resolved preview pair for this flow.

For the resolved create line: Send one product-ID field per line. If both id and offer_id are present, offer_id takes precedence. Do not retain a stale alias or mix a detail product ID with a procurement SKU ID. A numeric product ID is treated as an already-resolved mpId; an arbitrary Taobao URL item_id is not a substitute.

const createLine = {
  id: previewLine.offer_id,
  spec_id: previewLine.spec_id,
  quantity: previewLine.quantity,
};

For catalog-vs-quote prices, fulfillment-mode rules, and yuan/fen conversion, see Taobao SKU prices.

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. total always contains merchandise, shipping, and payment. Known zero values use a Money object with amount:0; null means the amount is genuinely unknown.

Before create, require success === true. Gateway also checks for a positive payable amount, seller groups, returned requested lines, no known unavailable lines, and—on 1688—a trade type with op_support:true. A parseable incomplete result is HTTP 200 with success:false and a code such as LINE_UNAVAILABLE, UNSUPPORTED_TRADE_MODE, or PREVIEW_INCOMPLETE.

For backward compatibility, explicit 1688 upstream SKU, stock, MOQ, and marketplace business errors still use HTTP 502 with the standard API error envelope. response_format:"upstream" retains raw semantics and may return HTTP 200 with an upstream business failure; inspect the upstream payload rather than relying on HTTP status alone.

Order preview is read-only. In both self and warehouse procurement modes, Gateway uses the App’s applicable channel token and calls the marketplace preview/render API directly. In warehouse mode that token comes from warehouse_channel_tokens; preview is not forwarded to the warehouse /procurement/preview endpoint. Stateful create, detail, pay, cancel, and logistics operations remain warehouse-routed.

Get Support

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

Email support