TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TbkDgReportsNewqueryRequest req = new TbkDgReportsNewqueryRequest();
req.setPageSize(100L);
req.setPageNo(1L);
req.setDimensions("ds");
req.setFilters("ds=20191013;subpid=mm_123_132_321;pubId=1234;hasCount=false;position_index=123");
req.setReturnFields("id,pub_id,sub_pub_id,sub_site_id,sub_adzone_id,daren_id,content_id,tk_trade_create_time,click_timestamp,tb_auction_id,tb_auction_num,tb_auction_price,tb_trade_status,tk_trade_status,tb_trade_parent_id,tb_trade_id,tb_auction_category_level1,tb_auction_category,tb_auction_category_level1_name,tb_alipay_total_price,pre_3rd_pub_share_fee,tk_3rd_pub_share_fee,tk_commission_rate");
req.setReportTypeId("union_media_newlink_subpid_order_detail");
TbkDgReportsNewqueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TbkDgReportsNewqueryRequest req = new TbkDgReportsNewqueryRequest();
req.PageSize = 100L;
req.PageNo = 1L;
req.Dimensions = "ds";
req.Filters = "ds=20191013;subpid=mm_123_132_321;pubId=1234;hasCount=false;position_index=123";
req.ReturnFields = "id,pub_id,sub_pub_id,sub_site_id,sub_adzone_id,daren_id,content_id,tk_trade_create_time,click_timestamp,tb_auction_id,tb_auction_num,tb_auction_price,tb_trade_status,tk_trade_status,tb_trade_parent_id,tb_trade_id,tb_auction_category_level1,tb_auction_category,tb_auction_category_level1_name,tb_alipay_total_price,pre_3rd_pub_share_fee,tk_3rd_pub_share_fee,tk_commission_rate";
req.ReportTypeId = "union_media_newlink_subpid_order_detail";
TbkDgReportsNewqueryResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TbkDgReportsNewqueryRequest;
$req->setPageSize("100");
$req->setPageNo("1");
$req->setDimensions("ds");
$req->setFilters("ds=20191013;subpid=mm_123_132_321;pubId=1234;hasCount=false;position_index=123");
$req->setReturnFields("id,pub_id,sub_pub_id,sub_site_id,sub_adzone_id,daren_id,content_id,tk_trade_create_time,click_timestamp,tb_auction_id,tb_auction_num,tb_auction_price,tb_trade_status,tk_trade_status,tb_trade_parent_id,tb_trade_id,tb_auction_category_level1,tb_auction_category,tb_auction_category_level1_name,tb_alipay_total_price,pre_3rd_pub_share_fee,tk_3rd_pub_share_fee,tk_commission_rate");
$req->setReportTypeId("union_media_newlink_subpid_order_detail");
$resp = $c->execute($req);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=taobao.tbk.dg.reports.newquery' \
-d 'partner_id=apidoc' \
-d 'sign=C1EC7F93EDF4CA12C5F4A24487AF5688' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-16+00%3A59%3A07' \
-d 'v=2.0' \
-d 'dimensions=ds' \
-d 'filters=ds%3D20191013%3Bsubpid%3Dmm_123_132_321%3BpubId%3D1234%3BhasCount%3Dfalse%3Bposition_index%3D123' \
-d 'page_no=1' \
-d 'page_size=100' \
-d 'report_type_id=union_media_newlink_subpid_order_detail' \
-d 'return_fields=id%2Cpub_id%2Csub_pub_id%2Csub_site_id%2Csub_adzone_id%2Cdaren_id%2Ccontent_id%2Ctk_trade_create_time%2Cclick_timestamp%2Ctb_auction_id%2Ctb_auction_num%2Ctb_auction_price%2Ctb_trade_status%2Ctk_trade_status%2Ctb_trade_parent_id%2Ctb_trade_id%2Ctb_auction_category_level1%2Ctb_auction_category%2Ctb_auction_category_level1_name%2Ctb_alipay_total_price%2Cpre_3rd_pub_share_fee%2Ctk_3rd_pub_share_fee%2Ctk_commission_rate'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TbkDgReportsNewqueryRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.page_size=100
req.page_no=1
req.dimensions="ds"
req.filters="ds=20191013;subpid=mm_123_132_321;pubId=1234;hasCount=false;position_index=123"
req.return_fields="id,pub_id,sub_pub_id,sub_site_id,sub_adzone_id,daren_id,content_id,tk_trade_create_time,click_timestamp,tb_auction_id,tb_auction_num,tb_auction_price,tb_trade_status,tk_trade_status,tb_trade_parent_id,tb_trade_id,tb_auction_category_level1,tb_auction_category,tb_auction_category_level1_name,tb_alipay_total_price,pre_3rd_pub_share_fee,tk_3rd_pub_share_fee,tk_commission_rate"
req.report_type_id="union_media_newlink_subpid_order_detail"
try:
resp= req.getResponse()
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"taobao.tbk.dg.reports.newquery");
add_param(pRequest,"page_size","100");
add_param(pRequest,"page_no","1");
add_param(pRequest,"dimensions","ds");
add_param(pRequest,"filters","ds=20191013;subpid=mm_123_132_321;pubId=1234;hasCount=false;position_index=123");
add_param(pRequest,"return_fields","id,pub_id,sub_pub_id,sub_site_id,sub_adzone_id,daren_id,content_id,tk_trade_create_time,click_timestamp,tb_auction_id,tb_auction_num,tb_auction_price,tb_trade_status,tk_trade_status,tb_trade_parent_id,tb_trade_id,tb_auction_category_level1,tb_auction_category,tb_auction_category_level1_name,tb_alipay_total_price,pre_3rd_pub_share_fee,tk_3rd_pub_share_fee,tk_commission_rate");
add_param(pRequest,"report_type_id","union_media_newlink_subpid_order_detail");
pResponse = top_execute(pClient,pRequest,NULL);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('taobao.tbk.dg.reports.newquery', {
'page_size':'100',
'page_no':'1',
'dimensions':'ds',
'filters':'ds=20191013;subpid=mm_123_132_321;pubId=1234;hasCount=false;position_index=123',
'return_fields':'id,pub_id,sub_pub_id,sub_site_id,sub_adzone_id,daren_id,content_id,tk_trade_create_time,click_timestamp,tb_auction_id,tb_auction_num,tb_auction_price,tb_trade_status,tk_trade_status,tb_trade_parent_id,tb_trade_id,tb_auction_category_level1,tb_auction_category,tb_auction_category_level1_name,tb_alipay_total_price,pre_3rd_pub_share_fee,tk_3rd_pub_share_fee,tk_commission_rate',
'report_type_id':'union_media_newlink_subpid_order_detail'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})