TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripBtripApprovalUpdateRequest req = new AlitripBtripApprovalUpdateRequest();
AlitripBtripApprovalUpdateRequest.OpenApproveApplyRq obj1 = new AlitripBtripApprovalUpdateRequest.OpenApproveApplyRq();
obj1.setApplyId("apply123");
obj1.setOperateTime(StringUtils.parseDateTime("2017-01-01 00:00:00"));
obj1.setStatus(1L);
obj1.setApprovalUserName("张三");
obj1.setApprovalUserId("user1");
obj1.setNote("同意");
obj1.setCorpId("corp123");
req.setApproveApplyRequest(obj1);
AlitripBtripApprovalUpdateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripBtripApprovalUpdateRequest req = new AlitripBtripApprovalUpdateRequest();
AlitripBtripApprovalUpdateRequest.OpenApproveApplyRqDomain obj1 = new AlitripBtripApprovalUpdateRequest.OpenApproveApplyRqDomain();
obj1.ApplyId = "apply123";
obj1.OperateTime = DateTime.Parse(2017-01-01 00:00:00");
obj1.Status = 1L;
obj1.ApprovalUserName = "张三";
obj1.ApprovalUserId = "user1";
obj1.Note = "同意";
obj1.CorpId = "corp123";
req.ApproveApplyRequest_ = obj1;
AlitripBtripApprovalUpdateResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripBtripApprovalUpdateRequest;
$approve_apply_request = new OpenApproveApplyRq;
$approve_apply_request->apply_id="apply123";
$approve_apply_request->operate_time="2017-01-01 00:00:00";
$approve_apply_request->status="1";
$approve_apply_request->approval_user_name="张三";
$approve_apply_request->approval_user_id="user1";
$approve_apply_request->note="同意";
$approve_apply_request->corp_id="corp123";
$req->setApproveApplyRequest(json_encode($approve_apply_request));
$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.btrip.approval.update' \
-d 'partner_id=apidoc' \
-d 'session=2a02702b-74e5-4e5c-be94-b501a0d367e6' \
-d 'sign=88AD3992E28C5677150DC9441EA76136' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-31+04%3A32%3A53' \
-d 'v=2.0' \
-d 'approve_apply_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripBtripApprovalUpdateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.approve_apply_request=""
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.btrip.approval.update");
add_param(pRequest,"approve_apply_request","数据结构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.btrip.approval.update', {
'approve_apply_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})