文档中心 > API类目 > 天猫优品

tmall.tmyp.ai.queryexceptionevents (查询物流异常信息)

查询物流异常信息

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
exception_event_request LogisticsOrderExceptionEventBizRequest 必须 request
  • └ service_type
  • String []
  • 可选
  • RCS102
  • 服务类型, 即交易标 _F_asdpAS 如: RCS102(按需配送)
  • └ gmt_create_start
  • Date
  • 可选
  • 2025-07-12 00:00:00
  • 异常创建时间,默认-7天,最大支持30天,即时间不能早于now -30d
  • └ biz_type
  • Number
  • 必须
  • 2
  • 业务单号 (必须选择单据类型)
  • └ event_type_code_list
  • String []
  • 可选
  • []
  • 异常类型,见异常类型说明中的异常code (建议3个以内)
  • └ event_seller_process_status
  • String []
  • 可选
  • [1]
  • 商家处理状态: 1未处理, 2已忽略 (建议设置1)
  • └ monitor_setup_time_start
  • Date
  • 可选
  • 2025-12-12 00:00:00
  • 支付起始时间,默认7天,最大支持30天,即时间不能早于now -30d,毫秒
  • └ monitor_setup_time_end
  • Date
  • 可选
  • 2025-07-12 00:00:00
  • 支付结束时间,默认当前时间,毫秒
  • └ seller_id
  • Number
  • 必须
  • 2332
  • 商家id
  • └ biz_opt_any_match_list
  • String []
  • 可选
  • [平台送货上门]
  • 业务选项任意匹配,如春节不打烊 "SPRING_FESTIVAL" : "春节不打烊" "freeHomeDelivery" : "平台送货上门"
  • └ event_write_off_status
  • String []
  • 可选
  • 1
  • 核销状态: 1未核销, 2已核销, 3同组覆盖 (建议设置为1, 已核销单据会在T+1删除,可能查不到)
  • └ biz_id
  • String
  • 必须
  • 222
  • 业务单号 (必须选择单据类型)
  • └ service_sub_type
  • String []
  • 可选
  • [OfficialLogistics-Consign]
  • 服务子类型, 即交易标 _F_AxDcType 如: OfficialLogistics-4PL(官流4pl), OfficialLogistics-Consign(官流纯配)
  • └ biz_opt_all_match_list
  • String []
  • 可选
  • [平台送货上门]
  • 业务选项全匹配,如春节不打烊 "SPRING_FESTIVAL" : "春节不打烊" "freeHomeDelivery" : "平台送货上门"
app_info AppInfo 必须 调用方app名称
  • └ app_name
  • String
  • 必须
  • lingyang
  • 调用方app名称

响应参数

名称 类型 示例值 描述
result LogisticsOrderExceptionEventDTO [] 异常时间
  • └ trade_id
  • String
  • 2332
  • 主单号
  • └ sub_trade_id
  • String
  • 3223
  • 子单号
  • └ mail_no
  • String
  • 3
  • 运单号
  • └ event_type_code
  • String
  • 0
  • 异常类型
  • └ monitor_release_time
  • Number
  • 0
  • 异常任务执行时间
  • └ est_consign_time
  • Number
  • 0
  • 应发货时间
  • └ base_time
  • Number
  • 0
  • 生成异常的基准时间, 与当前时间比较,可以判断该异常已超时多久.
  • └ biz_type
  • Number
  • 2
  • 1运单 2子交易单
  • └ biz_opts
  • String []
  • 业务标。"SPRING_FESTIVAL" : "春节不打烊" "freeHomeDelivery" : "平台送货上门"
  • └ event_write_off_status
  • Number
  • 1
  • 核销状态: 1未核销, 2已核销, 3同组覆盖
  • └ event_seller_process_status
  • Number
  • 1
  • 商家处理状态: 1未处理, 2已忽略
total Number 1 总数
biz_success Boolean true 成功
biz_error_message String "" 错误信息
biz_error_code String "" 错误码
need_retry Boolean false 是否需要重试

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TmallTmypAiQueryexceptioneventsRequest req = new TmallTmypAiQueryexceptioneventsRequest();
TmallTmypAiQueryexceptioneventsRequest.LogisticsOrderExceptionEventBizRequest obj1 = new TmallTmypAiQueryexceptioneventsRequest.LogisticsOrderExceptionEventBizRequest();
obj1.setServiceType("RCS102");
obj1.setGmtCreateStart(StringUtils.parseDateTime("2025-07-12 00:00:00"));
obj1.setBizType(2L);
obj1.setEventTypeCodeList("");
obj1.setEventSellerProcessStatus("1");
obj1.setMonitorSetupTimeStart(StringUtils.parseDateTime("2025-12-12 00:00:00"));
obj1.setMonitorSetupTimeEnd(StringUtils.parseDateTime("2025-07-12 00:00:00"));
obj1.setSellerId(2332L);
obj1.setBizOptAnyMatchList("平台送货上门");
obj1.setEventWriteOffStatus("1");
obj1.setBizId("222");
obj1.setServiceSubType("OfficialLogistics-Consign");
obj1.setBizOptAllMatchList("平台送货上门");
req.setExceptionEventRequest(obj1);
TmallTmypAiQueryexceptioneventsRequest.AppInfo obj2 = new TmallTmypAiQueryexceptioneventsRequest.AppInfo();
obj2.setAppName("lingyang");
req.setAppInfo(obj2);
TmallTmypAiQueryexceptioneventsResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<tmall_tmyp_ai_queryexceptionevents_response>
    <result>
        <logistics_order_exception_event_d_t_o>
            <trade_id>2332</trade_id>
            <sub_trade_id>3223</sub_trade_id>
            <mail_no>3</mail_no>
            <event_type_code>0</event_type_code>
            <monitor_release_time>0</monitor_release_time>
            <est_consign_time>0</est_consign_time>
            <base_time>0</base_time>
            <biz_type>2</biz_type>
            <event_write_off_status>1</event_write_off_status>
            <event_seller_process_status>1</event_seller_process_status>
        </logistics_order_exception_event_d_t_o>
    </result>
    <total>1</total>
    <biz_success>true</biz_success>
    <biz_error_message>&quot;&quot;</biz_error_message>
    <biz_error_code>&quot;&quot;</biz_error_code>
    <need_retry>false</need_retry>
</tmall_tmyp_ai_queryexceptionevents_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

返回
顶部