文档中心 > API类目 > 天猫供应链

taobao.logistics.index.metric.division.query (淘天指数地址维度指标值查询接口)

淘天指数地址维度指标值查询接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
index_metric_division_query_request IndexMetricDivisionQueryRequest 必须 地址维度指标值查询入参
  • └ request_time
  • Number
  • 必须
  • 1689067417799
  • 业务请求时间戳(毫秒)
  • └ request_id
  • String
  • 必须
  • xxx1689067417799xxx
  • 业务请求ID(服务商发起请求的ID)
  • └ supplier_id
  • String
  • 必须
  • 1000001
  • 淘天物流服务商ID
  • └ metric_code
  • String
  • 必须
  • fetch_sign_achievement_rate
  • 指标code:「fetch_sign_achievement_rate」揽签时效达成率、「long_sign_order_rate」超长单占比、「logistics_stagnation_rate」物流环节停滞率、「wan_qiu_service_rate」物流万求、「tp_service_resolve_rate」首次求助解决率、「new_policy_achievement_rate」新政按需履约达成率、「trajectory_complete_rate」轨迹信息完整率、「logistics_refund_rate」物流原因退款率
  • └ time_type
  • String
  • 必须
  • DAY
  • 时间维度类型:「DAY」日视图、「WEEK」周视图、「MONTH」月视图
  • └ time_value
  • String
  • 必须
  • 2025-01-01
  • 时间维度值:日视图填「年-月-日(yyyy-MM-dd)」、周视图填「年-周(yyyy-ww)」、月视图填「年-月(yyyy-MM)」
  • └ division_id_list
  • Number []
  • 必须
  • [1]
  • 地址ID列表,可调用标准地址库id查询接口进行查询,仅支持全国(传[1])、省、市级数据
  • └ query_scope
  • String
  • 必须
  • STO
  • 查询范围:「YTO」圆通、「ZTO」中通、「STO」申通、「YUNDA」韵达、「JT」极兔、「SF」顺丰、「POSTB」邮政小包、「JDLKD」京东快递
  • └ division_type
  • String
  • 必须
  • all
  • 列表地址类型:「all」全国、「province」省、「city」市
  • └ comparison_range
  • String
  • 必须
  • industry
  • 对比范围:「industry」行业、「franchise」加盟

响应参数

名称 类型 示例值 描述
index_metric_division_query_response IndexMetricDivisionQueryResponse 地址维度指标值查询出参
  • └ success
  • Boolean
  • true
  • 是否成功:「true」、「false」
  • └ code
  • String
  • SYSTEM_ERROR
  • 错误码
  • └ message
  • String
  • 系统繁忙,请稍后重试
  • 错误信息
  • data
  • IndexMetricDivisionQueryResult
  • 返回对象
  • └ best_index_value
  • String
  • 1.00%
  • 指标最优值(行业/加盟)
  • brand_index_list
  • LspIndexMetricBrand []
  • 品牌指标列表
  • └ tt_brand_code
  • String
  • STO
  • 淘天品牌Code
  • └ tt_brand_name
  • String
  • 申通快递
  • 淘天品牌名称
  • └ index_value
  • String
  • 1.00%
  • 指标值
  • └ rank
  • Number
  • 1
  • 排名

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
LogisticsIndexMetricDivisionQueryRequest req = new LogisticsIndexMetricDivisionQueryRequest();
LogisticsIndexMetricDivisionQueryRequest.IndexMetricDivisionQueryRequest obj1 = new LogisticsIndexMetricDivisionQueryRequest.IndexMetricDivisionQueryRequest();
obj1.setRequestTime(1689067417799L);
obj1.setRequestId("xxx1689067417799xxx");
obj1.setSupplierId("1000001");
obj1.setMetricCode("fetch_sign_achievement_rate");
obj1.setTimeType("DAY");
obj1.setTimeValue("2025-01-01");
obj1.setDivisionIdList(new Long[] { 1 };
);
obj1.setQueryScope("STO");
obj1.setDivisionType("all");
obj1.setComparisonRange("industry");
req.setIndexMetricDivisionQueryRequest(obj1);
LogisticsIndexMetricDivisionQueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<logistics_index_metric_division_query_response>
    <index_metric_division_query_response>
        <success>true</success>
        <code>SYSTEM_ERROR</code>
        <message>系统繁忙,请稍后重试</message>
        <data>
            <best_index_value>1.00%</best_index_value>
            <brand_index_list>
                <lsp_index_metric_brand>
                    <tt_brand_code>STO</tt_brand_code>
                    <tt_brand_name>申通快递</tt_brand_name>
                    <index_value>1.00%</index_value>
                    <rank>1</rank>
                </lsp_index_metric_brand>
            </brand_index_list>
        </data>
    </index_metric_division_query_response>
</logistics_index_metric_division_query_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

返回
顶部