TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AliexpressLocalLogisticsShippingMethodQueryRequest req = new AliexpressLocalLogisticsShippingMethodQueryRequest();
AliexpressLocalLogisticsShippingMethodQueryRequest.QueryShippingMethodRequestTopDTO obj1 = new AliexpressLocalLogisticsShippingMethodQueryRequest.QueryShippingMethodRequestTopDTO();
obj1.setTradeOrderId(3014820453131992L);
AliexpressLocalLogisticsShippingMethodQueryRequest.AddressTopDTO obj2 = new AliexpressLocalLogisticsShippingMethodQueryRequest.AddressTopDTO();
obj2.setFirstName("Jack");
obj2.setLastName("Bryant");
obj2.setCountry("Brazil");
obj2.setState("Sao Paulo or SP");
obj2.setCity("Sao Paulo");
obj2.setAddress("Vila Mariana, R. Azevedo Macedo");
obj2.setAddressNumber("113");
obj2.setZipCode("04013060 OR 04013-060");
obj2.setCellphone("1234567890");
obj2.setFederalTaxId("null");
obj2.setEmail("testmail@gmail.com");
obj1.setSenderAddress(obj2);
AliexpressLocalLogisticsShippingMethodQueryRequest.ExtensionTopDTO obj3 = new AliexpressLocalLogisticsShippingMethodQueryRequest.ExtensionTopDTO();
obj3.setInvoiceAdded(true);
obj1.setExtension(obj3);
AliexpressLocalLogisticsShippingMethodQueryRequest.AddressTopDTO obj4 = new AliexpressLocalLogisticsShippingMethodQueryRequest.AddressTopDTO();
obj4.setFirstName("Jack");
obj4.setLastName("Bryant");
obj4.setCountry("Brazil");
obj4.setState("Sao Paulo or SP");
obj4.setCity("Sao Paulo");
obj4.setAddress("Vila Mariana, R. Azevedo Macedo");
obj4.setAddressNumber("113");
obj4.setZipCode("04013060 OR 04013-060");
obj4.setCellphone("1234567890");
obj4.setFederalTaxId("098.084.769-96");
obj4.setEmail("testmail@gmail.com");
obj1.setReceiptAddress(obj4);
List<AliexpressLocalLogisticsShippingMethodQueryRequest.ProductTopDTO> list6 = new ArrayList<AliexpressLocalLogisticsShippingMethodQueryRequest.ProductTopDTO>();
AliexpressLocalLogisticsShippingMethodQueryRequest.ProductTopDTO obj7 = new AliexpressLocalLogisticsShippingMethodQueryRequest.ProductTopDTO();
list6.add(obj7);
obj7.setQuantity(1L);
obj7.setLength("10");
obj7.setWidth("10");
obj7.setWeight("1");
obj7.setSkuId("123");
obj7.setHeight("10");
obj7.setPrice("12");
obj1.setProducts(list6);
req.setParam1(obj1);
AliexpressLocalLogisticsShippingMethodQueryResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AliexpressLocalLogisticsShippingMethodQueryRequest req = new AliexpressLocalLogisticsShippingMethodQueryRequest();
AliexpressLocalLogisticsShippingMethodQueryRequest.QueryShippingMethodRequestTopDTODomain obj1 = new AliexpressLocalLogisticsShippingMethodQueryRequest.QueryShippingMethodRequestTopDTODomain();
obj1.TradeOrderId = 3014820453131992L;
AliexpressLocalLogisticsShippingMethodQueryRequest.AddressTopDTODomain obj2 = new AliexpressLocalLogisticsShippingMethodQueryRequest.AddressTopDTODomain();
obj2.FirstName = "Jack";
obj2.LastName = "Bryant";
obj2.Country = "Brazil";
obj2.State = "Sao Paulo or SP";
obj2.City = "Sao Paulo";
obj2.Address = "Vila Mariana, R. Azevedo Macedo";
obj2.AddressNumber = "113";
obj2.ZipCode = "04013060 OR 04013-060";
obj2.Cellphone = "1234567890";
obj2.FederalTaxId = "null";
obj2.Email = "testmail@gmail.com";
obj1.SenderAddress= obj2;
AliexpressLocalLogisticsShippingMethodQueryRequest.ExtensionTopDTODomain obj3 = new AliexpressLocalLogisticsShippingMethodQueryRequest.ExtensionTopDTODomain();
obj3.InvoiceAdded = true;
obj1.Extension= obj3;
AliexpressLocalLogisticsShippingMethodQueryRequest.AddressTopDTODomain obj4 = new AliexpressLocalLogisticsShippingMethodQueryRequest.AddressTopDTODomain();
obj4.FirstName = "Jack";
obj4.LastName = "Bryant";
obj4.Country = "Brazil";
obj4.State = "Sao Paulo or SP";
obj4.City = "Sao Paulo";
obj4.Address = "Vila Mariana, R. Azevedo Macedo";
obj4.AddressNumber = "113";
obj4.ZipCode = "04013060 OR 04013-060";
obj4.Cellphone = "1234567890";
obj4.FederalTaxId = "098.084.769-96";
obj4.Email = "testmail@gmail.com";
obj1.ReceiptAddress= obj4;
List<AliexpressLocalLogisticsShippingMethodQueryRequest.ProductTopDTODomain> list6 = new List<AliexpressLocalLogisticsShippingMethodQueryRequest.ProductTopDTODomain>();
AliexpressLocalLogisticsShippingMethodQueryRequest.ProductTopDTODomain obj7 = new AliexpressLocalLogisticsShippingMethodQueryRequest.ProductTopDTODomain();
list6.Add(obj7);
obj7.Quantity = 1L;
obj7.Length = "10";
obj7.Width = "10";
obj7.Weight = "1";
obj7.SkuId = "123";
obj7.Height = "10";
obj7.Price = "12";
obj1.Products= list6;
req.Param1_ = obj1;
AliexpressLocalLogisticsShippingMethodQueryResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AliexpressLocalLogisticsShippingMethodQueryRequest;
$param1 = new QueryShippingMethodRequestTopDTO;
$param1->trade_order_id="3014820453131992";
$sender_address = new AddressTopDTO;
$sender_address->first_name="Jack";
$sender_address->last_name="Bryant";
$sender_address->country="Brazil";
$sender_address->state="Sao Paulo or SP";
$sender_address->city="Sao Paulo";
$sender_address->address="Vila Mariana, R. Azevedo Macedo";
$sender_address->address_number="113";
$sender_address->zip_code="04013060 OR 04013-060";
$sender_address->cellphone="1234567890";
$sender_address->federal_tax_id="null";
$sender_address->email="testmail@gmail.com";
$param1->sender_address = $sender_address;
$extension = new ExtensionTopDTO;
$extension->invoice_added="true";
$param1->extension = $extension;
$receipt_address = new AddressTopDTO;
$receipt_address->first_name="Jack";
$receipt_address->last_name="Bryant";
$receipt_address->country="Brazil";
$receipt_address->state="Sao Paulo or SP";
$receipt_address->city="Sao Paulo";
$receipt_address->address="Vila Mariana, R. Azevedo Macedo";
$receipt_address->address_number="113";
$receipt_address->zip_code="04013060 OR 04013-060";
$receipt_address->cellphone="1234567890";
$receipt_address->federal_tax_id="098.084.769-96";
$receipt_address->email="testmail@gmail.com";
$param1->receipt_address = $receipt_address;
$products = new ProductTopDTO;
$products->quantity="1";
$products->length="10";
$products->width="10";
$products->weight="1";
$products->sku_id="123";
$products->height="10";
$products->price="12";
$param1->products = $products;
$req->setParam1(json_encode($param1));
$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=aliexpress.local.logistics.shipping.method.query' \
-d 'partner_id=apidoc' \
-d 'session=9136afc5-95ca-4091-b074-57e05c7a602f' \
-d 'sign=38803AE7C798765B699C394192868EE8' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-29+21%3A49%3A25' \
-d 'v=2.0' \
-d 'param1=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AliexpressLocalLogisticsShippingMethodQueryRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param1="数据结构示例JSON格式"
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,"aliexpress.local.logistics.shipping.method.query");
add_param(pRequest,"param1","数据结构JSON示例");
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('aliexpress.local.logistics.shipping.method.query', {
'param1':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})