实操回传接口

默认推送定义的全部实操状态(deliveryStatus),且后续可能新增状态码,需商家自行过滤自己需要的状态

基本信息

接口名称 TMS_PRACTICE_ACTION_FEEDBACK
请求方式 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 String JSON
logistics_interface内容
项目 名称 类型 必填
运单信息 waybills List<Waybill>
Waybill内容
项目 名称 类型 必填 描述 备注
订单信息 order Order 这个节点一定有
包裹信息 packageInfo PackageInfo 具体参见公共组件部分 每个节点都有
预分拣信息 sortingInfo SortingInfo 具体参见公共组件部分 主运单,客服回传一定这个节点
配送节点信息 deliveryNodeInfo DeliveryNodeInfo 具体参见公共组件部分 这个节点一定有
支付信息 payInfo PayInfo 具体参见公共组件部分 只有部分站点涉及COD的节点才有
去重信息 uniqueCode String(64)
扩展信息 extendFields List<ExtendField>
备注 remark String(2000)  
需要的扩展信息
项目 名称 类型 必填 描述 备注
操作人姓名 operatorName
操作人电话 operatorContact
操作人城市 operatorNodeCity
操作人省份 operatorProv
下一机构城市 nextNodeCity
下一机构省 nextNodeProv
下一机构名称 nextNodeName
操作描述 operationDesc  
揽收重量(g) collectWeight
揽收体积(立方厘米) collectVolume
揽收长(cm) collectLength
揽收宽(cm) collectWidth
揽收高 (cm) collectHeight  
揽收小件员姓名 collectorName
揽收小件员手机 collectorMobile
揽收网点名称 collectNodeName  

出参

项目 名称 类型 必填
成功标识 success boolean
错误码 errorCode String
错误说明 errorMsg String


由于接口模型较复杂,很多字段可能用不到,一般只需要关注下面常用字段即可

接口常用字段

字段 类型 必填 描述
waybill->order->mailNo String 运单号
waybill->order->storeOrderCode String 订单号
waybill->deliveryNodeInfo->deliveryStatus String 状态码,具体枚举参照最下方附录
waybill->deliveryNodeInfo->siteSendTime String 操作时间
waybill->deliveryNodeInfo->nodeName String 操作网点名称
waybill->deliveryNodeInfo->signType String 签收类型
waybill->deliveryNodeInfo->exceptionReason String 异常原因编码
waybill->deliveryNodeInfo->exceptionReasonDesc String 异常原因描述
waybill->deliveryNodeInfo->spMan String 派件小件员名称
waybill->deliveryNodeInfo->spManMobile String 派件小件员电话
waybill->extendFields->operatorNodeCity String 当前城市
waybill->extendFields->nextNodeCity String 下一城市
waybill->extendFields->nextNodeName String 下一网点名称
waybill->extendFields->operationDesc String 操作描述
waybill->extendFields->collectWeight String 揽收重量(g) ,仅C揽业务有,揽收核重状态回传
waybill->extendFields->collectVolume String 揽收体积(立方厘米) ,仅C揽业务有,揽收核重状态回传
waybill->extendFields->collectLength String 揽收长(cm),仅C揽业务有,揽收核重状态回传
waybill->extendFields->collectWidth String 揽收宽(cm),仅C揽业务有,揽收核重状态回传
waybill->extendFields->collectHeight String 揽收高 (cm),仅C揽业务有,揽收核重状态回传
waybill->extendFields->collectorName String 揽收小件员姓名,仅C揽业务有,寻求运力状态回传
waybill->extendFields->collectorMobile String 揽收小件员手机,仅C揽业务有,寻求运力状态回传
waybill->extendFields->collectNodeName String 揽收网点名称,仅C揽业务有,寻求运力状态回传
waybill->extendFields->cneWeight String 计费重量(g),揽收后任何状态都可能回传,建议有值的时候就保存

实操状态顺序

B揽业务正常实操状态顺序

ACCEPT-揽收
RDCReceiving-分拨收货
RDCDispatch-分拨发货
SiteArriveSite-到站
SiteOrderPick-小件员领货(派件中)
SiteAuditDeliverySuccess-配送成功(签收)

C揽业务正常实操状态顺序

SOUGHT_DELIVERY-寻求运力成功,接单成功后触发
ACCEPT-揽收
CHECK_BILL-揽收核重
RDCReceiving-分拨收货
RDCDispatch-分拨发货
SiteArriveSite-到站
SiteOrderPick-小件员领货(派件中)
SiteAuditDeliverySuccess-配送成功(签收)

示例报文

入参

仅供参考,实际测试账号需联系菜鸟速递开发提供

logistic_provider_id: edi_test_json

logistics_interface:

{
    "waybills": [{
        "deliveryNodeInfo": {
            "deliveryStatus": "RDCReceiving",
            "loginID": "024571",
            "nodeCode": "025F02",
            "nodeName": "南京溧水滨淮大道分拨中心",
            "rdcSendTime": "2018-08-29 02:50:00",
            "siteSendTime": "2018-11-06 16:20:01",
            "spMan": "024571"
        },
        "extendFields": [{
            "key": "operatorName",
            "value": "李顺意"
        }, {
            "key": "operatorContact",
            "value": "15952026924"
        }, {
            "key": "operatorNodeType",
            "value": "分拨"
        }, {
            "key": "operatorNodeCity",
            "value": "南京市"
        }, {
            "key": "operatorProv",
            "value": "江苏省"
        }, {
            "key": "importType",
            "value": "external"
        }],
        "order": {
            "customerCode": "edi_test_json",
            "lgOrderSource": "EDI",
            "mailNo": "TEST181109001",
            "storeOrderCode": "TESTD181109001"
        },
        "packageInfo": {
            "volume": 0,
            "weight": 0
        },
        "sortingInfo": {
            "carrierCode": "CBWL",
            "citySimplyCode": "AA",
            "cpSimplyCode": "C",
            "deliveryCode": "CHENGBANGPEISONG-0001",
            "siteCode": "1619136",
            "siteName": "扬州站",
            "storeCode": "无锡出版仓"
        }
    }]
}

data_digest: X32nVItKE9Vfd4yY5QOtnw==

注意:每个操作状态回传的字段有些区别,具体报文如下:

揽收:

{"waybills":[{"deliveryNodeInfo":{"deliveryStatus":"ACCEPT","nodeCode":"N_S_100669180","nodeName":"北京古城站Z","noteCity":"北京市","siteSendTime":"2020-07-28 18:45:24"},"extendFields":[{"key":"expectedDeliveryTime","value":"1596038340000"},{"key":"operatorNodeCity","value":"北京市"},{"key":"operatorProv","value":"北京"},{"key":"operatorNodeType","value":"站点"},{"key":"operatorName"},{"key":"operatorContact"}],"order":{"customerCode":"test","lgOrderSource":"EDI","mailNo":"test200729001","storeOrderCode":"test200729001"},"uniqueCode":"DANNIAO_ACCEPTtest2007290012020-07-28 18:45:24"}]}

分拨收货:


{
    "waybills": [{
        "deliveryNodeInfo": {
            "deliveryStatus": "RDCReceiving",
            "loginID": "024571",
            "nodeCode": "025F02",
            "nodeName": "南京溧水滨淮大道分拨中心",
            "rdcSendTime": "2018-08-29 02:50:00",
            "siteSendTime": "2018-11-06 16:20:01",
            "spMan": "024571"
        },
        "extendFields": [{
            "key": "operatorName",
            "value": "李顺意"
        }, {
            "key": "operatorContact",
            "value": "13111111111"
        }, {
            "key": "operatorNodeType",
            "value": "分拨"
        }, {
            "key": "operatorNodeCity",
            "value": "南京市"
        }, {
            "key": "operatorProv",
            "value": "江苏省"
        }, {
            "key": "importType",
            "value": "external"
        }],
        "order": {
            "customerCode": "yunji_cb",
            "lgOrderSource": "EDI",
            "mailNo": "TEST181109001",
            "storeOrderCode": "TESTD181109001"
        },
        "packageInfo": {
            "volume": 0,
            "weight": 0
        },
        "sortingInfo": {
            "carrierCode": "CBWL",
            "citySimplyCode": "AA",
            "cpSimplyCode": "C",
            "deliveryCode": "CHENGBANGPEISONG-0001",
            "siteCode": "1619136",
            "siteName": "扬州站",
            "storeCode": "无锡出版仓"
        }
    }]
}

分拨发货:

{
    "waybills": [{
        "deliveryNodeInfo": {
            "deliveryStatus": "RDCDispatch",
            "loginID": "023320",
            "nodeCode": "025F02",
            "nodeName": "南京溧水滨淮大道分拨中心",
            "rdcSendTime": "2018-08-29 06:00:58",
            "siteSendTime": "2018-11-06 21:16:01",
            "spMan": "023320"
        },
        "extendFields": [{
            "key": "operatorName",
            "value": "丁玥"
        }, {
            "key": "operatorContact",
            "value": "13111111111"
        }, {
            "key": "operatorNodeType",
            "value": "分拨"
        }, {
            "key": "operatorNodeCity",
            "value": "南京市"
        }, {
            "key": "operatorProv",
            "value": "江苏省"
        }, {
            "key": "importType",
            "value": "external"
        }],
        "order": {
            "customerCode": "yunji_cb",
            "lgOrderSource": "EDI",
            "mailNo": "TEST181109001",
            "storeOrderCode": "TESTD181109001"
        },
        "packageInfo": {
            "volume": 0,
            "weight": 0
        },
        "sortingInfo": {
            "carrierCode": "CBWL",
            "citySimplyCode": "AA",
            "cpSimplyCode": "C",
            "deliveryCode": "CHENGBANGPEISONG-0001",
            "siteCode": "1619136",
            "siteName": "扬州站",
            "storeCode": "无锡出版仓"
        }
    }]
}

到站:

{
    "waybills": [{
        "deliveryNodeInfo": {
            "deliveryStatus": "SiteArriveSite",
            "loginID": "006784",
            "nodeCode": "1619136",
            "nodeName": "扬州站",
            "siteSendTime": "2018-11-06 21:22:24",
            "spMan": "006784",
            "spManId": "006784"
        },
        "extendFields": [{
            "key": "ZbCpCode"
        }, {
            "key": "operatorName"
        }, {
            "key": "operatorContact"
        }, {
            "key": "operatorNodeType",
            "value": "站点"
        }, {
            "key": "operatorNodeCity",
            "value": "扬州市"
        }, {
            "key": "operatorProv",
            "value": "江苏省"
        }, {
            "key": "importType",
            "value": "external"
        }],
        "order": {
            "customerCode": "yunji_cb",
            "deliveryType": "1",
            "goodsAmount": 127.9,
            "isOffer": false,
            "lgOrderSource": "EDI",
            "mailNo": "TEST181109001",
            "planReceiveAmount": 0.0,
            "planReturnAmount": 0.0,
            "storeOrderCode": "TESTD181109001"
        },
        "receiver": {
            "receiverAddress": "中国江苏扬州市广陵区,东关街道扬州市莱茵苑11503",
            "receiverArea": "广陵区",
            "receiverCity": "扬州市",
            "receiverMobile": "13111111111",
            "receiverName": "测试",
            "receiverProvince": "江苏省",
            "receiverZip": "225001"
        },
        "sortingInfo": {
            "carrierCode": "CBWL"
        }
    }]
}

领货:

{
    "waybills": [{
        "deliveryNodeInfo": {
            "deliveryStatus": "SiteOrderPick",
            "loginID": "006784",
            "nodeCode": "1619136",
            "nodeName": "扬州站",
            "siteSendTime": "2018-11-06 21:29:26",
            "spMan": "杜进",
            "spManId": "006784",
            "spManMobile": "13111111111"
        },
        "extendFields": [{
            "key": "ZbCpCode"
        }, {
            "key": "operatorName"
        }, {
            "key": "operatorContact",
            "value": "1311111111"
        }, {
            "key": "operatorNodeType",
            "value": "站点"
        }, {
            "key": "operatorNodeCity",
            "value": "扬州市"
        }, {
            "key": "operatorProv",
            "value": "江苏省"
        }, {
            "key": "importType",
            "value": "external"
        }],
        "order": {
            "customerCode": "yunji_cb",
            "deliveryType": "1",
            "goodsAmount": 127.9,
            "isOffer": false,
            "lgOrderSource": "EDI",
            "mailNo": "TEST181109001",
            "planReceiveAmount": 0.0,
            "planReturnAmount": 0.0,
            "storeOrderCode": "TESTD181109001"
        },
        "receiver": {
            "receiverAddress": "中国江苏扬州市广陵区,东关街道扬州市莱茵苑",
            "receiverArea": "广陵区",
            "receiverCity": "扬州市",
            "receiverMobile": "13111111111",
            "receiverName": "测试",
            "receiverProvince": "江苏省",
            "receiverZip": "225001"
        },
        "sortingInfo": {
            "carrierCode": "CBWL"
        }
    }]
}

滞留:

{
    "waybills": [{
        "deliveryNodeInfo": {
            "deliveryStatus": "SiteAuditRetent",
            "exceptionReason": "zl022",
            "exceptionReasonDesc": "客户地址错误",
            "feedbackWay": "pc",
            "loginID": "006784",
            "nodeCode": "1619136",
            "nodeName": "扬州站",
            "signTime": "2018-08-29 09:31:58",
            "siteSendTime": "2018-08-29 09:31:58",
            "spMan": "杜进",
            "spManId": "006784",
            "spManMobile": "13111111111"
        },
        "extendFields": [{
            "key": "ZbCpCode"
        }, {
            "key": "operatorName"
        }, {
            "key": "operatorContact",
            "value": "13111111111"
        }, {
            "key": "operatorNodeType",
            "value": "站点"
        }, {
            "key": "operatorNodeCity",
            "value": "扬州市"
        }, {
            "key": "operatorProv",
            "value": "江苏省"
        }, {
            "key": "importType",
            "value": "external"
        }],
        "order": {
            "customerCode": "yunji_cb",
            "deliveryType": "1",
            "goodsAmount": 127.9,
            "isOffer": false,
            "lgOrderSource": "EDI",
            "mailNo": "TEST181109001",
            "planReceiveAmount": 0.0,
            "planReturnAmount": 0.0,
            "storeOrderCode": "TESTD181109001"
        },
        "receiver": {
            "receiverAddress": "中国江苏扬州市广陵区,东关街道扬州市莱茵苑",
            "receiverArea": "广陵区",
            "receiverCity": "扬州市",
            "receiverMobile": "13111111111",
            "receiverName": "测试",
            "receiverProvince": "江苏省",
            "receiverZip": "225001"
        },
        "sortingInfo": {
            "carrierCode": "CBWL"
        }
    }]
}

配送失败:

{
    "waybills": [{
        "deliveryNodeInfo": {
            "deliveryRemark": "客户无理由拒收-未开箱",
            "deliveryStatus": "SiteAuditDeliveryReject",
            "exceptionReason": "js001",
            "exceptionReasonDesc": "客户原因拒收认为商品与自己预期不符",
            "feedbackWay": "app",
            "loginID": "CBH0035605",
            "nodeCode": "1619121",
            "nodeName": "邳州站",
            "signTime": "2018-11-06 21:32:01",
            "siteSendTime": "2018-08-29 17:00:01",
            "spMan": "陈旭东",
            "spManId": "CBH0035605",
            "spManMobile": "1311111111"
        },
        "extendFields": [{
            "key": "ZbCpCode"
        }, {
            "key": "operatorName"
        }, {
            "key": "operatorContact",
            "value": "13111111111"
        }, {
            "key": "operatorNodeType",
            "value": "站点"
        }, {
            "key": "operatorNodeCity",
            "value": "徐州市"
        }, {
            "key": "operatorProv",
            "value": "江苏省"
        }, {
            "key": "importType",
            "value": "external"
        }],
        "order": {
            "customerCode": "yunji_cb",
            "deliveryType": "1",
            "goodsAmount": 107.3,
            "isOffer": false,
            "lgOrderSource": "EDI",
            "mailNo": "TEST181109001",
            "planReceiveAmount": 0.0,
            "planReturnAmount": 0.0,
            "storeOrderCode": "TESTD181109001"
        },
        "receiver": {
            "receiverAddress": "中国江苏徐州市邳州市运河镇,奚仲路加油站小店",
            "receiverArea": "邳州市",
            "receiverCity": "徐州市",
            "receiverMobile": "13111111111",
            "receiverName": "测试",
            "receiverProvince": "江苏省",
            "receiverZip": "221002"
        },
        "sortingInfo": {
            "carrierCode": "CBWL"
        }
    }]
}

配送成功:

{
    "waybills": [{
        "deliveryNodeInfo": {
            "deliveryStatus": "SiteAuditDeliverySuccess",
            "feedbackWay": "app",
            "loginID": "HCBJS000507",
            "nodeCode": "1619094",
            "nodeName": "木渎站",
            "signMan": "本人签收",
            "signTime": "2018-11-06 21:35:14",
            "signType": "1",
            "siteSendTime": "2018-11-06 21:35:14",
            "spMan": "何沈阳",
            "spManId": "HCBJS000507",
            "spManMobile": "1311111111"
        },
        "extendFields": [{
            "key": "ZbCpCode"
        }, {
            "key": "operatorName"
        }, {
            "key": "operatorContact",
            "value": "1311111111"
        }, {
            "key": "operatorNodeType",
            "value": "站点"
        }, {
            "key": "operatorNodeCity",
            "value": "苏州市"
        }, {
            "key": "operatorProv",
            "value": "江苏省"
        }, {
            "key": "importType",
            "value": "external"
        }],
        "order": {
            "customerCode": "yunji_cb",
            "deliveryType": "1",
            "goodsAmount": 212.5,
            "isOffer": false,
            "lgOrderSource": "EDI",
            "mailNo": "TEST181109001",
            "planReceiveAmount": 0.0,
            "planReturnAmount": 0.0,
            "storeOrderCode": "TESTD181109001"
        },
        "receiver": {
            "receiverAddress": "中国江苏苏州市吴中区,木渎镇凯马广场云山诗意小区6幢",
            "receiverArea": "吴中区",
            "receiverCity": "苏州市",
            "receiverMobile": "13111111111",
            "receiverName": "测试",
            "receiverProvince": "江苏省",
            "receiverZip": "215000"
        },
        "sortingInfo": {
            "carrierCode": "CBWL"
        }
    }]
}

附录

deliveryStatus枚举

编码 描述 备注
ACCEPT 揽收
RDCReceiving 分拨收货
RDCDispatch 分拨发货
SiteArriveSite 到站
SiteOrderPick 小件员领件
SiteAuditRetent 滞留
COLLECTION 代收
SiteAuditDeliverySuccess 签收
SiteAuditDeliveryReject 拒收
TMS_CANCEL_PROMISED 承诺拦截成功
TMS_CUT_SUCCESS 实物拦截成功
CANCEL_INTERCEPT 取消拦截 在拦截成功的基础上,取消拦截成功后的实操回传
ORDER_CANCEL 取消
CHECK_BILL 揽收核重
SOUGHT_DELIVERY 寻求运力成功 C揽业务用,接单成功后触发
UPDATE_TASK_ORDER_EXCUTE_USER 改派小件员 C揽业务用