API معاينة الطلب
POST /v1/orders/preview — يتحقق من البنود والأسعار والشحن المحلي قبل الإنشاء.
ذات صلة: إنشاء الطلب · نموذج الاستجابة
جسم الطلب
| الحقل | مطلوب | الوصف |
|---|---|---|
channel | نعم | 1688 | taobao |
receiver | نعم | عنوان وارد محلي: name, mobile, province, city, address؛ وتحتاج 1688 دون address_id إلى district أيضا |
lines[] | نعم | id + spec_id + quantity (offer_id / mi_id still work) لكل بند |
response_format | لا | standard (الافتراضي) أو upstream |
Taobao: ينفذ Gateway فحصا دفعيا تلقائيا لـ mi_id + traffic sku_id، ثم يستدعي upstream render. Use a fresh id / mi_id as lines[].id — it rotates periodically.
Line mapping
Prefer lines[].id = search/detail id. offer_id and mi_id remain compatible.
lines[] | 1688 | Taobao |
|---|---|---|
id (preferred) | search/detail id (offerId) | search/detail id (mi_id) |
offer_id | Compatible alias of id | Compatible alias of id |
mi_id | — | Compatible Taobao alias of id |
spec_id | variants[].sku_id | variants[].sku_id (or mpSkuId) |
If both id and offer_id are sent, offer_id wins. Otherwise id (then mi_id) is copied to offer_id. Do not pass Taobao source_product_id. Taobao id / mi_id rotates periodically.
مثال
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
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
}
]
}الاستجابة
StandardOrderPreviewResult — راجع نماذج استجابة الطلبات. مثال JSON: تنسيق الاستجابة.
Get Support
Need integration help? Contact Developer Support at support@hiobuy.com · Response within 1–2 business days