API
预估派送费用-2(已停用)
更新时间: 2017-11-22 17:14:02 访问次数:2419
接口说明(已停用)

通过本接口用户可以计算出库费用。

使用场景(已停用)

用户可使用本接口计算出库费用。 可分两种情况计算: 1、 通过产品编码、产品数量计算(支持多个产品) 2、 通过产品长宽高、重量、数量计算(暂不支持多个产品的费用计算)

备注

请求说明
URL http://api.winit.com.cn/ADInterface/api
接口测试 http://erp.sandbox.winit.com.cn/ADInterface/api
验证方法 Token,md5
格式 json
字符编码 UTF-8
http请求方式 http
请求数限制 默认每分钟1000,有需要可申请加大。
请求入参
名称 类型 必填 说明 示例
country String() Y 目的地国家
warehouseID String(22) Y 仓库ID
zipCode String(22) N 邮编
按产品编码(已注册产品)、数量计算
productList List 产品列表,以下为子节点
--| productCode String(255) Y 产品编码
--| productNum Int Y 产品数量
--| specification String(255) 选填,当产品注册时填写了Specification,则下入库单时必填。 产品规格
按产品长宽高重量、数量计算
length Number(10,2) Y 产品长度
width Number(10,2) Y 产品宽度
height Number(10,2) Y 产品高度
weight Number(10,2) Y 产品重量(Kg)
productNum Int Y 产品数量
请求示例
按产品Code、数量计算
{
    "action": "calcDeliveryFee",
    "app_key": "rebecca",
    "client_id":"ODJKMDU1YZCTYJQ5YY00ZWZLLTK5N2QTOWY4MZI5OGMWNDG2",
    "client_sign":"38B87482C92FFEF0F10292B7AFA44087",
    "data": {
           "country":"AU",
          "productList": [
            {
                "productCode": "HDMI 2M Black",
                "productNum": "2",
                "specification": "数据线黑色"
            }
             ,
            {
    "productCode": "HDMI 2M White",
                "productNum": "1",
                "specification": "数据线白色"
     }
        ],
        "warehouseID": "1000001",
        "zipCode": "3153"
    },
    "format": "json",
    "language": "zh_CN",
    "platform": "",
    "sign": "00000000000000000000000000000000",
    "sign_method": "md5",
    "timestamp": "",
    "version": "1.0"
}
 
按产品长宽高重量、数量计算
{
    "action": "calcDeliveryFee",
    "app_key": "rebecca",
    "client_id":"ODJKMDU1YZCTYJQ5YY00ZWZLLTK5N2QTOWY4MZI5OGMWNDG2",
    "client_sign":"38B87482C92FFEF0F10292B7AFA44087"
    "data": {
           "country":"AU",
        "length": "25",
        "width": "23",
        "height": "3",
        "weight": "0.2",
        "warehouseID": "1000001",
        "zipCode": "3153",
        "productNum":"2"
    },
    "format": "json",
    "language": "zh_CN",
    "platform": "",
    "sign": "00000000000000000000000000000000",
    "sign_method": "md5",
    "timestamp": "",
    "version": "1.0"
}

                        
返回出参
名称 类型 必填 说明 示例
lastMileFee Number(10,2) Y 派送费
deliveryWayID String(20) Y 尾程派送方式ID
ISOCode String(10) Y 币种
deliveryWay String(80) Y 尾程派送方式名称
totalFeeUSD Number(10,2) Y 预估总费用
orderProcessFee Number(10,2) Y 订单处理费
logisticsTime Int Y 派送时效

正确的返回结果:尾程运费(lastMileFee)、派送方式ID(deliveryWayID)、 币种(ISOCode)、派送方式(deliveryWay)、总费用(totalFeeUSD)、 订单处理费(orderProcessFee)、转运时效(logisticsTime),且所有满足条件的派送方式费用计算结果都会列出。 错误的返回结果:错误码,错误信息

返回示例
{
   "code": 0,
   "data":    [
            {
         "lastMileFee": "6.56",
         "deliveryWayID": 1000024,
         "ISOCode": "USD",
         "deliveryWay": "AU Post Parcel Post (No Registration)",
         "totalFeeUSD": "7.08",
         "orderProcessFee": "0.52",
         "logisticsTime": 6
      },
            {
         "lastMileFee": "8.76",
         "deliveryWayID": 1000021,
         "ISOCode": "USD",
         "deliveryWay": "AU Post Parcel Post(With Registration)",
         "totalFeeUSD": "9.28",
         "orderProcessFee": "0.52",
         "logisticsTime": 6
      },
            {
         "lastMileFee": "8.76",
         "deliveryWayID": 1010399,
         "ISOCode": "USD",
         "deliveryWay": "Toll Priority",
         "totalFeeUSD": "9.28",
         "orderProcessFee": "0.52",
         "logisticsTime": 3
      },
            {
         "lastMileFee": "8.77",
         "deliveryWayID": 1000020,
         "ISOCode": "USD",
         "deliveryWay": "AU Post eParcel",
         "totalFeeUSD": "9.29",
         "orderProcessFee": "0.52",
         "logisticsTime": 6
      },
            {
         "lastMileFee": "11.26",
         "deliveryWayID": 1000190,
         "ISOCode": "USD",
         "deliveryWay": "AU Post Express",
         "totalFeeUSD": "11.78",
         "orderProcessFee": "0.52",
         "logisticsTime": 5
      },
            {
         "lastMileFee": "12.16",
         "deliveryWayID": 1010379,
         "ISOCode": "USD",
         "deliveryWay": "Toll IPEC",
         "totalFeeUSD": "12.68",
         "orderProcessFee": "0.52",
         "logisticsTime": 6
      }
   ],
   "msg": "成功"
}