TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
CainiaoReachableInnerBatchjudgeRequest req = new CainiaoReachableInnerBatchjudgeRequest();
req.setAddressType(1L);
CainiaoReachableInnerBatchjudgeRequest.RoutingReachableBatchRequestDTO obj1 = new CainiaoReachableInnerBatchjudgeRequest.RoutingReachableBatchRequestDTO();
obj1.setCpCode("STO");
obj1.setSellerId(3124144L);
List<CainiaoReachableInnerBatchjudgeRequest.ReachableAddressAndServiceDTO> list3 = new ArrayList<CainiaoReachableInnerBatchjudgeRequest.ReachableAddressAndServiceDTO>();
CainiaoReachableInnerBatchjudgeRequest.ReachableAddressAndServiceDTO obj4 = new CainiaoReachableInnerBatchjudgeRequest.ReachableAddressAndServiceDTO();
list3.add(obj4);
CainiaoReachableInnerBatchjudgeRequest.AddressDTO obj6 = new CainiaoReachableInnerBatchjudgeRequest.AddressDTO();
obj6.setTownName("蒋村街道");
obj6.setAddressDetail("xxxxx");
obj6.setCityName("杭州市");
obj6.setAreaName("西湖区");
obj6.setProvinceName("浙江省");
list5.setReceiveAddress(obj6);
CainiaoReachableInnerBatchjudgeRequest.AddressDTO obj8 = new CainiaoReachableInnerBatchjudgeRequest.AddressDTO();
obj8.setTownName("蒋村街道");
obj8.setAddressDetail("xxxx");
obj8.setCityName("杭州市");
obj8.setAreaName("西湖区");
obj8.setProvinceName("浙江省");
list7.setSendAddress(obj8);
obj4.setCaid("def");
obj4.setServiceCodeList("{ \"SVC-COD\": { \"value\": 100.5 } }");
obj4.setOaid("1icV3zmQNcSqvKO3QmP7dIIPOkgPUMua4Uv5OZthsic1gSFBm9w50kyIABW024J8g7y245miad");
obj4.setObjectId("abc");
obj4.setOrderId(123456L);
obj1.setAddressAndServiceList(list3);
obj1.setSendBranchCode("20111");
req.setData(obj1);
CainiaoReachableInnerBatchjudgeRequest.ClientInfoDTO obj9 = new CainiaoReachableInnerBatchjudgeRequest.ClientInfoDTO();
obj9.setDescription("xxx打单助手");
req.setClientInfo(obj9);
CainiaoReachableInnerBatchjudgeResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
CainiaoReachableInnerBatchjudgeRequest req = new CainiaoReachableInnerBatchjudgeRequest();
req.AddressType = 1L;
CainiaoReachableInnerBatchjudgeRequest.RoutingReachableBatchRequestDTODomain obj1 = new CainiaoReachableInnerBatchjudgeRequest.RoutingReachableBatchRequestDTODomain();
obj1.CpCode = "STO";
obj1.SellerId = 3124144L;
List<CainiaoReachableInnerBatchjudgeRequest.ReachableAddressAndServiceDTODomain> list3 = new List<CainiaoReachableInnerBatchjudgeRequest.ReachableAddressAndServiceDTODomain>();
CainiaoReachableInnerBatchjudgeRequest.ReachableAddressAndServiceDTODomain obj4 = new CainiaoReachableInnerBatchjudgeRequest.ReachableAddressAndServiceDTODomain();
list3.Add(obj4);
CainiaoReachableInnerBatchjudgeRequest.AddressDTODomain obj5 = new CainiaoReachableInnerBatchjudgeRequest.AddressDTODomain();
obj5.TownName = "蒋村街道";
obj5.AddressDetail = "xxxxx";
obj5.CityName = "杭州市";
obj5.AreaName = "西湖区";
obj5.ProvinceName = "浙江省";
obj4.ReceiveAddress= obj5;
CainiaoReachableInnerBatchjudgeRequest.AddressDTODomain obj6 = new CainiaoReachableInnerBatchjudgeRequest.AddressDTODomain();
obj6.TownName = "蒋村街道";
obj6.AddressDetail = "xxxx";
obj6.CityName = "杭州市";
obj6.AreaName = "西湖区";
obj6.ProvinceName = "浙江省";
obj4.SendAddress= obj6;
obj4.Caid = "def";
obj4.ServiceCodeList = "{ \"SVC-COD\": { \"value\": 100.5 } }";
obj4.Oaid = "1icV3zmQNcSqvKO3QmP7dIIPOkgPUMua4Uv5OZthsic1gSFBm9w50kyIABW024J8g7y245miad";
obj4.ObjectId = "abc";
obj4.OrderId = 123456L;
obj1.AddressAndServiceList= list3;
obj1.SendBranchCode = "20111";
req.Data_ = obj1;
CainiaoReachableInnerBatchjudgeRequest.ClientInfoDTODomain obj7 = new CainiaoReachableInnerBatchjudgeRequest.ClientInfoDTODomain();
obj7.Description = "xxx打单助手";
req.ClientInfo_ = obj7;
CainiaoReachableInnerBatchjudgeResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new CainiaoReachableInnerBatchjudgeRequest;
$req->setAddressType("1");
$data = new RoutingReachableBatchRequestDTO;
$data->cp_code="STO";
$data->seller_id="3124144";
$address_and_service_list = new ReachableAddressAndServiceDTO;
$receive_address = new AddressDTO;
$receive_address->town_name="蒋村街道";
$receive_address->address_detail="xxxxx";
$receive_address->city_name="杭州市";
$receive_address->area_name="西湖区";
$receive_address->province_name="浙江省";
$address_and_service_list->receive_address = $receive_address;
$send_address = new AddressDTO;
$send_address->town_name="蒋村街道";
$send_address->address_detail="xxxx";
$send_address->city_name="杭州市";
$send_address->area_name="西湖区";
$send_address->province_name="浙江省";
$address_and_service_list->send_address = $send_address;
$address_and_service_list->caid="def";
$address_and_service_list->service_code_list="{ \"SVC-COD\": { \"value\": 100.5 } }";
$address_and_service_list->oaid="1icV3zmQNcSqvKO3QmP7dIIPOkgPUMua4Uv5OZthsic1gSFBm9w50kyIABW024J8g7y245miad";
$address_and_service_list->object_id="abc";
$address_and_service_list->order_id="123456";
$data->address_and_service_list = $address_and_service_list;
$data->send_branch_code="20111";
$req->setData(json_encode($data));
$client_info = new ClientInfoDTO;
$client_info->description="xxx打单助手";
$req->setClientInfo(json_encode($client_info));
$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=cainiao.reachable.inner.batchjudge' \
-d 'partner_id=apidoc' \
-d 'sign=9B2E5267A021F99EC8ACDB79FCB853A6' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-15+14%3A44%3A48' \
-d 'v=2.0' \
-d 'address_type=1' \
-d 'client_info=null' \
-d 'data=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.CainiaoReachableInnerBatchjudgeRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.address_type=1
req.data="数据结构示例JSON格式"
req.client_info="数据结构示例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,"cainiao.reachable.inner.batchjudge");
add_param(pRequest,"address_type","1");
add_param(pRequest,"data","数据结构JSON示例");
add_param(pRequest,"client_info","数据结构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('cainiao.reachable.inner.batchjudge', {
'address_type':'1',
'data':'数据结构JSON示例',
'client_info':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})