Flight API Round Trip Flow

Flight API

Round Trip Flow

GetAirResults

This method is used to fetch all round trip flight details to display to users.

(Session time from search till booking will be 30 mins)

Path: /api/GetAirResults/

Method Type :POST

Request:
{
"OriginCode": "string",
"DestinationCode": "string",
"FromDate": "string",
"ToDate": "string",
"CabinType": "string",
"AdultCount": "string",
"ChildCount": "string",
"InfantCount": "string",
"TripType": "string"
}

  • OriginCode : Requires the 3 characters IATA airport code to pass.
  • DestinationCode : Requires the 3 characters IATA airport code to pass.
  • FromDate : The Travel From Date.
  • ToDate : The Travel To Date. Required for Round Trip flow.
  • CabinType : Requires the 1 character cabin class. Description of Cabin types are given below.
  • AdultCount : Requires number of adults
  • ChildCount : Requires number of children.
  • InfantCount : Requires number of infants.
  • TripType : Requires to identify whether the request is for One way or Round trip

Type of CabinClass:

  • Economy => E
  • Business => B
  • First Class => F

Type of TripType:

  • OneWay => O
  • RoundTrip => R

Note (In this case trip type will be R)

Sample Request :

{
"originCode": "NUM",
"destinationCode": "RUH",
"fromDate": "181225",
"toDate": "251225",
"cabinType": "E",
"adultCount": "1",
"childCount": "0",
"infantCount": "0",
"tripType": "R"
}

Response:

Below are the definitions of all the objects.
RequestID : Unique Identifier for each response to get and useful in terms of further request API’s.
Key : Unique identifier for each flight information to get and useful in terms of further request with selected flight.
totalPrice : Total booking price.
totalTax : Total tax inclusive in totalPrice tag.
totalVat : Total VAT inclusive in totalPrice tag.
currency : Definition of currency.
supplier : Identifier of selected supplier.
paxCount : Identifies for total pax count.
outBoundInfo : Shows the outbound flight information i.e. for One way. Breakdown of outBoundInfo mentioned below in Reference 1.1.

Objects in outBoundInfo: (Reference 1.1)

departureDate : Identifier for departure date. (ddMMyy format)
departureTime : Identifier for departure time.
arrivalDate : Identifier for arrival date. (hhmm format)
arrivalTime : Identifier for arrival time.
fromAirportCode : Identifier for departure airport code.
departureTerminal : identifier for departure airport terminal (Null in case of no terminal)
arrivalTerminal : Identifier for arrival airport terminal (Null in case of no terminal)
toAirportCode : Identifier for arrival airport code.
marketingCarrier : Identifier for marketing carrier (Includes airline code always)
operatingCarrier : Identifier for operating carrier (Includes airline code always)
flightNumber : Identifier of flight number
equipmentType : Identifier for equipment name and description.
layoverTime : Identifier for layover time duration.
adultFare : Description of objects are defined in Reference 1.2.
childFare : Description of objects are defined in Reference 1.2.
infantFare : Description of objects are defined in Reference 1.2.
checkInBaggage : Identifier to get the information of check in baggage. Here “N” defines the “Piece(s)” & other than “N” will be considered as “Kg(s)”. (In case of Saudia airline 1 Pc = 23kgs.)
cabinBaggage : Identifier to get the information of cabin baggage. (If we have no information we can show 7kg by default).
totalFare : Identifier for final selling price.
validatingCarrier : Identifier for validating carrier.

Objects in inBoundInfo:

departureDate : Identifier for departure date of the inbound flight. (ddMMyy format)
departureTime : Identifier for departure time of the inbound flight.
arrivalDate : Identifier for arrival date of the inbound flight. (hhmm format)
arrivalTime : Identifier for arrival time of the inbound flight.
fromAirportCode : Identifier for departure airport code of the inbound flight.
departureTerminal : identifier for departure airport terminal of the inbound flight (Null in case of no terminal)
arrivalTerminal : Identifier for arrival airport terminal of the inbound flight (Null in case of no terminal)
toAirportCode : Identifier for arrival airport code of the inbound flight.
marketingCarrier : Identifier for marketing carrier of the inbound flight (Includes airline code always)
operatingCarrier : Identifier for operating carrier of the inbound flight (Includes airline code always)
flightNumber : Identifier of flight number of the inbound flight
equipmentType : Identifier for equipment name and description of the inbound flight.
layoverTime : Identifier for layover time duration of the inbound flight.
checkInBaggage : Identifier to get the information of check in baggage. Here “N” defines the “Piece(s)” & other than “N” will be considered as “Kg(s)”. (In case of Saudia airline 1 Pc = 23 kgs.)
cabinBaggage : Identifier to get the information of cabin baggage. (If we have no information we can show 7kg by default).
validatingCarrier : Identifier for validating carrier

 

GetFareRules

This method will return the fare rules of outbound and inbound flight.

Path: /api/GetFareRules/

Method Type :POST

Same as for one-way (see Reference 5).

 

GetAirAvailability

This method will return the response whether the flight is available or not or if the price is changed.

Same as for one-way (see Reference 7).

CBT_IssueTicket

This API is useful for generating the PNR along with tickets. (Monthly flow with one adult)
Same as for one-way (see Reference 12).

CBT_TicketCancel

This API is useful for canceling the Ticket/PNR.

Path: /api/CBT_TicketCancel/

Method Type :POST

Sample Request:


{
"UserId": 48928,
"BookingId": 41642,
"TotalAmount": 979.80,
"CancellationAmount": 0.00,
"RefundAmount": 979.80,
"Currency": "SAR",
"CancellationReason": "Change in Personal Plans"
}

Note: Below are the Cancellation Reasons.

  • Change in Personal Plans
  • Health or Medical Reasons
  • Work Schedule Changed
  • Incorrect Travel Date or Route Selected
  • No Longer Traveling
  • Other Reason

Sample response:


{
"IsSuccess": true,
"Message": "Ticket Cancelled Successfully - 06535002372749"
}

UpdateEmployeeDetails

This API is useful for updating the employee data.

Path: /api/UpdateEmployeeDetails/

Method Type :POST

Sample Request:


{
"UserID": 21140,
"CustomerID": 10726,
"EmailID": "Johndoe@mail.com",
"Gender": "Male",
"FirstName": "John",
"LastName": "Doe",
"DateOfBirth": "1981-12-10",
"PassengerType": "Adult",
"Contact": "88******04",
"DialingCode": "+971",
"Address": null,
"CountryID": "75",
"CountryName": "FR",
"CitizenShipCountryID": "75",
"CitizenShipCountryName": "FR",
"PassportNumber": "657489702",
"PassportIssueCountryID": "75",
"PassportIssueCountryName": "FR",
"PassportExpiryDate": "2030-04-25",
"NationalIDNumber": "87177846",
"NationalIDNumberIssueCountryID": "75",
"NationalIDNumberCountryName": "FR",
"NationalIDNumberExpiryDate": "2027-10-19",
"frequentFlyerDetails": [
{
"ID": 42,
"AirlineName": "Saudia",
"AirlineCode": "SV",
"Code": "SV",
"FrequentFlyerProgramName": "Alfursan Miles"
},
{
"ID": 0, // this will insert new record
"AirlineName": "Flynas",
"AirlineCode": "XY",
"Code": "XY",
"FrequentFlyerProgramName": "Nasmiles"
}
]
}

Sample Response:


{
"IsSuccess": true,
"Message": "Employee details are updated successfully."
}


 

Note : If id in the frequentFlyerdetails is 0 then it will insert else it will update.

UpdateTravelerInfo

This API is useful for updating traveler data.

Path: /api/UpdateTravelerInfo/

Method Type :POST

Sample Request:


{
"CustomerID": 10726,
"TravellerID": 43413,
"EmailID": "childtest@yopmail.com",
"Gender": "Male",
"FirstName": "childone",
"LastName": "Test",
"DateOfBirth": "2020-02-15",
"PassengerType": "Child",
"Contact": "88******04",
"DialingCode": "+966",
"Address": null,
"CountryID": "191",
"CountryName": "SA",
"CitizenShipCountryID": "191",
"CitizenShipCountryName": "SA",
"PassportNumber": "7896324471",
"PassportIssueCountryID": "191",
"PassportIssueCountryName": "SA",
"PassportExpiryDate": "2034-06-24",
"NationalIDNumber": "9988888881",
"NationalIDNumberIssueCountryID": "191",
"NationalIDNumberCountryName": "SA",
"NationalIDNumberExpiryDate": "2028-11-15",
"frequentFlyerDetails": []
}

Sample Response:


{
"IsSuccess": true,
"Message": "Traveler details are updated successfully."
}