TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
CainiaoGlobalSolutionServiceResourceQueryRequest req = new CainiaoGlobalSolutionServiceResourceQueryRequest();
req.setLocale("ru_RU");
CainiaoGlobalSolutionServiceResourceQueryRequest.QuerySolutionServiceResParam obj1 = new CainiaoGlobalSolutionServiceResourceQueryRequest.QuerySolutionServiceResParam();
obj1.setSolutionCode("CAINIAO_STANDARD");
CainiaoGlobalSolutionServiceResourceQueryRequest.ServiceParam obj2 = new CainiaoGlobalSolutionServiceResourceQueryRequest.ServiceParam();
obj2.setCode("DOOR_PICKUP");
obj1.setServiceParam(obj2);
req.setSolutionServiceResParam(obj1);
CainiaoGlobalSolutionServiceResourceQueryRequest.OpenSenderParam obj3 = new CainiaoGlobalSolutionServiceResourceQueryRequest.OpenSenderParam();
obj3.setSellerAddressId(123L);
req.setSenderParam(obj3);
CainiaoGlobalSolutionServiceResourceQueryResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
CainiaoGlobalSolutionServiceResourceQueryRequest req = new CainiaoGlobalSolutionServiceResourceQueryRequest();
req.Locale = "ru_RU";
CainiaoGlobalSolutionServiceResourceQueryRequest.QuerySolutionServiceResParamDomain obj1 = new CainiaoGlobalSolutionServiceResourceQueryRequest.QuerySolutionServiceResParamDomain();
obj1.SolutionCode = "CAINIAO_STANDARD";
CainiaoGlobalSolutionServiceResourceQueryRequest.ServiceParamDomain obj2 = new CainiaoGlobalSolutionServiceResourceQueryRequest.ServiceParamDomain();
obj2.Code = "DOOR_PICKUP";
obj1.ServiceParam= obj2;
req.SolutionServiceResParam_ = obj1;
CainiaoGlobalSolutionServiceResourceQueryRequest.OpenSenderParamDomain obj3 = new CainiaoGlobalSolutionServiceResourceQueryRequest.OpenSenderParamDomain();
obj3.SellerAddressId = 123L;
req.SenderParam_ = obj3;
CainiaoGlobalSolutionServiceResourceQueryResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new CainiaoGlobalSolutionServiceResourceQueryRequest;
$req->setLocale("ru_RU");
$solution_service_res_param = new QuerySolutionServiceResParam;
$solution_service_res_param->solution_code="CAINIAO_STANDARD";
$service_param = new ServiceParam;
$service_param->code="DOOR_PICKUP";
$solution_service_res_param->service_param = $service_param;
$req->setSolutionServiceResParam(json_encode($solution_service_res_param));
$sender_param = new OpenSenderParam;
$sender_param->seller_address_id="123";
$req->setSenderParam(json_encode($sender_param));
$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=cainiao.global.solution.service.resource.query' \
-d 'partner_id=apidoc' \
-d 'session=10263c02-e625-447f-9752-3a577666a1c4' \
-d 'sign=8A6F1724AE10B7342A969C86189AE4FD' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-02-04+14%3A54%3A46' \
-d 'v=2.0' \
-d 'locale=ru_RU' \
-d 'sender_param=null' \
-d 'solution_service_res_param=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.CainiaoGlobalSolutionServiceResourceQueryRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.locale="ru_RU"
req.solution_service_res_param=""
req.sender_param=""
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,"cainiao.global.solution.service.resource.query");
add_param(pRequest,"locale","ru_RU");
add_param(pRequest,"solution_service_res_param","数据结构JSON示例");
add_param(pRequest,"sender_param","数据结构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('cainiao.global.solution.service.resource.query', {
'locale':'ru_RU',
'solution_service_res_param':'数据结构JSON示例',
'sender_param':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})