TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TbkRtaConsumerMatchRequest req = new TbkRtaConsumerMatchRequest();
req.setAdzoneId(33L);
List<TbkRtaConsumerMatchRequest.OfferList> list2 = new ArrayList<TbkRtaConsumerMatchRequest.OfferList>();
TbkRtaConsumerMatchRequest.OfferList obj3 = new TbkRtaConsumerMatchRequest.OfferList();
list2.add(obj3);
obj3.setOfferId("123");
obj3.setTljUrl("https://www.taobao.com");
obj3.setItemId("1");
req.setOfferList(list2);
req.setSpecialId("1");
req.setDeviceValue("ssss");
req.setDeviceType("OAID");
req.setStrategyIdList("123456");
TbkRtaConsumerMatchResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TbkRtaConsumerMatchRequest req = new TbkRtaConsumerMatchRequest();
req.AdzoneId = 33L;
List<TbkRtaConsumerMatchRequest.OfferListDomain> list2 = new List<TbkRtaConsumerMatchRequest.OfferListDomain>();
TbkRtaConsumerMatchRequest.OfferListDomain obj3 = new TbkRtaConsumerMatchRequest.OfferListDomain();
list2.Add(obj3);
obj3.OfferId = "123";
obj3.TljUrl = "https://www.taobao.com";
obj3.ItemId = "1";
req.OfferList_ = list2;
req.SpecialId = "1";
req.DeviceValue = "ssss";
req.DeviceType = "OAID";
req.StrategyIdList = "123456";
TbkRtaConsumerMatchResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TbkRtaConsumerMatchRequest;
$req->setAdzoneId("33");
$offer_list = new OfferList;
$offer_list->offer_id="123";
$offer_list->tlj_url="https://www.taobao.com";
$offer_list->item_id="1";
$req->setOfferList(json_encode($offer_list));
$req->setSpecialId("1");
$req->setDeviceValue("ssss");
$req->setDeviceType("OAID");
$req->setStrategyIdList("123456");
$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.rta.consumer.match' \
-d 'partner_id=apidoc' \
-d 'sign=A8498ED22BB1020367D59FB935D897A4' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-16+00%3A51%3A55' \
-d 'v=2.0' \
-d 'adzone_id=33' \
-d 'device_type=OAID' \
-d 'device_value=ssss' \
-d 'offer_list=++%7B++%22offer_id%22%3A+1++%7D%2C++%7B++%22offer_id%22%3A+2++%7D++' \
-d 'special_id=1' \
-d 'strategy_id_list=123456'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TbkRtaConsumerMatchRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.adzone_id=33
req.offer_list="[ { "offer_id": 1 }, { "offer_id": 2 } ]"
req.special_id="1"
req.device_value="ssss"
req.device_type="OAID"
req.strategy_id_list="123456"
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.rta.consumer.match");
add_param(pRequest,"adzone_id","33");
add_param(pRequest,"offer_list","数据结构JSON示例");
add_param(pRequest,"special_id","1");
add_param(pRequest,"device_value","ssss");
add_param(pRequest,"device_type","OAID");
add_param(pRequest,"strategy_id_list","123456");
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.rta.consumer.match', {
'adzone_id':'33',
'offer_list':'数据结构JSON示例',
'special_id':'1',
'device_value':'ssss',
'device_type':'OAID',
'strategy_id_list':'123456'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})