TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
ProductGetTmallRequest req = new ProductGetTmallRequest();
req.setFields("product_id,outer_id");
req.setProductId(86126527L);
req.setCid(50012286L);
req.setProps("10005:10027;10006:29729");
req.setMarketId("2");
req.setCustomerProps("customer_props");
ProductGetTmallResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
ProductGetTmallRequest req = new ProductGetTmallRequest();
req.Fields = "product_id,outer_id";
req.ProductId = 86126527L;
req.Cid = 50012286L;
req.Props = "10005:10027;10006:29729";
req.MarketId = "2";
req.CustomerProps = "customer_props";
ProductGetTmallResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new ProductGetTmallRequest;
$req->setFields("product_id,outer_id");
$req->setProductId("86126527");
$req->setCid("50012286");
$req->setProps("10005:10027;10006:29729");
$req->setMarketId("2");
$req->setCustomerProps("customer_props");
$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.product.get.tmall' \
-d 'partner_id=apidoc' \
-d 'sign=7AFB67E078D37BB0CC3692C2DACC1043' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-24+16%3A04%3A13' \
-d 'v=2.0' \
-d 'cid=50012286' \
-d 'customer_props=customer_props' \
-d 'fields=product_id%2Couter_id' \
-d 'market_id=2' \
-d 'product_id=86126527' \
-d 'props=10005%3A10027%3B10006%3A29729'
# -*- coding: utf-8 -*-
import top.api
req=top.api.ProductGetTmallRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.fields="product_id,outer_id"
req.product_id=86126527
req.cid=50012286
req.props="10005:10027;10006:29729"
req.market_id="2"
req.customer_props="customer_props"
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.product.get.tmall");
add_param(pRequest,"fields","product_id,outer_id");
add_param(pRequest,"product_id","86126527");
add_param(pRequest,"cid","50012286");
add_param(pRequest,"props","10005:10027;10006:29729");
add_param(pRequest,"market_id","2");
add_param(pRequest,"customer_props","customer_props");
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.product.get.tmall', {
'fields':'product_id,outer_id',
'product_id':'86126527',
'cid':'50012286',
'props':'10005:10027;10006:29729',
'market_id':'2',
'customer_props':'customer_props'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})