散客订单下发接口
基本信息
请求方式 | Post application/x-www-form-urlencoded |
---|---|
功能描述 | 商家将订单信息推送给菜鸟速递EDI,菜鸟速递返回预分拣及运单号信息 |
编码 | UTF-8 |
入参
项目 | 名称 | 类型 | 必填 | 描述 |
---|---|---|---|---|
对接码 | logistic_provider_id | String | 是 | 菜鸟侧提供 |
签名 | data_digest | String | 是 | Base64(Md5(logistics_interface+双方约定的secretKey)),0.2 签名方法 |
业务报文 | logistics_interface | Waybill | 是 | JSON |
出参
项目 | 名称 | 类型 | 必填 |
---|---|---|---|
成功标识 | success | boolean | 是 |
错误码 | errorCode | String | 否 |
错误说明 | errorMsg | String | 否 |
运单号 | mailNo | String | 否 |
预分拣信息 | sortingDataResponseDTO | SortingDataResponseDTO | 否 |
注意:
该接口必填参数:字段 | 类型 | 描述 |
---|---|---|
waybill->receiver->receiverName | String(40) | 收件人姓名 |
waybill->receiver->receiverMobile | String(20) | 收件人手机 不能有"-"以外的特殊字符 |
waybill->receiver->receiverProvince | String(20) | 收件人省份 |
waybill->receiver->receiverAddress | String(256) | 收件人详细地址 因部分区域行政区划没有市或者区,所以接口市和区县字段是非必填的,实际为了避免错分,需要把市和区县信息放到对应的字段传过来或者将完整地址信息放在详细地址里 |
waybill->sender->senderName | String(40) | 寄件人姓名 |
waybill->sender->senderMobile | String(20) | 寄件人手机 |
waybill->sender->senderProvince | String(20) | 寄件人省份 |
waybill->sender->senderAddress | String(256) | 寄件人详细地址 因部分区域行政区划没有市或者区,所以接口市和区县字段是非必填的,实际为了避免错分,需要把市和区县信息放到对应的字段传过来或者将完整地址信息放在详细地址里 |
waybill->packageInfo->goodsItems->itemName | String(128) | 商品名称 |
waybill->packageInfo->goodsItems->itemNum | Integer | 商品数量 |
waybill->packageInfo->weight | Integer | 包裹重量(g) |
waybill->order->logisticsId | String(32) | 订单号 |
示例报文
url:
http://edi-daily.xpm.cainiao.com/ext/gateway/smallbOrderReceive/api
请求: 仅供参考,实际测试账号需联系菜鸟速递开发提供
logistic_provider_id: edi_test_json
data_digest: Mq0TSL0kq6YZxgzJyOLxeQ==
logistics_interface:
{"order":{"logisticsId":"test190812001"},"packageInfo":{"goodsItems":[{"itemName":"测试商品","itemNum":1}],"weight":"870"},"receiver":{"receiverAddress":"中节能西溪首座","receiverDistrict":"蒋村街道","receiverArea":"西湖区","receiverCity":"杭州市","receiverMobile":"13111111111","receiverName":"张三","receiverProvince":"浙江省"},"sender":{"senderAddress":"宁波市北仑区保税南区九龙山路一号","senderDistrict":"大碶街道","senderArea":"北仑区保税南区","senderCity":"宁波市","senderCountry":"中国","senderMobile":"13111111111","senderName":"测试","senderProvince":"浙江省"}}
返回:
{"mailNo":"621000000000011","success":true,"sortingDataResponseDTO":{"endChuteShortCode":"1D","siteAreaCode":"05","cpShortCode":"K","siteName":"成都石羊场站Z","endRdcShortCode":"901","endRdcShortName":"双流","firstRdcShortCode":"33G","firstRdcShortName":"下沙","aoiCommunityName":"北南城都汇","cityShortCode":"P1","bizId":"test190812001","siteShortCode":"L29","omsRdcChuteCodeDTOS":[{"rdcShortName":"下沙","rdcId":60017,"rdcShortCode":"33G"},{"rdcShortName":"双流","rdcId":15222,"rdcShortCode":"901","chuteShortCode":"1D"}]}}