TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripTravelOnlinevisaApplyexpressUpdateRequest req = new AlitripTravelOnlinevisaApplyexpressUpdateRequest();
req.setOrderId(1234565L);
List<AlitripTravelOnlinevisaApplyexpressUpdateRequest.ApplyExpressUnit> list2 = new ArrayList<AlitripTravelOnlinevisaApplyexpressUpdateRequest.ApplyExpressUnit>();
AlitripTravelOnlinevisaApplyexpressUpdateRequest.ApplyExpressUnit obj3 = new AlitripTravelOnlinevisaApplyexpressUpdateRequest.ApplyExpressUnit();
list2.add(obj3);
obj3.setApplyId("1234");
obj3.setPostCompanyCode("SF");
obj3.setPostCompanyName("顺风");
obj3.setLogisticsNumber("123456");
req.setApplyExpressList(list2);
AlitripTravelOnlinevisaApplyexpressUpdateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripTravelOnlinevisaApplyexpressUpdateRequest req = new AlitripTravelOnlinevisaApplyexpressUpdateRequest();
req.OrderId = 1234565L;
List<AlitripTravelOnlinevisaApplyexpressUpdateRequest.ApplyExpressUnitDomain> list2 = new List<AlitripTravelOnlinevisaApplyexpressUpdateRequest.ApplyExpressUnitDomain>();
AlitripTravelOnlinevisaApplyexpressUpdateRequest.ApplyExpressUnitDomain obj3 = new AlitripTravelOnlinevisaApplyexpressUpdateRequest.ApplyExpressUnitDomain();
list2.Add(obj3);
obj3.ApplyId = "1234";
obj3.PostCompanyCode = "SF";
obj3.PostCompanyName = "顺风";
obj3.LogisticsNumber = "123456";
req.ApplyExpressList_ = list2;
AlitripTravelOnlinevisaApplyexpressUpdateResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripTravelOnlinevisaApplyexpressUpdateRequest;
$req->setOrderId("1234565");
$apply_express_list = new ApplyExpressUnit;
$apply_express_list->apply_id="1234";
$apply_express_list->post_company_code="SF";
$apply_express_list->post_company_name="顺风";
$apply_express_list->logistics_number="123456";
$req->setApplyExpressList(json_encode($apply_express_list));
$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=alitrip.travel.onlinevisa.applyexpress.update' \
-d 'partner_id=apidoc' \
-d 'session=6106ec08-42a6-46f6-89d9-83c9181c86c4' \
-d 'sign=D3EEC61566F1229561EB64DB0197E45D' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-07+06%3A32%3A03' \
-d 'v=2.0' \
-d 'apply_express_list=null' \
-d 'order_id=1234565'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripTravelOnlinevisaApplyexpressUpdateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.order_id=1234565
req.apply_express_list=""
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,"alitrip.travel.onlinevisa.applyexpress.update");
add_param(pRequest,"order_id","1234565");
add_param(pRequest,"apply_express_list","数据结构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('alitrip.travel.onlinevisa.applyexpress.update', {
'order_id':'1234565',
'apply_express_list':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})