TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AliexpressSocialProductFreightQueryRequest req = new AliexpressSocialProductFreightQueryRequest();
req.setProductId(4000078939541L);
req.setQuantity(3L);
req.setShipFromCountry("RU");
req.setShipToCountry("RU");
req.setCurrency("RUB");
AliexpressSocialProductFreightQueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AliexpressSocialProductFreightQueryRequest req = new AliexpressSocialProductFreightQueryRequest();
req.ProductId = 4000078939541L;
req.Quantity = 3L;
req.ShipFromCountry = "RU";
req.ShipToCountry = "RU";
req.Currency = "RUB";
AliexpressSocialProductFreightQueryResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AliexpressSocialProductFreightQueryRequest;
$req->setProductId("4000078939541");
$req->setQuantity("3");
$req->setShipFromCountry("RU");
$req->setShipToCountry("RU");
$req->setCurrency("RUB");
$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=aliexpress.social.product.freight.query' \
-d 'partner_id=apidoc' \
-d 'sign=FE42FFE614A2226F6EA00AA1D98BA006' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-24+18%3A19%3A13' \
-d 'v=2.0' \
-d 'currency=RUB' \
-d 'product_id=4000078939541' \
-d 'quantity=3' \
-d 'ship_from_country=RU' \
-d 'ship_to_country=RU'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AliexpressSocialProductFreightQueryRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.product_id=4000078939541
req.quantity=3
req.ship_from_country="RU"
req.ship_to_country="RU"
req.currency="RUB"
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,"aliexpress.social.product.freight.query");
add_param(pRequest,"product_id","4000078939541");
add_param(pRequest,"quantity","3");
add_param(pRequest,"ship_from_country","RU");
add_param(pRequest,"ship_to_country","RU");
add_param(pRequest,"currency","RUB");
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('aliexpress.social.product.freight.query', {
'product_id':'4000078939541',
'quantity':'3',
'ship_from_country':'RU',
'ship_to_country':'RU',
'currency':'RUB'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})