TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripAslanGdstiPnrQtbRequest req = new AlitripAslanGdstiPnrQtbRequest();
AlitripAslanGdstiPnrQtbRequest.QtbRq obj1 = new AlitripAslanGdstiPnrQtbRequest.QtbRq();
obj1.setBusinessId(123456L);
obj1.setCabinClass("First:头等舱,Business:商务舱, Economy:经济舱, EconomyPremium:超级经济舱");
obj1.setOfficeNo("officeNo");
obj1.setPnrNo("PNR");
obj1.setTicketingAirline("MU");
req.setParamQtbRQ(obj1);
AlitripAslanGdstiPnrQtbResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripAslanGdstiPnrQtbRequest req = new AlitripAslanGdstiPnrQtbRequest();
AlitripAslanGdstiPnrQtbRequest.QtbRqDomain obj1 = new AlitripAslanGdstiPnrQtbRequest.QtbRqDomain();
obj1.BusinessId = 123456L;
obj1.CabinClass = "First:头等舱,Business:商务舱, Economy:经济舱, EconomyPremium:超级经济舱";
obj1.OfficeNo = "officeNo";
obj1.PnrNo = "PNR";
obj1.TicketingAirline = "MU";
req.ParamQtbRQ_ = obj1;
AlitripAslanGdstiPnrQtbResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripAslanGdstiPnrQtbRequest;
$param_qtb_r_q = new QtbRq;
$param_qtb_r_q->business_id="123456";
$param_qtb_r_q->cabin_class="First:头等舱,Business:商务舱, Economy:经济舱, EconomyPremium:超级经济舱";
$param_qtb_r_q->office_no="officeNo";
$param_qtb_r_q->pnr_no="PNR";
$param_qtb_r_q->ticketing_airline="MU";
$req->setParamQtbRQ(json_encode($param_qtb_r_q));
$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.aslan.gdsti.pnr.qtb' \
-d 'partner_id=apidoc' \
-d 'session=c1f29594-a507-46a1-82f1-1426f5ed9d92' \
-d 'sign=331CFEC220F3ADEB6D5E12B90C8EA20F' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-03+07%3A05%3A39' \
-d 'v=2.0' \
-d 'param_qtb_r_q=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripAslanGdstiPnrQtbRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param_qtb_r_q=""
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.aslan.gdsti.pnr.qtb");
add_param(pRequest,"param_qtb_r_q","数据结构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.aslan.gdsti.pnr.qtb', {
'param_qtb_r_q':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})