文档中心 > API类目 > 淘天物流API

taobao.logistics.express.courier.sync (快递公司同步小件员信息)

快递公司同步小件员信息

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
tms_courier_request TmsCourierRequest 可选 小件员信息
  • └ service_type
  • String
  • 必须
  • 1
  • 服务类型
  • └ biz_code
  • String
  • 必须
  • 23423423
  • 单号
  • └ service_flag
  • String
  • 可选
  • 1
  • 服务标识
  • └ tms_cp_code
  • String
  • 可选
  • ZTO
  • 快递公司资源编码
  • tms_courier_info
  • TmsCourierInfoRequest
  • 必须
  • 小件员信息
  • └ courier_name
  • String
  • 必须
  • 张三
  • 小件员名称
  • └ courier_mobile
  • String
  • 必须
  • 1825111111
  • 小件员电话号码
  • └ courier_no
  • String
  • 可选
  • 123
  • 小件员编码
  • └ site_name
  • String
  • 可选
  • 网点A
  • 小件员所属的网点名称
  • └ site_code
  • String
  • 可选
  • ttwl001
  • 小件员所属的网点编码
  • └ supplier_id
  • String
  • 可选
  • 12341567891022
  • 服务商ID
  • └ delivery_code
  • String
  • 可选
  • TTWL001
  • 配资源编码
  • └ update_type
  • String
  • 可选
  • 1
  • 更新类型 1-首次分配小件员 2-改派小件员
  • └ reason
  • String
  • 可选
  • 1
  • 改派小件员原因 1-客服改派(上报超区、人工分单) 2-小件员转单 3-其他(update_type=2时,必填)

响应参数

名称 类型 示例值 描述
suc Boolean true 校验成功或者异常
biz_error_message String 单据不存在 错误码描述
biz_error_code String 10000 错误码标识
retry Boolean true 是否可重试

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
LogisticsExpressCourierSyncRequest req = new LogisticsExpressCourierSyncRequest();
LogisticsExpressCourierSyncRequest.TmsCourierRequest obj1 = new LogisticsExpressCourierSyncRequest.TmsCourierRequest();
obj1.setServiceType("1");
obj1.setBizCode("23423423");
obj1.setServiceFlag("1");
obj1.setTmsCpCode("ZTO");
LogisticsExpressCourierSyncRequest.TmsCourierInfoRequest obj2 = new LogisticsExpressCourierSyncRequest.TmsCourierInfoRequest();
obj2.setCourierName("张三");
obj2.setCourierMobile("1825111111");
obj2.setCourierNo("123");
obj2.setSiteName("网点A");
obj2.setSiteCode("ttwl001");
obj1.setTmsCourierInfo(obj2);
obj1.setSupplierId("12341567891022");
obj1.setDeliveryCode("TTWL001");
obj1.setUpdateType("1");
obj1.setReason("1");
req.setTmsCourierRequest(obj1);
LogisticsExpressCourierSyncResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<logistics_express_courier_sync_response>
    <suc>true</suc>
    <biz_error_message>单据不存在</biz_error_message>
    <biz_error_code>10000</biz_error_code>
    <retry>true</retry>
</logistics_express_courier_sync_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部