Flight Booking APIs
The booking process has two different flows based on whether the selected itinerary is marked as Bookable in the search results:
- Bookable tickets: Use the regular booking flow with
[BaseUrl]/flight-booking - Non-bookable tickets: Use direct ticket request with
[BaseUrl]/flight-direct-ticket - Find the last ticketing time after booking
Success
Regular Booking API
POST
Endpoint:[BaseUrl]/flight-bookingPassenger Information Fields
| Field | Type | Required | Description |
|---|---|---|---|
| PassengerType | String | Yes | ADT=Adult, CNN=Child, INF=Infant |
| Title | String | Yes | Mr/Ms/Mrs (Adult), Miss/MSTR (Child/Infant) |
| FirstName | String | Yes | First name as per document. No special characters allowed |
| LastName | String | Yes | Last name as per document. No special characters allowed |
| Gender | String | Yes | Male, Female |
| DateOfBirth | String | Yes | YYYY-MM-DD format, must comply with age policy |
| PassportNumber | String | Conditional* | Required for international flights. Must be valid passport number. [ Please check Document Requirement or Price Check api ] |
| PassportExpireDate | String | Conditional* | Required for international flights. Must comply with policy. [ Please check Document Requirement or Price Check api ] |
| Nationality | String | Yes | Country code (e.g., MY) |
| IsWheelchair | Boolean | Yes | true/false |
| IssuingCountry | String | Yes | Nationality Code (e.g., MY) |
| PhoneCountryCode | String | Yes | Phone Country Code (e.g., +60) |
| Phone | String | Yes | Valid phone number |
| String | Yes | Valid email address | |
| Meal | String | No | Meal Code (reference Extra service API) |
| ExtraBaggage | String | No | Extra Baggage Code (reference Extra service API) |
| ItemCodeRef | String | Yes | Selected Item Code from search list |
| PriceCodeRef | Array | Yes | Selected Price Code Refs from price check API |
| UniqueTransID | String | Yes | Unique Transaction ID from search list |
Request
{
"PassengerInfoes": [
{
"PassengerType": "ADT",
"Title": "Mr",
"FirstName": "TEST",
"LastName": "TEST",
"Gender": "Male",
"DateOfBirth": "1999-06-09",
"PassportNumber": "PASSPORT",
"PassportExpireDate": "2025-10-28",
"Nationality": "MY",
"IsWheelchair": false,
"IssuingCountry": "MY",
"PhoneCountryCode": "+60",
"Phone": "7992453938",
"Email": "TEST@GMAIL.COM",
"Meal": [
{
"Code": "97691c4d7965896",
"Description": "Vegetarian Jain Meal"
}
],
"ExtraBaggage": [
{
"Code": "97691c4d7964777",
"Description": "Check-in baggage - up to 10 kg"
}
]
}
],
"ContactInfo": {
"Email": "TEST@my.com",
"Phone": "07992453911",
"PhoneCountryCode": "+60"
},
"UniqueTransID": "NZ23479523302253652",
"ItemCodeRef": "TloyMzQ3OTUxMjk0MjEwNDk0LTYzODY3MzY3OTYxMDgxNDEzMXxWL0Jhd01UcVdES0FJVndvQUFBQUFBPT18R2FsaWxlb3wxRy1CRA==",
"PriceCodeRef": "TloyMzQ3OTUyMzMwMjI1MzY1Mi02Mzg2NzM3MDg3OTY4MDIwNDF8Vi9CYXdNVHFXREtBY3o4cEFBQUFBQT09fEdhbGlsZW98MUctQkQ="
}Response
{
"flag": true,
"code": 200,
"message": "Booking success",
"data": {
"Warnings": [],
"TicketInfoes": [
{
"PassengerInfo": {
"NameElement": {
"Title": "MR",
"FirstName": "TEST",
"LastName": "TEST",
"MiddleName": ""
},
"ContactInfo": {
"Email": "TEST@GMAIL.COM",
"Phone": "7992453938",
"PhoneCountryCode": "+60",
"CountryCode": "MY",
"CityName": ""
},
"DocumentInfo": {
"DocumentType": "passport",
"DocumentNumber": "PASSPORT",
"ExpireDate": "2025-10-28",
"FrequentFlyerNumber": "",
"IssuingCountry": "MY",
"Nationality": "MY"
},
"PassengerType": "ADT",
"Gender": "Male",
"DateOfBirth": "1999-06-09",
"PassengerKey": "7AXscXMHF8A3BmARN6e5ww==",
"ExtraService": []
},
"TicketNumbers": []
}
],
"FlightInfo": {
"Directions": [
[
{
"Origin": "KUL",
"OriginName": "Kuala Lumpur International Airport",
"Destination": "DAC",
"DestinationName": "Dhaka / Hazrat Shahjalal International Airport",
"PlatingCarrierCode": "BG",
"PlatingCarrierName": "Biman Bangladesh Airlines",
"Stops": "0",
"Segments": [
{
"Origin": "KUL",
"OriginName": "Kuala Lumpur International Airport",
"Destination": "DAC",
"DestinationName": "Dhaka / Hazrat Shahjalal International Airport",
"Group": "0",
"Departure": "2025-01-15 02:30:00",
"Arrival": "2025-01-15 04:20:00",
"Airline": "Biman Bangladesh Airlines",
"FlightNumber": "387",
"ServiceClass": "Economy",
"Plane": ["738"],
"Duration": ["3h 50m"],
"TechStops": [0],
"BookingClass": "Economy,E",
"Baggage": [
{
"Units": "Kilograms",
"Amount": 35,
"PassengerTypeCode": "ADT"
}
]
}
]
}
]
],
"BookingComponent": {
"DiscountPrice": "0.0000",
"TotalPrice": "16482.00",
"BasePrice": "13831.00",
"Taxes": "2602.00",
"AIT": "49.0000"
}
},
"PNR": "9F162H",
"airline_pnrs": "MWLEFA",
"BookingRefNumber": "2HVXFO",
"BookingStatus": "BOOKED",
"PaymentStatus": "PENDING",
"TicketStatus": "PENDING",
"lastTicketingTime": ""
}
}Non-Bookable Ticket Process Details
Initial Request
- User submits direct ticket request for non-bookable itinerary
- Request format matches regular booking structure
- No PNR generation required
Processing Phase
- System updates booking status to
TICKET IN PROCESS - Admin team begins ticket processing
- Maximum processing time:
20 minutes
Ticket Confirmation
- System interacts with
/flight-detailsAPI - Attempts to confirm ticket and retrieve ticket number
- Real-time status monitoring available
Possible Outcomes
Successful Scenario
- Booking Status:
CONFIRMED - Ticket Status:
SUCCESS - Ticket number issued
Failed Scenario
- Booking Status:
REJECTED - Automatic refund initiated
- User notified of failure
Booking Status Flow
| Status | Description | Next Steps |
|---|---|---|
| BOOKED | Initial booking successful | Submit ticket request |
| TICKET IN PROCESS | Ticket being processed | Wait for confirmation |
| CONFIRMED | Ticket issued successfully | Ready for travel |
| REJECTED | Booking/ticketing failed | Refund process starts |
Important Notes:
- Monitor booking status using flight-details API
- Store BookingTransactionRef for future reference
- Find the last ticketing time after booking
"Success" - Find the last ticketing time from this API
[BaseUrl]/find-last-ticket-time - Keep track of last ticketing time to avoid auto-cancellation
Status Flow Details
Regular Booking Flow
- Submit booking request
- Receive
"BOOKED"status - Process payment
- Receive ticket confirmation
- Status changes to
"CONFIRMED"
Direct Ticket Flow
- Submit direct ticket request
- Receive "TICKET IN PROCESS" status
- Wait for admin processing (up to 20 minutes)
- Status changes to either "CONFIRMED" or "REJECTED"
- If rejected, automatic refund is initiated
Find PNR and Airline PNR
- Generally after a successful booking, you’ll receive
PNRandAirline PNR - If you don’t find the PNR or Airline PNR immediately wait until your ticket is
confirmed - Kindly retrieve the PNR and Airline PNR after ticket confirmation
Status Monitoring Tips:
- Use the flight-details API to poll for status updates
- Recommended polling interval: 30 seconds
- Stop polling once final status is reached
CONFIRMED/REJECTED - Implement appropriate timeout handling
20 minutes for direct tickets
Error Handling:
- If no response after 20 minutes, consider the request failed
- Always check for error messages in the response
- Validate passenger details before submission
- Ensure all required fields are provided based on flight type
domestic/international