TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripAgentFlightSellTicketingIssueRequest req = new AlitripAgentFlightSellTicketingIssueRequest();
AlitripAgentFlightSellTicketingIssueRequest.TicketingIssueRequestDto obj1 = new AlitripAgentFlightSellTicketingIssueRequest.TicketingIssueRequestDto();
obj1.setDomesticIntl(1L);
obj1.setOrderId("123123123");
List<AlitripAgentFlightSellTicketingIssueRequest.TicketingPsgItemDto> list3 = new ArrayList<AlitripAgentFlightSellTicketingIssueRequest.TicketingPsgItemDto>();
AlitripAgentFlightSellTicketingIssueRequest.TicketingPsgItemDto obj4 = new AlitripAgentFlightSellTicketingIssueRequest.TicketingPsgItemDto();
list3.add(obj4);
obj4.setPassengerName("tester");
obj4.setTickets(""000-1111111"");
obj4.setPnr("pnr");
List<AlitripAgentFlightSellTicketingIssueRequest.Segments> list7 = new ArrayList<AlitripAgentFlightSellTicketingIssueRequest.Segments>();
AlitripAgentFlightSellTicketingIssueRequest.Segments obj8 = new AlitripAgentFlightSellTicketingIssueRequest.Segments();
list7.add(obj8);
obj8.setArrCity("SHA");
obj8.setDepCity("BJS");
list5.setSegments(list7);
List<AlitripAgentFlightSellTicketingIssueRequest.TicketInfoDTOs> list11 = new ArrayList<AlitripAgentFlightSellTicketingIssueRequest.TicketInfoDTOs>();
AlitripAgentFlightSellTicketingIssueRequest.TicketInfoDTOs obj12 = new AlitripAgentFlightSellTicketingIssueRequest.TicketInfoDTOs();
list11.add(obj12);
obj12.setTicketNo("000-1111111");
obj12.setPnr("pnr");
obj12.setBigPnr("bigPnr");
list9.setTicketInfo(list11);
obj4.setAncillaryAlipayIds("12345678");
obj1.setIssueList(list3);
req.setParam(obj1);
AlitripAgentFlightSellTicketingIssueResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripAgentFlightSellTicketingIssueRequest req = new AlitripAgentFlightSellTicketingIssueRequest();
AlitripAgentFlightSellTicketingIssueRequest.TicketingIssueRequestDtoDomain obj1 = new AlitripAgentFlightSellTicketingIssueRequest.TicketingIssueRequestDtoDomain();
obj1.DomesticIntl = 1L;
obj1.OrderId = "123123123";
List<AlitripAgentFlightSellTicketingIssueRequest.TicketingPsgItemDtoDomain> list3 = new List<AlitripAgentFlightSellTicketingIssueRequest.TicketingPsgItemDtoDomain>();
AlitripAgentFlightSellTicketingIssueRequest.TicketingPsgItemDtoDomain obj4 = new AlitripAgentFlightSellTicketingIssueRequest.TicketingPsgItemDtoDomain();
list3.Add(obj4);
obj4.PassengerName = "tester";
obj4.Tickets = ""000-1111111"";
obj4.Pnr = "pnr";
List<AlitripAgentFlightSellTicketingIssueRequest.SegmentsDomain> list6 = new List<AlitripAgentFlightSellTicketingIssueRequest.SegmentsDomain>();
AlitripAgentFlightSellTicketingIssueRequest.SegmentsDomain obj7 = new AlitripAgentFlightSellTicketingIssueRequest.SegmentsDomain();
list6.Add(obj7);
obj7.ArrCity = "SHA";
obj7.DepCity = "BJS";
obj4.Segments= list6;
List<AlitripAgentFlightSellTicketingIssueRequest.TicketInfoDTOsDomain> list9 = new List<AlitripAgentFlightSellTicketingIssueRequest.TicketInfoDTOsDomain>();
AlitripAgentFlightSellTicketingIssueRequest.TicketInfoDTOsDomain obj10 = new AlitripAgentFlightSellTicketingIssueRequest.TicketInfoDTOsDomain();
list9.Add(obj10);
obj10.TicketNo = "000-1111111";
obj10.Pnr = "pnr";
obj10.BigPnr = "bigPnr";
obj4.TicketInfo= list9;
obj4.AncillaryAlipayIds = "12345678";
obj1.IssueList= list3;
req.Param_ = obj1;
AlitripAgentFlightSellTicketingIssueResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripAgentFlightSellTicketingIssueRequest;
$param = new TicketingIssueRequestDto;
$param->domestic_intl="1";
$param->order_id="123123123";
$issue_list = new TicketingPsgItemDto;
$issue_list->passenger_name="tester";
$issue_list->tickets="[\"000-1111111\"]";
$issue_list->pnr="pnr";
$segments = new Segments;
$segments->arr_city="SHA";
$segments->dep_city="BJS";
$issue_list->segments = $segments;
$ticket_info = new TicketInfoDTOs;
$ticket_info->ticket_no="000-1111111";
$ticket_info->pnr="pnr";
$ticket_info->big_pnr="bigPnr";
$issue_list->ticket_info = $ticket_info;
//附件上传的机制参见PHP CURL文档,在文件路径前加@符号即可
$issue_list->ancillary_paid_proof=@fileLocation;
$issue_list->ancillary_alipay_ids="12345678";
$param->issue_list = $issue_list;
$req->setParam(json_encode($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=alitrip.agent.flight.sell.ticketing.issue' \
-d 'partner_id=apidoc' \
-d 'session=0fd06897-0aeb-4278-9757-5e88debc795e' \
-d 'sign=3722951461224673E2E367A41D5FA199' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-29+14%3A43%3A48' \
-d 'v=2.0' \
-d 'param=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripAgentFlightSellTicketingIssueRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.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,"alitrip.agent.flight.sell.ticketing.issue");
add_param(pRequest,"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('alitrip.agent.flight.sell.ticketing.issue', {
'param':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})