回传订单状态轨迹接口(TMS->DMS)

描述

TMS系统回传订单的状态给DMS系统,状态包含宅配承运商揽收,派送,签收,拒签,异常,分站进,分站出。

服务名称

服务名称:RequestOrderStateToDMS

请求字段

  • 基本参数
名称 类型 可选/必选 备注
RequestName String(64) 必选 服务名称RequestOrderStateToDMS
DelveryCode String(64) 必选 TMS承运商编码(该参数由DMS系统指定,请向相关人员索取)
Sign String(64) 必选 签名内容,即密钥
TimeStamp String 必选 时间戳
Content String 必选 消息内容
  • 业务参数
名称 类型 可选/必选 备注
ClientCode String(64) 必选 订单号
WorkCode String(64) 必选 运单号
OperationPerson String(30) 必选 操作人,WorkStatus为TMS_DELIVERING派件时,该值表示配送人员姓名。
OperationPhone String(32) 可选 操作联系人电话,WorkStatus为TMS_DELIVERING派件时,该值表示配送人员电话
DelveryTel String(32) 可选 宅配承运商客服电话
OperationTime String 必选 操作时间格式yyyy-mm-ddhh:mm:ss
WorkStatus String(32) 必选 运单状态:TMS_ACCEPT-已揽收、TMS_DELIVERING派送中、TMS_SIGN-签收成功、TMS_FAILED-拒签、TMS_ERROR-异常、TMS_STATION_IN(分站进)、TMS_STATION_OUT(分站出)
OperationDesc String(500) 必选 操作内容
OperationUnit String(50) 必选 WorkStatus为TMS_SIGN为签收成功时:此值代表去妥投的站点名称,其余为操作单位名称
OperationCity String(50) 必选 操作站点所对应的城市
FacilityType String(50) 必选 操作单位类型:1:站点/2:分拨中心
NextStation String(50) 条件必选 WorkStatus为TMS_STATION_OUT为分站出时必填,此值代表下一站站点名称。
NextCity String(50) 条件必选 WorkStatus为TMS_STATION_OUT为分站出时必填,此值代表下一站站点城市。
  • 注意:
    • 订单的起始状态是TMS_ACCEPT,表示已揽收到货而不是已收到订单消息。
    • 订单的终结状态是TMS_SIGN或TMS_FAILED(拒签或投递失败)
    • 除以上起始和终结状态外,其他均为中间状态。起始和终结状态必须确保唯一。不允许同一个订单+运单的组合出现多次接单或多次签收,投递失败。(可以有多个中间状态)
    • 回传拒签(TMS_FAILED)之后,允许再回传签收。但签收后,不允许回传拒签。如果确实是实操错误,则需求及时通知管理员介入处理。
    • 正常的状态回传顺序(依次): 接单(TMS_ACCECPT,对应TMS是已揽货。) 派送中(TMS_DELIVERING,小件员派件,有分站的还需回传分站进出。) 已签收(TMS_SIGN) 每一笔订单都应该保证状态完整,如果漏传状态,TMS需要保证可以补传。如漏传接单直接回传派送,则需要支持补传接单状态。

JSON样例

  • TMS下发:
ACCEPT:
{"RequestName":"RequestOrderStateToDMS","TimeStamp":"2017-05-0704:15:02","Sign":"e5073817f378bfb49dbf0602d17debf7","Content":{"WorkCode":"JY0001996183","OperationPerson":"xxx","OperationPhone":"","DelveryTel":"","OperationTime":"2017-05-0704:03:56","WorkStatus":"TMS_ACCEPT","OperationDesc":"已揽收【重庆渝北分拨中心】","ClientCode":"Z300012274531","OperationUnit":"重庆渝北分拨中心","OperationCity":"重庆市","FacilityType":"2"},"DelveryCode":"CQHY"}
TMS_STATION_OUT:
{"RequestName":"RequestOrderStateToDMS","TimeStamp":"2017-05-0705:00:02","Sign":"afa69fb02d3a60137d8c672d509dd935","Content":{"WorkCode":"JY0001996183","OperationPerson":"xxx","OperationPhone":"","DelveryTel":"","OperationTime":"2017-05-0704:54:53","WorkStatus":"TMS_STATION_OUT","OperationDesc":"离开【重庆渝北分拨中心】发往【江北2】","ClientCode":"Z300012274531","OperationUnit":"重庆渝北分拨中心","OperationCity":"重庆市","FacilityType":"2","NextStation":"江北2","NextCity":"重庆"},"DelveryCode":"CQHY"}
TMS_STATION_IN:
{"RequestName":"RequestOrderStateToDMS","TimeStamp":"2017-05-1514:45:00","Sign":"db226cbee86caf9316cfa0b37d9725cb","Content":{"WorkCode":"JY0001996183","OperationPerson":"xxx","OperationPhone":"","DelveryTel":"","OperationTime":"2017-05-1514:43:40","WorkStatus":"TMS_STATION_IN","OperationDesc":"到达【江北2】","ClientCode":"Z300012274531","OperationUnit":"江北2","OperationCity":"重庆市","FacilityType":"1"},"DelveryCode":"CQHY"}
TMS_ DELIVERING:
{"RequestName":"RequestOrderStateToDMS","TimeStamp":"2017-05-1609:15:00","Sign":"f2dd0e71be8daf7fd84ab3a4df5d92f4","Content":{"WorkCode":"JY0001996183","OperationPerson":"代克俊","OperationPhone":"18908379612","DelveryTel":"","OperationTime":"2017-05-1609:03:27","WorkStatus":"TMS_DELIVERING","OperationDesc":"离开【江北2】正在配送中,派件人: 【代克俊】手机: 【18908379612】","ClientCode":"Z300012274531","OperationUnit":"江北2","OperationCity":"重庆市","FacilityType":"1"},"DelveryCode":"CQHY"}
TMS_ERROR:
{"RequestName":"RequestOrderStateToDMS","TimeStamp":"2017-05-0820:00:00","Sign":"d621245a6f7fa74a8cd5d17af30eb94d","Content":{"WorkCode":"JY0001996183","OperationPerson":"xxx","OperationPhone":"","DelveryTel":"","OperationTime":"2017-05-0819:51:31","WorkStatus":"TMS_ERROR","OperationDesc":"滞留原因:联系不上送无人","ClientCode":"Z300012274531","OperationUnit":"江北2","OperationCity":"重庆市","FacilityType":"1"},"DelveryCode":"CQHY"}
TMS_FAILED:
{"RequestName":"RequestOrderStateToDMS","TimeStamp":"2017-05-1018:30:00","Sign":"01144867786ce4dbf8038ae2dafbd41c","Content":{"WorkCode":"JY0001996183","OperationPerson":"xxx","OperationPhone":"","DelveryTel":"","OperationTime":"2017-05-1018:15:18","WorkStatus":"TMS_FAILED","OperationDesc":"拒收原因:联系不上收货人","ClientCode":"Z300012274531","OperationUnit":"江北2","OperationCity":"重庆市","FacilityType":"1"},"DelveryCode":"CQHY"}
TMS_SIGN:
{"RequestName":"RequestOrderStateToDMS","TimeStamp":"2017-05-1619:00:00","Sign":"208d670e5a30c965f232705955588c97","Content":{"WorkCode":"JY0001996183","OperationPerson":"xxx","OperationPhone":"","DelveryTel":"","OperationTime":"2017-05-1618:46:38","WorkStatus":"TMS_SIGN","OperationDesc":"订单已签收,签收人:李长政","ClientCode":"Z300012274531","OperationUnit":"江北2","OperationCity":"重庆市","FacilityType":"1"},"DelveryCode":"CQHY"}
  • DMS返回:
  • 成功:
{"RequestName":"RequestOrderStateToDMS",
"Partner":"",
"Success":true,
"Msg":"成功",
"Count":0,
"Code":"0",
"Content":null
}
  • 失败:
{"RequestName":"RequestOrderStateToDMS",
"Partner":"",
"Success":fasle,
"Msg":"系统错误",
"Count":0,
"Code":"100",
"Content":null
}