TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TbkScPunishOrderGetRequest req = new TbkScPunishOrderGetRequest();
TbkScPunishOrderGetRequest.TopApiAfOrderOption obj1 = new TbkScPunishOrderGetRequest.TopApiAfOrderOption();
obj1.setRelationId(2222L);
obj1.setTbTradeId(258897956183171983L);
obj1.setTbTradeParentId(258897956183171983L);
obj1.setPageSize(1L);
obj1.setPageNo(10L);
obj1.setSpan(10L);
obj1.setStartTime(StringUtils.parseDateTime("2018-11-11 00:01:01"));
obj1.setSpecialId(23132L);
obj1.setAdzoneId(123L);
obj1.setSiteId(123L);
obj1.setViolationType(1L);
obj1.setPunishStatus(1L);
req.setAfOrderOption(obj1);
TbkScPunishOrderGetResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TbkScPunishOrderGetRequest req = new TbkScPunishOrderGetRequest();
TbkScPunishOrderGetRequest.TopApiAfOrderOptionDomain obj1 = new TbkScPunishOrderGetRequest.TopApiAfOrderOptionDomain();
obj1.RelationId = 2222L;
obj1.TbTradeId = 258897956183171983L;
obj1.TbTradeParentId = 258897956183171983L;
obj1.PageSize = 1L;
obj1.PageNo = 10L;
obj1.Span = 10L;
obj1.StartTime = DateTime.Parse(2018-11-11 00:01:01");
obj1.SpecialId = 23132L;
obj1.AdzoneId = 123L;
obj1.SiteId = 123L;
obj1.ViolationType = 1L;
obj1.PunishStatus = 1L;
req.AfOrderOption_ = obj1;
TbkScPunishOrderGetResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TbkScPunishOrderGetRequest;
$af_order_option = new TopApiAfOrderOption;
$af_order_option->relation_id="2222";
$af_order_option->tb_trade_id="258897956183171983";
$af_order_option->tb_trade_parent_id="258897956183171983";
$af_order_option->page_size="1";
$af_order_option->page_no="10";
$af_order_option->span="10";
$af_order_option->start_time="2018-11-11 00:01:01";
$af_order_option->special_id="23132";
$af_order_option->adzone_id="123";
$af_order_option->site_id="123";
$af_order_option->violation_type="1";
$af_order_option->punish_status="1";
$req->setAfOrderOption(json_encode($af_order_option));
$resp = $c->execute($req, $sessionKey);
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.sc.punish.order.get' \
-d 'partner_id=apidoc' \
-d 'session=b209fb4e-517d-448c-b956-4f574a513b52' \
-d 'sign=E5742CE1A9B29126E7C41C0E5303C653' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-16+00%3A49%3A37' \
-d 'v=2.0' \
-d 'af_order_option=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TbkScPunishOrderGetRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.af_order_option=""
try:
resp= req.getResponse(sessionkey)
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.sc.punish.order.get");
add_param(pRequest,"af_order_option","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,sessionKey);
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.sc.punish.order.get', {
'af_order_option':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})