TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TbkItemShareConvertRequest req = new TbkItemShareConvertRequest();
req.setAdzoneId(123L);
req.setFields("num_iid,click_url");
req.setNumIids("123,456");
req.setPlatform(1L);
req.setSubPid("mm_123_123_123");
req.setUnid("demo");
req.setDx("1");
req.setCouponId("1");
TbkItemShareConvertResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TbkItemShareConvertRequest req = new TbkItemShareConvertRequest();
req.AdzoneId = 123L;
req.Fields = "num_iid,click_url";
req.NumIids = "123,456";
req.Platform = 1L;
req.SubPid = "mm_123_123_123";
req.Unid = "demo";
req.Dx = "1";
req.CouponId = "1";
TbkItemShareConvertResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TbkItemShareConvertRequest;
$req->setAdzoneId("123");
$req->setFields("num_iid,click_url");
$req->setNumIids("123,456");
$req->setPlatform("1");
$req->setSubPid("mm_123_123_123");
$req->setUnid("demo");
$req->setDx("1");
$req->setCouponId("1");
$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.item.share.convert' \
-d 'partner_id=apidoc' \
-d 'sign=FFFBFA894186E44759016E0BFCA78C83' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-16+01%3A07%3A13' \
-d 'v=2.0' \
-d 'adzone_id=123' \
-d 'coupon_id=1' \
-d 'dx=1' \
-d 'fields=num_iid%2Cclick_url' \
-d 'num_iids=123%2C456' \
-d 'platform=1' \
-d 'sub_pid=mm_123_123_123' \
-d 'unid=demo'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TbkItemShareConvertRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.adzone_id=123
req.fields="num_iid,click_url"
req.num_iids="123,456"
req.platform=1
req.sub_pid="mm_123_123_123"
req.unid="demo"
req.dx="1"
req.coupon_id="1"
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.item.share.convert");
add_param(pRequest,"adzone_id","123");
add_param(pRequest,"fields","num_iid,click_url");
add_param(pRequest,"num_iids","123,456");
add_param(pRequest,"platform","1");
add_param(pRequest,"sub_pid","mm_123_123_123");
add_param(pRequest,"unid","demo");
add_param(pRequest,"dx","1");
add_param(pRequest,"coupon_id","1");
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.item.share.convert', {
'adzone_id':'123',
'fields':'num_iid,click_url',
'num_iids':'123,456',
'platform':'1',
'sub_pid':'mm_123_123_123',
'unid':'demo',
'dx':'1',
'coupon_id':'1'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})