首页开放平台文档快递专线 EXPRESS

快递专线运价查询

实时聚合多家国际快递平台运价,按国家 + 邮编 + 重量查询。系统内部自动调用所有可用渠道,返回按价格升序排列的扁平结果。覆盖 DHL/UPS/FedEx/TNT/EMS/顺丰国际等,3 积分/次。

接口信息

接口路径POST /api/openapi/v1/freight/express/search
积分消耗3 积分 / 次
数据更新每日更新
超时建议客户端 timeout ≥ 5 秒

请求参数

字段名类型必填说明示例
destination_countrystring目的国,支持 2 位 ISO 代码(精确)/ 中文 / 英文(模糊)查代码 ↗US / 美国 / United States
destination_zipstring目的邮编,含字母的国家照原样传(不传则按全国通用渠道计算,传了价格更精准)90001
destination_citystring目的城市英文名(部分平台需要)Los Angeles
weightnumber重量 kg(实重)21.5
length / width / heightnumber体积 cm(计算抛重)40 / 30 / 25
package_typestring货物类型:包裹(默认)/ 文件 / 防水袋包裹

响应字段

字段名类型说明
resolved.destination_countryobject回显解析后的目的国 { input, code }
list[]array渠道列表,按价格升序
list[].channel_codestring渠道代码(用于下单时引用)
list[].channel_namestring渠道名称
list[].calc_weightnumber计费重 kg(实重与抛重取大)
list[].freightnumber基础运费
list[].fuel_fee / fuel_ratenumber / string燃油附加费金额(已含在 price 内)/ 比例百分比字符串(如 "21.50%"
list[].surchargenumber其他附加费(关税/旺季等)
list[].pricenumber合计总价(freight + fuel_fee + surcharge)
list[].currencystring币种(默认 CNY)
list[].ttstring预计派送时效(如「3-5 工作日」)
list[].remarksstring渠道备注(限重/限货/旺季等)

完整 curl 请求示例

curl -X POST https://www.5688.cn/api/openapi/v1/freight/express/search \
  -H "Content-Type: application/json" \
  -H "X-Awice-AppKey: AK_xxxxxxxxxxxxxxxx" \
  -H "X-Awice-Timestamp: 1746086400" \
  -H "X-Awice-Nonce: a1b2c3d4e5f6a7b8" \
  -H "X-Awice-Signature: 7f8e9d6c5b4a..." \
  -d '{
    "destination_country": "US",
    "destination_zip": "90001",
    "destination_city": "Los Angeles",
    "weight": 21.5,
    "length": 40,
    "width": 30,
    "height": 25,
    "package_type": "包裹"
  }'

成功响应示例

{
  "code": 0,
  "msg": "success",
  "request_id": "req_xxxxxxxxxxxxxxxx",
  "data": {
    "resolved": {
      "destination_country": { "input": "US", "code": "US" }
    },
    "list": [
      {
        "channel_code": "US-DHL-FAST",
        "channel_name": "DHL 大货特惠",
        "calc_weight": 21.5,
        "freight": 681.0,
        "fuel_fee": 146.75,
        "fuel_rate": "21.50%",
        "surcharge": 0,
        "price": 827.75,
        "currency": "CNY",
        "tt": "4-7 工作日",
        "remarks": "适合 21kg+ 大货"
      },
      {
        "channel_code": "US-FEDEX-IP",
        "channel_name": "FedEx IP 优先",
        "calc_weight": 21.5,
        "freight": 696.0,
        "fuel_fee": 184.5,
        "fuel_rate": "26.50%",
        "surcharge": 0,
        "price": 881.5,
        "currency": "CNY",
        "tt": "3-5 工作日",
        "remarks": ""
      }
    ]
  },
  "credit_used": 3,
  "credit_balance": 9493
}

上游不可用响应(不扣费)

系统自动调用所有可用渠道。若所有渠道均超时或异常,返回 5002,整次调用不扣积分。建议客户端做指数退避重试 2-3 次。

{
  "code": 5002,
  "msg": "上游渠道暂不可用,请稍后重试",
  "request_id": "req_xxxxxxxxxxxxxxxx",
  "data": {
    "resolved": { "destination_country": { "input": "US", "code": "US" } },
    "list": []
  }
}
注意事项:
  • 美国邮编 5 位必传(包含前导零)
  • FBA 头程场景请改用 FBA 头程接口(按 fba_code 查询)
  • 有体积时系统自动算抛重,list[].calc_weight 反映实际计费重
  • 系统内部并发调多家渠道,整体响应时间通常 1-3 秒(建议客户端 timeout 8 秒)