AirTicketing

Post   https://travel.bospay.co.in/api/V1/Air/Travel/AirTicketing


The AirTicketing API is used to generate airline tickets after a successful payment has been made. It confirms the booking with the airline and retrieves the Airline PNR (Passenger Name Record) and related details required for travel.

Important Note: If Air_Ticketing method response gives error “22-Failed”, kindly check the updated status of the ticket in Air_Reprint by using the reference number.
If the Ticket_Status_Id = 4 then Booking status should be set as Success. If the Ticket_Status_Id is 0,2,3 or Status_Id = 22 then the Booking status should be set as InProcess and you should again fetch the booking after some time using Air_Reprint.For all other scenarios, Booking status should be set as Failed.

Body Parameters
{
    "booking_RefNo": "FLYB6YMAD",
    "ticketing_Type": "1",
    "iP_Address": "27.XXX.XX.76",
    "request_Id": "REQ123456",
    "imeI_Number": "353535353535353",
    "registrationID": "AOP-554"
}
Request Parameters
Name Type Description
booking_RefNoString This requires the booking reference number, which is obtained from the Air_TempBooking response.
ticketing_Type String This specifies the ticketing type. Possible values: 0 - Block_Ticket, 1 - Book_Ticket, 2 - Book_Blocked_Ticket (You should allow the user to select Block_Ticket or Book_Blocked_Ticket based on the 'Block_Ticket_Allowed' flag in the Flight object from the Search/RePrice API response).
iP_AddressStringBelongs to the same server from which the API calls are made and where you will be consuming the API.
Responses

200

200

Response

200

RESPONSE BODY

Json

401

401

Response

401

RESPONSE BODY

Object

responsecode integer

status boolean

message string


Did this page help you?     Yes    No

Language
shell Shell
python Python
node Node
c# C#
php PHP

cURL

curl --location --request POST 'https://travel.bospay.co.in/api/V1/Air/Travel/AirTicketing' \
--header 'Content-Type: application/json' \
--data  '{
  "booking_RefNo": "FLYB6YMAD",
  "ticketing_Type": "1",
  "iP_Address": "27.XXX.XX.76",
  "request_Id": "REQ123456",
  "imeI_Number": "353535353535353",
  "registrationID": "AOP-554"
}'
                                
import requests
import json

url = 'https://travel.bospay.co.in/api/V1/Air/Travel/AirTicketing'
payload = "{
"booking_RefNo": "FLYB6YMAD",
"ticketing_Type": "1",
"iP_Address": "27.XXX.XX.76",
"request_Id": "REQ123456",
"imeI_Number": "353535353535353",
"registrationID": "AOP-554"
}" 

headers = {
  "Content-type" : "application/json"
}

response = requests.request("POST", url, headers=headers, data=payload)

print (response.text)
                                
var requests = require("request");
var options = { 
  "method" : "POST",
  "url" : 'https://travel.bospay.co.in/api/V1/Air/Travel/AirTicketing',
  "headers" : {
    "Content-Type" : 'application/json'
  },
  body: '{
    "booking_RefNo": "FLYB6YMAD",
    "ticketing_Type": "1",
    "iP_Address": "27.XXX.XX.76"
    "request_Id": "REQ123456",
    "imeI_Number": "353535353535353",
    "registrationID": "AOP-554"
  }' 
}; 
request(options, function(error, response){
   if(error) throw new Error(error);
   console.log(response.body); 
}); 
                                
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get,'https://travel.bospay.co.in/api/V1/Air/Travel/AirTicketing')
var content = new StringContent(
  "{
    "booking_RefNo": "FLYB6YMAD",
    "ticketing_Type": "1",
    "iP_Address": "27.XXX.XX.76",
    "request_Id": "REQ123456",
    "imeI_Number": "353535353535353",
    "registrationID": "AOP-554"
  }",
  null,"application/json"
); 

request.Content = content;
var response =  await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
                                
<?php
$curl =  curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL =>  'https://travel.bospay.co.in/api/V1/Air/Travel/AirTicketing',
  CURLOPT_RETURNTRANSFER =>  true,
  CURLOPT_ENCODING =>  '',
  CURLOPT_MAXREDIRS =>  10,
  CURLOPT_TIMEOUT =>  0,
  CURLOPT_FOLLOWLOCATION =>  true,
  CURLOPT_HTTP_VERSION =>  CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST =>  'POST',
  CURLOPT_POSTFIELDS =>  '{
    "booking_RefNo": "FLYB6YMAD",
    "ticketing_Type": "1",
    "iP_Address": "27.XXX.XX.76",
    "request_Id": "REQ123456",
    "imeI_Number": "353535353535353",
    "registrationID": "AOP-554"
  }',
  CURLOPT_HTTPHEADER =>  array(
    'Content-Type: application/json'
  ),
));
$response =  curl_exec($curl);
curl_close($curl);
echo $response;
                                

RESPONSE

200

401

-Result

Example

{
"airlinePNRDetails": [
       { 
                "airlinePNRs": [
                            { 
                                            "airline_Code": "6E",
                                            "airline_PNR": "UZJN3Q",
                                            "crS_Code": null,
                                            "crS_PNR": null,
                                            "record_Locator": null,
                                            "supplier_RefNo": ""
                            } 
                    ], 
                    "failure_Remark": null,
                    "flight_Id": "5051041979922705413",
                    "hold_Validity": null,
                    "status_Id": "11"
      } 
 ], 
 "booking_RefNo": "FLYB6YMAD",
 "response_Header": {
                    "error_Code": "0000",
                    "error_Desc": "SUCCESS",
                    "error_InnerException": "",
                    "request_Id": "REQ123456",
                    "status_Id": "11"
}, 
"statuss": "FALSE",
"message": "",
"value": ""
}
{
    "code": "207",
    "description": "Amount is Requaired",
    "merchantTrxnRefId": null,
    "token": null,
    "status": "False"
}