TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TbkScRtaConsumerMatchRequest req = new TbkScRtaConsumerMatchRequest();
req.setSiteId(22L);
req.setAdzoneId(33L);
List<TbkScRtaConsumerMatchRequest.OfferList> list2 = new ArrayList<TbkScRtaConsumerMatchRequest.OfferList>();
TbkScRtaConsumerMatchRequest.OfferList obj3 = new TbkScRtaConsumerMatchRequest.OfferList();
list2.add(obj3);
obj3.setOfferId("123");
obj3.setItemId("1");
obj3.setTljUrl("https://www.taobao.com");
req.setOfferList(list2);
req.setSpecialId("1");
req.setDeviceValue("ssss");
req.setDeviceType("OAID");
TbkScRtaConsumerMatchResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TbkScRtaConsumerMatchRequest req = new TbkScRtaConsumerMatchRequest();
req.SiteId = 22L;
req.AdzoneId = 33L;
List<TbkScRtaConsumerMatchRequest.OfferListDomain> list2 = new List<TbkScRtaConsumerMatchRequest.OfferListDomain>();
TbkScRtaConsumerMatchRequest.OfferListDomain obj3 = new TbkScRtaConsumerMatchRequest.OfferListDomain();
list2.Add(obj3);
obj3.OfferId = "123";
obj3.ItemId = "1";
obj3.TljUrl = "https://www.taobao.com";
req.OfferList_ = list2;
req.SpecialId = "1";
req.DeviceValue = "ssss";
req.DeviceType = "OAID";
TbkScRtaConsumerMatchResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TbkScRtaConsumerMatchRequest;
$req->setSiteId("22");
$req->setAdzoneId("33");
$offer_list = new OfferList;
$offer_list->offer_id="123";
$offer_list->item_id="1";
$offer_list->tlj_url="https://www.taobao.com";
$req->setOfferList(json_encode($offer_list));
$req->setSpecialId("1");
$req->setDeviceValue("ssss");
$req->setDeviceType("OAID");
$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.rta.consumer.match' \
-d 'partner_id=apidoc' \
-d 'session=e91c5d00-f985-4e85-8e71-2daf0f1f17a7' \
-d 'sign=5211005D2446A4573C84B4D8C51FCBBC' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-16+01%3A00%3A06' \
-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 'site_id=22' \
-d 'special_id=1'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TbkScRtaConsumerMatchRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.site_id=22
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"
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.rta.consumer.match");
add_param(pRequest,"site_id","22");
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");
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.rta.consumer.match', {
'site_id':'22',
'adzone_id':'33',
'offer_list':'数据结构JSON示例',
'special_id':'1',
'device_value':'ssss',
'device_type':'OAID'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})