文档中心 > API类目 > 淘宝客API

taobao.tbk.dg.reports.query (报表查询)

报表查询API(导购)

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
report_type_id String 必须 union_channel_content_basic_v1 报表名称
return_fields String 可选 name 查询字段
filters String 必须 ds=20180919 查询条件
dimensions String 可选 ds 聚合条件
page_no Number 必须 1 页码
page_size Number 必须 20 每页大小

响应参数

名称 类型 示例值 描述
page_info RptPageinfo map 分页信息
  • └ page_size
  • Number
  • 100
  • 每页大小
  • └ page_no
  • Number
  • 1
  • 页数
  • └ total_cnt
  • Number
  • 20
  • 总数
row_list Json id,pub_id,name,sub_pub_id,sub_site_id,sub_adzone_id,biz_type,click,num_of_miid,alipay_num,alipay_amt,pre_pub_share_fee,pre_3rd_pub_share_fee,cm_pub_share_fee,cm_3rd_pub_share_fee,ds 行值数组
column_list String [] id 主键,pub_id 平台pubid,name 达人名称,sub_pub_id 达人pubid,sub_site_id 达人siteid,sub_adzone_id 达人adzoneid,biz_type 业务类型,click 淘客点击(宽口径),num_of_miid 淘客点击UV(宽口径),alipay_num 成交笔数,alipay_amt 成交金额,pre_pub_share_fee 平台预估收入,pre_3rd_pub_share_fee 达人预估收入,cm_pub_share_fee 平台结算预估收入,cm_3rd_pub_share_fee 达人结算预估收入,ds 日期 列名数组
report_type_id String union_channel_content_basic_v1 报表名称

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TbkDgReportsQueryRequest req = new TbkDgReportsQueryRequest();
req.setReportTypeId("union_channel_content_basic_v1");
req.setReturnFields("name");
req.setFilters("ds=20180919");
req.setDimensions("ds");
req.setPageNo(1L);
req.setPageSize(20L);
TbkDgReportsQueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<tbk_dg_reports_query_response>
    <page_info>
        <page_size>100</page_size>
        <page_no>1</page_no>
        <total_cnt>20</total_cnt>
    </page_info>
    <row_list>id,pub_id,name,sub_pub_id,sub_site_id,sub_adzone_id,biz_type,click,num_of_miid,alipay_num,alipay_amt,pre_pub_share_fee,pre_3rd_pub_share_fee,cm_pub_share_fee,cm_3rd_pub_share_fee,ds</row_list>
    <column_list>
        <string>id  主键</string>
        <string>pub_id  平台pubid</string>
        <string>name  达人名称</string>
        <string>sub_pub_id  达人pubid</string>
        <string>sub_site_id  达人siteid</string>
        <string>sub_adzone_id 达人adzoneid</string>
        <string>biz_type  业务类型</string>
        <string>click 淘客点击(宽口径)</string>
        <string>num_of_miid  淘客点击UV(宽口径)</string>
        <string>alipay_num  成交笔数</string>
        <string>alipay_amt  成交金额</string>
        <string>pre_pub_share_fee  平台预估收入</string>
        <string>pre_3rd_pub_share_fee  达人预估收入</string>
        <string>cm_pub_share_fee  平台结算预估收入</string>
        <string>cm_3rd_pub_share_fee  达人结算预估收入</string>
        <string>ds  日期</string>
    </column_list>
    <report_type_id>union_channel_content_basic_v1</report_type_id>
</tbk_dg_reports_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>

错误码解释

错误码 错误描述 解决方案
1001 非法的me参数值 传入正确的me参数值,含有券ID与商品ID信息
10000 该itemId对应的宝贝已下架或非淘客宝贝 更换新的itemId查询
4 查询不到对应的adzoneId,请检查adzoneId是否正确 查询不到对应的adzoneId,请检查adzoneId是否正确
30002 参数q与cat不能都为空 参数q与cat不能都为空
2 pid不正确,请检查是否输入了正确的adzoneId和siteId pid不正确,请检查是否输入了正确的adzoneId和siteId
50001 无结果 无结果

API工具

如何获得此API

FAQ

返回
顶部