Mẫu phí vận chuyển 1688

POST /v1/products/freight/template

Tra phí nội địa, quy tắc và kích thước qua API chính thức. Không tạo đơn và không đảm bảo phí cuối cùng.

com.alibaba.fenxiao.crossborder:product.freight.estimate-1 · 1688 

Khóa Live có product:detail và quyền 1688. Thành công: 2 API Units, gồm ánh xạ SKU; thất bại không trừ. Không dùng AI Credits dù có shop hay X-Shop-Domain. Sandbox: 422 SANDBOX_CAPABILITY_UNAVAILABLE.

Yêu cầu

skus[].spec_id lấy từ variants[].sku_id của chi tiết chuẩn 1688, giống khi đặt hàng. HIOBuy tự tìm skuId gốc. 1–100 SKU không trùng, số lượng và tổng là số nguyên dương an toàn. total_quantity tự cộng. Quy cách không tồn tại bị từ chối.

POST /v1/products/freight/template
{
  "channel": "1688",
  "product_id": "111111111",
  "destination": {
    "province": "浙江省",
    "city": "杭州市",
    "district": "滨江区"
  },
  "skus": [
    {
      "spec_id": "b266e0726506185beaf205cbae88530d",
      "quantity": 3
    }
  ]
}

Tên và mã địa phương

Gửi đủ ba tên tiếng Trung hoặc ba mã sáu chữ số. Hỗ trợ tên gọn rõ ràng; tên và mã phải khớp. Dữ liệu đại lục ngày 2023-06-30, nguồn đã ngừng cập nhật. Vùng mới có thể gửi mã hiện hành, 1688 quyết định chấp nhận. Thành phố trực thuộc được xử lý riêng; thị trấn ở Đông Quản, Trung Sơn, Đam Châu, Gia Dục Quan dùng mã thành phố sáu chữ số, không gửi mã phố chín chữ số. Tên không rõ bị từ chối; tên của mã mới có thể null.

province / city / district → province_code / city_code / district_code

{
  "destination": {
    "province_code": "330000",
    "city_code": "330100",
    "district_code": "330108"
  }
}

Administrative-divisions-of-China 

Phản hồi

Tiền chuẩn là fen CNY (CNY_minor): 490 = 4,90 CNY. Cân nặng kg, kích thước cm. dimensions_source=product ứng với sizeValueType=1 và product_dimensions; sku ứng với 2 và skus[].dimensions. Thiếu: null; miễn phí rõ ràng: 0. Không áp lại discount. response_format=upstream giữ trường, skuId và tiền gốc nhân dân tệ, không có monetary_unit. Lỗi nghiệp vụ trả 502 ở cả hai định dạng. Ví dụ bên dưới.

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
        }
      }
    ]
  }
}

Lỗi

HTTPCode
400INVALID_DESTINATION, REGION_NOT_FOUND, REGION_AMBIGUOUS, REGION_CODE_MISMATCH, INVALID_PRODUCT_ID, INVALID_SKUS, INVALID_SPEC_ID, DUPLICATE_SPEC_ID, INVALID_QUANTITY
401 / 403Authentication
404NOT_FOUND
422SANDBOX_CAPABILITY_UNAVAILABLE
429Rate limits
502CHANNEL_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

Email support