TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
LogisticsExpressDeliverySendAbilityAsyncRequest req = new LogisticsExpressDeliverySendAbilityAsyncRequest();
LogisticsExpressDeliverySendAbilityAsyncRequest.DeliverySendAbilityRequest obj1 = new LogisticsExpressDeliverySendAbilityAsyncRequest.DeliverySendAbilityRequest();
obj1.setRequestId("xxxxxxxx");
obj1.setRequestTime(1656674541000L);
obj1.setSupplierId("10000000001");
obj1.setDeliveryCode("STO-001");
obj1.setSiteId("0001");
obj1.setSiteAddress("详细地址");
obj1.setAbilityType("1");
obj1.setServiceClass("1");
obj1.setCategory("0");
obj1.setServiceTime("20230901 11:00:00-20231001 11:00:00");
obj1.setServiceCap("10");
obj1.setServiceScopeType("1");
obj1.setAddressType("1");
obj1.setAddressId(""330110005"");
List<LogisticsExpressDeliverySendAbilityAsyncRequest.AddressName> list3 = new ArrayList<LogisticsExpressDeliverySendAbilityAsyncRequest.AddressName>();
LogisticsExpressDeliverySendAbilityAsyncRequest.AddressName obj4 = new LogisticsExpressDeliverySendAbilityAsyncRequest.AddressName();
list3.add(obj4);
obj4.setProvince("浙江省");
obj4.setCity("杭州市");
obj4.setArea("余杭区");
obj4.setTown("五常街道");
obj1.setAddressName(list3);
List<LogisticsExpressDeliverySendAbilityAsyncRequest.RegionId> list6 = new ArrayList<LogisticsExpressDeliverySendAbilityAsyncRequest.RegionId>();
LogisticsExpressDeliverySendAbilityAsyncRequest.RegionId obj7 = new LogisticsExpressDeliverySendAbilityAsyncRequest.RegionId();
list6.add(obj7);
obj7.setLatitude("120.21201");
obj7.setLongitude("30.2084");
obj1.setRegionId(list6);
obj1.setRegionCode("001");
req.setDeliverySendAbilityRequest(obj1);
LogisticsExpressDeliverySendAbilityAsyncResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
LogisticsExpressDeliverySendAbilityAsyncRequest req = new LogisticsExpressDeliverySendAbilityAsyncRequest();
LogisticsExpressDeliverySendAbilityAsyncRequest.DeliverySendAbilityRequestDomain obj1 = new LogisticsExpressDeliverySendAbilityAsyncRequest.DeliverySendAbilityRequestDomain();
obj1.RequestId = "xxxxxxxx";
obj1.RequestTime = 1656674541000L;
obj1.SupplierId = "10000000001";
obj1.DeliveryCode = "STO-001";
obj1.SiteId = "0001";
obj1.SiteAddress = "详细地址";
obj1.AbilityType = "1";
obj1.ServiceClass = "1";
obj1.Category = "0";
obj1.ServiceTime = "20230901 11:00:00-20231001 11:00:00";
obj1.ServiceCap = "10";
obj1.ServiceScopeType = "1";
obj1.AddressType = "1";
obj1.AddressId = ""330110005"";
List<LogisticsExpressDeliverySendAbilityAsyncRequest.AddressNameDomain> list3 = new List<LogisticsExpressDeliverySendAbilityAsyncRequest.AddressNameDomain>();
LogisticsExpressDeliverySendAbilityAsyncRequest.AddressNameDomain obj4 = new LogisticsExpressDeliverySendAbilityAsyncRequest.AddressNameDomain();
list3.Add(obj4);
obj4.Province = "浙江省";
obj4.City = "杭州市";
obj4.Area = "余杭区";
obj4.Town = "五常街道";
obj1.AddressName= list3;
List<LogisticsExpressDeliverySendAbilityAsyncRequest.RegionIdDomain> list6 = new List<LogisticsExpressDeliverySendAbilityAsyncRequest.RegionIdDomain>();
LogisticsExpressDeliverySendAbilityAsyncRequest.RegionIdDomain obj7 = new LogisticsExpressDeliverySendAbilityAsyncRequest.RegionIdDomain();
list6.Add(obj7);
obj7.Latitude = "120.21201";
obj7.Longitude = "30.2084";
obj1.RegionId= list6;
obj1.RegionCode = "001";
req.DeliverySendAbilityRequest_ = obj1;
LogisticsExpressDeliverySendAbilityAsyncResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new LogisticsExpressDeliverySendAbilityAsyncRequest;
$delivery_send_ability_request = new DeliverySendAbilityRequest;
$delivery_send_ability_request->request_id="xxxxxxxx";
$delivery_send_ability_request->request_time="1656674541000";
$delivery_send_ability_request->supplier_id="10000000001";
$delivery_send_ability_request->delivery_code="STO-001";
$delivery_send_ability_request->site_id="0001";
$delivery_send_ability_request->site_address="详细地址";
$delivery_send_ability_request->ability_type="1";
$delivery_send_ability_request->service_class="1";
$delivery_send_ability_request->category="0";
$delivery_send_ability_request->service_time="20230901 11:00:00-20231001 11:00:00";
$delivery_send_ability_request->service_cap="10";
$delivery_send_ability_request->service_scope_type="1";
$delivery_send_ability_request->address_type="1";
$delivery_send_ability_request->address_id="[\"330110005\"]";
$address_name = new AddressName;
$address_name->province="浙江省";
$address_name->city="杭州市";
$address_name->area="余杭区";
$address_name->town="五常街道";
$delivery_send_ability_request->address_name = $address_name;
$region_id = new RegionId;
$region_id->latitude="120.21201";
$region_id->longitude="30.2084";
$delivery_send_ability_request->region_id = $region_id;
$delivery_send_ability_request->region_code="001";
$req->setDeliverySendAbilityRequest(json_encode($delivery_send_ability_request));
$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.logistics.express.delivery.send.ability.async' \
-d 'partner_id=apidoc' \
-d 'sign=7CE07CFA5EAB93699C5379C4C66D13BA' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-04+16%3A23%3A51' \
-d 'v=2.0' \
-d 'delivery_send_ability_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.LogisticsExpressDeliverySendAbilityAsyncRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.delivery_send_ability_request="数据结构示例JSON格式"
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.logistics.express.delivery.send.ability.async");
add_param(pRequest,"delivery_send_ability_request","数据结构JSON示例");
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.logistics.express.delivery.send.ability.async', {
'delivery_send_ability_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})