文档中心 > API类目 > 手淘开放API

taobao.logistics.fengchao.msg.send (丰巢走淘宝发包裹状态通知接口)

丰巢走淘宝发包裹状态通知接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
msg_send_request MsgSendRequest 可选 请求对象
  • └ cp_code
  • String
  • 可选
  • ZTO
  • 快递公司编码
  • └ mail_no
  • String
  • 可选
  • 78637917732601
  • 运单号
  • └ occur_time
  • Number
  • 可选
  • 1669622596000
  • 发生时间
  • └ ext_params
  • String
  • 可选
  • { "stationName":"丰巢智能柜", "freeHour":"48", "priceByTimeText":"1元/2小时", "maxAmount":"36" }
  • 扩展参数
  • └ type
  • Number
  • 可选
  • 1
  • 类型(1-RETENTION-滞留即将收费、2-TAKEOUT-快递员取出)

响应参数

名称 类型 示例值 描述
result_msg String 参数异常 错误提示
result MsgSendResponse 对象
  • └ operate_time
  • Number
  • 99920000
  • 发送操作执行时间
  • └ sms_success
  • Boolean
  • true
  • 短信发送是否成功
  • └ sms_error_code
  • String
  • exceedLimit
  • 短信发送失败结果码(成功情况无需关注)
  • └ msg_push_success
  • Boolean
  • true
  • 交易物流消息是否发送成功
  • └ msg_push_error_code
  • String
  • exceedLimit
  • 交易物流消息发送失败结果码(成功情况无需关注)
result_code String UNKNOW_RRROR 错误码
result_success Boolean true 通讯成功/通讯失败

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
LogisticsFengchaoMsgSendRequest req = new LogisticsFengchaoMsgSendRequest();
LogisticsFengchaoMsgSendRequest.MsgSendRequest obj1 = new LogisticsFengchaoMsgSendRequest.MsgSendRequest();
obj1.setCpCode("ZTO");
obj1.setMailNo("78637917732601");
obj1.setOccurTime(1669622596000L);
obj1.setExtParams("{       \"stationName\":\"丰巢智能柜\",       \"freeHour\":\"48\",       \"priceByTimeText\":\"1元/2小时\",       \"maxAmount\":\"36\"     }");
obj1.setType(1L);
req.setMsgSendRequest(obj1);
LogisticsFengchaoMsgSendResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<logistics_fengchao_msg_send_response>
    <result_msg>参数异常</result_msg>
    <result>
        <operate_time>99920000</operate_time>
        <sms_success>true</sms_success>
        <sms_error_code>exceedLimit</sms_error_code>
        <msg_push_success>true</msg_push_success>
        <msg_push_error_code>exceedLimit</msg_push_error_code>
    </result>
    <result_code>UNKNOW_RRROR</result_code>
    <result_success>true</result_success>
</logistics_fengchao_msg_send_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

返回
顶部