1688 商品送料テンプレート
POST /v1/products/freight/template
公式APIで中国国内送料、料金規則、梱包寸法を取得します。注文を作成せず、最終送料を保証しません。
com.alibaba.fenxiao.crossborder:product.freight.estimate-1 · 1688
product:detail の Live キーと1688認可が必要です。成功時はSKU変換を含め 2 API Units、失敗時は差し引きません。shop や X-Shop-Domain があっても AI Credits は使いません。Sandbox: 422 SANDBOX_CAPABILITY_UNAVAILABLE。
リクエスト
skus[].spec_id は1688標準詳細の variants[].sku_id で、注文と同じです。元の skuId は内部変換します。重複しない 1〜100 SKU、数量と合計は正の安全な整数。total_quantity は自動集計。不明な仕様は拒否します。
POST /v1/products/freight/template
{
"channel": "1688",
"product_id": "111111111",
"destination": {
"province": "浙江省",
"city": "杭州市",
"district": "滨江区"
},
"skus": [
{
"spec_id": "b266e0726506185beaf205cbae88530d",
"quantity": 3
}
]
}省市区の名称とコード
中国語の3名称または6桁の3コードをすべて指定します。一意な略称に対応し、名称とコードの併記時は一致が必要です。中国本土データは 2023-06-30 時点で配布元は更新を終了しています。新地域は現在のコードを指定でき、1688が可否を判定します。直轄市を別途処理し、東莞・中山・儋州・嘉峪関の鎮や街道は6桁の市コードに変換します。9桁の街道コードは送信しません。不明・曖昧な名称は拒否し、未収録コードの地域名は null の場合があります。
province / city / district → province_code / city_code / district_code
{
"destination": {
"province_code": "330000",
"city_code": "330100",
"district_code": "330108"
}
}Administrative-divisions-of-China
レスポンス
金額は人民元の分(CNY_minor)、490は4.90元。重量kg、寸法cm。dimensions_source=product は sizeValueType=1 と product_dimensions、sku は2と skus[].dimensions に対応。不明値は null、明示的送料無料は0。discount は再適用しません。response_format=upstream は元のフィールド・skuId・元単位を維持し、monetary_unit を付けません。上流の業務エラーは両形式とも502。以下は応答例です。
charge_type: weight / quantity / volume → charge_unit: kg / item / m3
template.type: seller_paid / custom / official_custom
template.shipping_method: express / freight / cash_on_delivery / official
{
"request_id": "req_example",
"monetary_unit": "CNY_minor",
"freight_template": {
"channel": "1688",
"product_id": "111111111",
"destination": {
"province": "浙江省",
"province_code": "330000",
"city": "杭州市",
"city_code": "330100",
"district": "滨江区",
"district_code": "330108"
},
"total_quantity": 3,
"free_postage": false,
"freight": {
"amount": 490,
"currency": "CNY"
},
"discount": 1,
"template": {
"id": "123456789",
"name": "普通快递运费模板",
"type": "custom",
"shipping_method": "express",
"charge_type": "weight",
"charge_unit": "kg",
"first_unit": 1,
"first_fee": {
"amount": 290,
"currency": "CNY"
},
"next_unit": 1,
"next_fee": {
"amount": 200,
"currency": "CNY"
}
},
"dimensions_source": "sku",
"product_dimensions": null,
"skus": [
{
"spec_id": "b266e0726506185beaf205cbae88530d",
"quantity": 3,
"dimensions": {
"weight_kg": 0.5,
"length_cm": 20,
"width_cm": 15,
"height_cm": 10
}
}
]
}
}エラー
| HTTP | Code |
|---|---|
| 400 | INVALID_DESTINATION, REGION_NOT_FOUND, REGION_AMBIGUOUS, REGION_CODE_MISMATCH, INVALID_PRODUCT_ID, INVALID_SKUS, INVALID_SPEC_ID, DUPLICATE_SPEC_ID, INVALID_QUANTITY |
| 401 / 403 | Authentication |
| 404 | NOT_FOUND |
| 422 | SANDBOX_CAPABILITY_UNAVAILABLE |
| 429 | Rate limits |
| 502 | CHANNEL_UPSTREAM_ERROR |
POST /v1/products/freight/estimate · POST /v1/orders/preview
Get Support
Need integration help? Contact Developer Support at support@hiobuy.com · Response within 1–2 business days