首页 > API文档 > 智选物流API
智选物流API提供智能选择快递公司的服务,根据用户提供的收派件地址、物流协议价格、客服留言等数据,智选物流将根据到不到件、近三天的实时时效和协议价格,再结合客服留言,为用户推荐最适合的物流公司,在超区、时效均保证的前提下,为用户节省快递费用。
(1)电商平台、电商ERP审单环节,通过智选物流直接选择最优快递公司
(2)APP、公众号、PC网站等提供的下单模块,通过智选物流提供到件、时效信息、价格信息供用户下单时选择
1.智选物流
1.1.智选物流
1.1.1.功能说明
同一线路不同快递公司的时效对比,帮助商家选择服务能力好的快递公司,可根据快递覆盖区域,运费、时效、服务等综合判断最优快递。
1.1.2.接口规则
(1)、接口只支持Json格式参数,接口指令2006。只支持POST请求方式,utf-8编码。
(2)、支持增值服务,保价、代收货款、货款直退、货款垫付等。
(3)、测试地址:http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json
(3)、正式地址:https://api.kdniao.com/api/exrecommend/
1.1.3.系统级输入参数
1.1.4.应用级输入参数
Detail参数:
ExpressList参数:
1.1.5.返回结果参数
1.1.6.JSON请求示例
{
"MemberID": "123456",
"WarehouseID": "1",
"Detail": [
{
"OrderCode": "12345",
"OriginalExpCode":"SF",
"EstimatedShipTime":"2017-02-16 12:13:12"
"IsCOD": 0,
"Sender": {
"ProvinceName": "广东省",
"CityName": "广州",
"ExpAreaName": "龙岗区",
"Subdistrict": "布吉街道",
"Address": "518000"
},
"Receiver": {
"ProvinceName": "广东",
"CityName": "梅州",
"ExpAreaName": "丰顺",
"Subdistrict": "布吉街道",
"Address": "518000"
},
"Goods": [
{
"ProductName": "包",
"Volume": "",
"Weight": "1"
}
]
},
{
"OrderCode": "12346",
"IsCOD": 0,
"Sender": {
"ProvinceName": "广东省",
"CityName": "广州",
"ExpAreaName": "龙岗区",
"Subdistrict": "布吉街道",
"Address": "518000"
},
"Receiver": {
"ProvinceName": "湖南",
"CityName": "长沙",
"ExpAreaName": "龙岗区",
"Subdistrict": "布吉街道",
"Address": "518000"
},
"Goods": [
{
"ProductName": "包",
"Volume": "",
"Weight": "1"
}
]
}
]
}
1.1.7.JSON返回示例
{
"EBusinessID": "1257227",
"Success": true,
"RecommendDetail": [
{
"ExpressList": [
{
"ExpCode": "ZTO",
"ExpName": "中通速递",
"LineName": "",
"Fee": 10.00,
"EstimatedDeliveryTime": 44.20,
"SpecificDeliveryTime ":"2017-02-12 09:12",
"IsSupport": "1",
"RecommendReason": 0,
"Remark": ""
},
{
"ExpCode": "ZTO",
"ExpName": "中通速递",
"LineName": "",
"Fee": 10.00,
"EstimatedDeliveryTime": 44.20,
"IsSupport": "1",
"RecommendReason": 1,
"Remark": ""
},
{
"ExpCode": "JYM",
"ExpName": "加运美",
"SpecificDeliveryTime ":"2017-02-12 09:12",
"LineName": "",
"EstimatedDeliveryTime": 15.23,
"IsSupport": "1",
"RecommendReason": 2,
"Remark": ""
}
],
"OrderCode": "12345"
},
{
"ExpressList": [
{
"ExpCode": "ZTO",
"ExpName": "中通速递",
"SpecificDeliveryTime ":"2017-02-12 09:12",
"LineName": "",
"Fee": 16.00,
"EstimatedDeliveryTime": 48.26,
"IsSupport": "1",
"RecommendReason": 0,
"Remark": ""
},
{
"ExpCode": "ZTO",
"ExpName": "中通速递",
"SpecificDeliveryTime ":"2017-02-12 09:12",
"LineName": "",
"Fee": 16.00,
"EstimatedDeliveryTime": 48.26,
"IsSupport": "1",
"RecommendReason": 1,
"Remark": ""
},
{
"ExpCode": "SF",
"ExpName": "顺丰快递",
"LineName": "",
"EstimatedDeliveryTime": 38.33,
"IsSupport": "1",
"RecommendReason": 2,
"Remark": ""
}
],
"OrderCode": "12346"
}
]
}
1.2.运费模板导入接口
1.2.1.功能说明
ERP服务商也可以将用户的协议物流公司及其协议价格先保存到快递鸟运费模板系统中,智选物流每次计算时:
若接口传递了协议公司和价格,那么默认按照接口提供的数据进行计算;
若接口没有提供数据,则快递鸟获取以保存的运费模板进行计算。
若用户接口和运费模板均没有提供协议公司和价格,或者接口中用户ID、仓库ID为空,或者系统找不到匹配的用户ID、仓库ID,则快递鸟默认使用市场价格进行计算。
用户的协议价格若发生变化(新增、修改和删除),ERP服务商需将该仓库的全量数据同步到快递鸟,快递鸟将对应仓库的数据进行全量更新。
ERP服务商需统一用户ID并保证用户ID的唯一性,若智选物流接口传递的用户ID与运费模板的用户ID不一致或因为ID不唯一而造成数据错乱,均会影响智选物流接口的计算结果。
全量数据传输时需保证数据的完整性,否则会影响智选物流接口的结果。
1.2.2.接口规则
(1)、仅支持Json格式
(2)、请求指令2004
(3)、测试接口地址:
http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json
(4)、联调通过后请更换为正式地址:
https://api.kdniao.com/Ebusiness/EbusinessOrderHandle.aspx
1.2.3.系统级输入参数
1.2.4.应用级输入参数
IntervalList
1.2.5.返回结果参数
1.2.6.JSON请求示例
{
"MemberID": "123456",
"WarehouseID": "123456",
"Detail": [
{
"ShipperCode": "SF",
"ExpenseTemplate":"次日达",
"SendProvince": "广东",
"SendCity": "广州",
"SendExpArea": "天河",
"ReceiveProvince": "广东",
"ReceiveCity": "深圳",
"ReceiveExpArea": "龙岗",
"ShippingType":0
"FirstWeight": "1",
"FirstFee": "8",
"AdditionalWeight": "1",
"AdditionalFee": "10",
"WeightFormula": ""
},
{
"ShipperCode": "YD",
"ExpenseTemplate":"",
"SendProvince": "广东",
"SendCity": "广州",
"SendExpArea": "天河",
"ReceiveProvince": "湖南",
"ReceiveCity": "长沙",
"ReceiveExpArea": "雨花",
"ShippingType":0
"FirstWeight": "",
"FirstFee": "",
"AdditionalWeight": "",
"AdditionalFee": "",
"WeightFormula": "{{w-0}-0.4}*{{{1000-w}-0.4}+1}*4.700+ {{w-1000}-0.6}*[(w-1000)/1000]*4.700"
}
]
}
1.2.7.JSON返回示例
{
"EBusinessID": "1257227",
"Success": true,
"MemberID": "123456"
}