Overview
A single REST API for flight search, booking and booking management.
The Travel Companion API covers the complete booking lifecycle: searching flight availability, reviewing flight details and fare rules, submitting passenger information, confirming bookings with payment, and retrieving booking records.
Every request is authenticated with an API key and secret sent in the request headers, and all traffic is served over HTTPS.
It is built for travel agencies and development teams integrating flight booking into their own platforms, with a dedicated UAT environment for testing before going live.
Base URLs
Every endpoint path is relative to the base URL of the environment. Use UAT while integrating and testing, and Production for live bookings.
| Environment | Base URL |
|---|---|
| Production |
http://outward-api.travelcompanion.co/api/v1
|
| UAT |
https://outward-api-dev.farepod.co/api/v1
|
The endpoints below show UAT URLs by default. Use the switch on any endpoint to show Production URLs instead.
Authentication
The API requires an API key and secret for authentication. You can obtain these credentials by contacting support
X-API-KEY- The API key is used to authenticate the API request. To be passed in header in every request
X-API-SECRET- The API secret is used to create more security for the API request. To be passed in header in every request
Booking Flow Summary
- Get Sector Availability Optional Fetch the available sectors, the dates with flights and the seats left on each date. Cache the response on your side for up to 30 minutes.
- Search Flights Start by searching for flights based on travel criteria.
- Review Flight Select and review a specific flight from the search results.
- Get Fare Rules Optional Fetch rules for cancellations, changes, and baggage policies.
- Add Passenger Details Provide passenger and contact details to create a booking.
- Book + Make Payment Confirm and pay for the booking to finalize it.
- Retrieve Booking Details Fetch details of the booking for confirmation or further actions.
Booking Flow Chart
Endpoints
Get User Details
http://outward-api.travelcompanion.co/api/v1/user-details
Endpoint for getting the details and balances of the user
The input body is empty.
The output contains an object with the userId, userName and balances as well as limits for the user.
Output
| Field | Parent | Description | Data Type |
|---|---|---|---|
| user | root | Details of the current user | Object |
| userId | user | userId of the current user | String |
| userName | user | User Name of the current user | String |
| balances | root | All the balances of the user | Object |
| totalBalance | balances | Total balance for the user includes credit balance and wallet balance | Number |
| walletBalance | balances | Wallet Balance of the user | Number |
| creditBalance | balances | Credit Balance of the user | Number |
| outStanding | balances | Outstanding Balance of the user | Number |
| limits | root | Different balance limits for the user | Object |
| creditLimit | limits | Maximum Credit allowed for the user | Number |
Get Sector Availability
http://outward-api.travelcompanion.co/api/v1/flights/sectors
Endpoint to get the available origin-destination sectors along with the dates on which flights are available for each sector and the number of seats available on each date. The response should be cached on the client side for upto 30 minutes.
The endpoint accepts an optional query parameter:
- pnr: field to specify whether to get sectors with instant PNR or all sectors(includes awaiting PNR) (FareSearchPnrFilterEnum).
The output contains the status of the request, the total count of available sectors and an array of sector objects. Each sector object contains the sector formatted as "ORIGIN-DESTINATION" airport codes, the total seats available on the sector and the per-date seat availability. Dates are formatted as YYYYMMDD.
Query Parameters
| Parameter | Parent | Description | Data Type | Required |
|---|---|---|---|---|
| pnr | root | The flight PNR type enum default is "ALL" | FareSearchPnrFilterEnum | False |
Output
| Field | Parent | Description | Data Type |
|---|---|---|---|
| status | root | The status of the request. | String |
| sectors | root | The total number of available sectors. | Number |
| availableSectors | root | The list of available sectors. | Array<Object> |
| sector | availableSectors | The sector represented as an "ORIGIN-DESTINATION" airport code pair. | String |
| totalSectorSeats | availableSectors | The total number of seats available on the sector across all dates. | Number |
| availability | availableSectors | The list of dates on which flights are available for the sector. | Array<Object> |
| date | availability | The flight date in YYYYMMDD format. | String |
| availableSeats | availability | The number of seats available on the sector for the date. | Number |
Search Flights
http://outward-api.travelcompanion.co/api/v1/flights
Endpoint to search for flights.
More specifically, the input includes the following fields:
- cabinClass: a string indicating the desired cabin class, such as "ECONOMY" or "BUSINESS".(CabinClassEnum)
- passengers: an object with fields for the number of adult, child, and infant passengers.
- routeInfo: an array of objects representing the desired travel route, each with fields for the origin airport code, destination airport code, and travel date.
- filter: an object with fields for flight filters such as preferred fare type, direct flights only, and connecting flights only.
- pnr: field to specify whether to get flights with instant PNR or all flights(includes awaiting PNR) (FareSearchPnrFilterEnum).
- preferredAirlines: an array of strings representing the preferred airlines for the search.
The output includes an array of objects, with each object representing a potential flight itinerary that matches the search criteria. Each object includes the following fields:
- segments: An array of objects representing the flight segments, with fields such as flight name, flight number, departure and arrival times, and airport codes.
- priceList: An array of objects representing the pricing options for the itinerary, with fields such as total fare, net fare, and fare components broken down by passenger type.
- duration: A number indicating the total duration of the flight itinerary, in minutes.
- listedBy: An object containing agency, sub-agency, and sub-agency user who listed the flight.(Only present for few tickets)
Input
| Input | Parent | Description | Data Type | Required |
|---|---|---|---|---|
| cabinClass | root | The cabin class for the flight | CabinClassEnum | True |
| passengers | root | The number of passengers for the flight. | Object | True |
| adult | passengers | The number of adult passengers for the flight | Integer | True |
| child | passengers | The number of child passengers for the flight | Integer | True |
| infant | passengers | The number of infant passengers for the flight | Integer | True |
| routeInfo | root | The route information for the flight | List | True |
| from | routeInfo | The origin airport code for the flight | Object | True |
| code | from | The airport code for the origin airport | String | True |
| to | routeInfo | The destination airport code for the flight | Object | True |
| code | to | The airport code for the destination airport | String | True |
| travelDate | routeInfo | The travel date for the flight | String | True |
| filter | root | The filter options for the flight search | Object | True |
| pnr | filter | The flight PNR type enum default is "ALL" | FareSearchPnrFilterEnum | False |
| pft | filter | The fare type for the flight | String | True |
| isDirectFlight | filter | Whether the flight should be a direct flight | Boolean | True |
| isConnectingFlight | filter | Whether the flight should be a connecting flight | Boolean | True |
| preferredAirlines | root | Airline Codes for the preferred airlines | Array<String> | True |
Output
| Field | Parent | Description | Data Type |
|---|---|---|---|
| segments | root | Details of the flight, including flight name, number, duration, stops, and arrival/departure details. | Array |
| flight | segments | The name, code and number of the flight. | Object |
| duration | segments | The duration of the flight in minutes. | Number |
| layoverDuration | segments | The duration of any layovers during the flight in minutes. | Number |
| stops | segments | The number of stops during the flight. | Number |
| stopsOverAirports | segments | The codes of any airports where the flight stops. | Array |
| arrival | segments | The date, time, and airport details of the flight's arrival. | Object |
| date | segments.arrival | The date of the flight's arrival in YYYYMMDD format. | String |
| time | segments.arrival | The time of the flight's arrival in HHMMSS format. | String |
| airport | segments.arrival | The code, name, city, city code, country, country code, and terminal of the airport where the flight arrives. | Object |
| departure | segments | The date, time, and airport details of the flight's departure. | Object |
| date | segments.departure | The date of the flight's departure in YYYYMMDD format. | String |
| time | segments.departure | The time of the flight's departure in HHMMSS format. | String |
| airport | segments.departure | The code, name, city, city code, country, country code, and terminal of the airport where the flight departs. | Object |
| priceList(sorted in increasing order of fare) | root | The fare details for the flight, including the total fare, net fare, fare components, taxes and fees, seats remaining, baggage details, refundable type, cabin class, and meal indicator for each fare type (adult, child, and infant). | Array |
| id | priceList | A unique ID for the fare. | String |
| totalFare | priceList | The total fare for the flight. | Number |
| netFare | priceList | The net fare for the flight. | Number |
| totalBaseFare | priceList | The base fare for the flight. | Number |
| totalTaxesAndFees | priceList | The total taxes and fees for the flight. | Number |
| managementFees | priceList | Breakup of management fees for the flight. | Object |
| managementFees | managementFees | The management fees for the flight | Number |
| gstOnManagementFees | managementFees | The GST on management fees for the flight | Number |
| totalManagementFees | managementFees | Management Fees + GST on management fees | Number |
| commission | priceList | Breakup of commission for the flight. | Object |
| grossCommission | commission | The gross commission for the flight | Number |
| tdsOnCommission | commission | The TDS deducted on gross commission for the flight | Number |
| netCommission | commission | The net commission after TDS deduction for the flight | Number |
| fareDescription | priceList | An object containing fare details for different passenger types (adult, child and infant). | Object |
| adult | priceList.fareDescription | An object containing fare details for an adult passenger. | Object |
| fareComponent | priceList.fareDescription.adult | An object containing the net, base, taxes and fees, and total fares for the adult passenger. | Object |
| taxesAndFees | priceList.fareDescription.adult | An array of objects containing the names and values of taxes and fees for the adult passenger. | Object |
| commission | priceList.fareDescription.adult | An array of objects containing the names and values of commission breakdown for the adult passenger. | Object |
| seatsRemaining | priceList.fareDescription.adult | The number of remaining seats available for adult passengers. | Number |
| baggage | priceList.fareDescription.adult |
An object that contains the baggage
details for adult passengers: checkIn: The check-in baggage limit for adult passengers. cabin: The cabin baggage limit for adult passengers. |
Object |
| refundableType | priceList .fareDescription.adult. | The refundable type of the fare for adult passengers. | RefundableEnum |
| cabinClass | priceList .fareDescription.adult. | The cabin class of the fare for adult passengers. | CabinClassEnum |
| fareClass | priceList .fareDescription.adult. | The fare class of the adult passengers. | String |
| mealIndicator | priceList .fareDescription.adult. | A boolean flag indicating if meal is included in the fare for adult passengers. | Boolean |
| child | priceList .fareDescription | An object containing fare details for a child passenger | Object |
| fareComponent | priceList .fareDescription.child | An object containing the net, base, taxes and fees, and total fares for the child passenger | Object |
| taxesAndFees | priceList .fareDescription.child | An array of objects containing the names and values of taxes and fees for the child passenger | Object |
| commission | priceList.fareDescription.child | An array of objects containing the names and values of commission breakdown for the child passenger. | Object |
| seatsRemaining | priceList .fareDescription.child | The number of remaining seats available for child passengers | Number |
| baggage | priceList .fareDescription.child | An object that contains the baggage details for adult passengers. checkIn: The check-in baggage limit for adult passengers. cabin: The cabin baggage limit for adult passengers. | Object |
| refundableType | priceList .fareDescription.child | The refundable type of the fare for child passengers. | RefundableEnum |
| cabinClass | priceList .fareDescription.child | The cabin class of the fare for child passengers. | CabinClassEnum |
| fareClass | priceList .fareDescription.child | The Fare class of the child passengers. | String |
| mealIndicator | priceList .fareDescription.child | A boolean flag indicating if meal is included in the fare for child passengers | Boolean |
| infant | priceList .fareDescription | An object containing fare details for a infant passenger | Object |
| fareComponent | priceList .fareDescription.infant | An object containing the net, base, taxes and fees, and total fares for the infant passenger | Object |
| taxesAndFees | priceList .fareDescription.infant | An array of objects containing the names and values of taxes and fees for the infant passenger | Object |
| commission | priceList.fareDescription.infant | An array of objects containing the names and values of commission breakdown for the infant passenger. | Object |
| seatsRemaining | priceList .fareDescription.infant | The number of remaining seats available for infant passengers | Number |
| baggage | priceList .fareDescription.infant | An object that contains the baggage details for adult passengers. checkIn: The check-in baggage limit for adult passengers. cabin: The cabin baggage limit for adult passengers. | Object |
| refundableType | priceList .fareDescription.infant | The refundable type of the fare for infant passengers. | RefundableEnum |
| cabinClass | priceList .fareDescription.infant | The cabin class of the fare for infant passengers. | CabinClassEnum |
| fareClass | priceList .fareDescription.infant | The Fare class of the infant passengers. | String |
| mealIndicator | priceList .fareDescription.infant | A boolean flag indicating if meal is included in the fare for infant passengers | Boolean |
| duration | root | duration of flight in minutes | Number |
Review Flight
http://outward-api.travelcompanion.co/api/v1/flights/:id
Endpoint to review flight by ID.
The input request has no body
The output includes an object, with following key fields:
- segments: An array of objects representing the flight segments, with fields such as flight name, flight number, departure and arrival times, and airport codes.
- priceDetail: An object representing the pricing details for the itinerary, with fields such as total fare, net fare, and fare components broken down by passenger type.
- duration: A number indicating the total duration of the flight itinerary, in minutes.
- bookingId: This is the ID that should be used to add passenger in the next step
- stops: Whether the flight is 'non-stop', '1 stop' , '2 stops' , etc
- conditions: Details about which fields should be passed in Add Passengers Request
Output
| Field | Parent | Description | Data Type |
|---|---|---|---|
| bookingId | root | A unique ID for the fare. | String |
| segments | root | Details of each flight segment in the itinerary | Array |
| flight | segments | Information about the airline operating the flight | Object |
| name | segments.flight | Name of the airline | String |
| code | segments.flight | Two-letter code of the airline | String |
| Number | segments.flight | Flight number | String |
| duration | segments | Total duration of the flight segment in minutes | Number |
| layoverDuration | segments | Duration of any layover in minutes | Number |
| stops | segments | Number of stops in the flight segment | Number |
| stopsOverAirports | segments | Array of airports where the flight stops | Array of Objects |
| code | segments.stopsOverAirports | Three-letter code of the airport | String |
| name | segments.stopsOverAirports | Name of the airport | String |
| city | segments.stopsOverAirports | City where the airport is located | String |
| cityCode | segments.stopsOverAirports | Two-letter code of the city | String |
| country | segments.stopsOverAirports | Country where the airport is located | String |
| countryCode | segments.stopsOverAirports | Two-letter code of the country | String |
| terminal | segments.stopsOverAirports | Terminal where the flight stops | String |
| arrival | segments | Details of the arrival airport | Object |
| date | segments.arrival | Date of arrival in YYYYMMDD format | String |
| time | segments.arrival | Time of arrival in HHMMSS format | String |
| airport | segments.arrival | Details of the arrival airport | Object |
| code | segments.arrival.airport | Three-letter code of the airport | String |
| name | segments.arrival.airport | Name of the airport | String |
| city | segments.arrival.airport | City where the airport is located | String |
| cityCode | segments.arrival.airport | Two-letter code of the city | String |
| country | segments.arrival.airport | Country where the airport is located | String |
| countryCode | segments.arrival.airport | Two-letter code of the country | String |
| terminal | segments.arrival.airport | Terminal where the flight arrives | String |
| departure | segments | Details of the departure airport. | Object |
| date | segments.departure | Date of departure in YYYYMMDD format | String |
| time | segments.departure | Time of departure in HHMMSS format | String |
| airport | segments.departure | Details of the departure airport | Object |
| code | segments.departure.airport | Three-letter code of the airport | String |
| name | segments.departure.airport | Name of the airport | String |
| city | segments.departure.airport | City where the airport is located | String |
| cityCode | segments.departure.airport | Two-letter code of the city | String |
| country | segments.departure.airport | Country where the airport is located | String |
| countryCode | segments.departure.airport | Two-letter code of the country | String |
| terminal | segments.departure.airport | Terminal where the flight departs | String |
| operatingAirline | segments | Information about the airline operating the flight (if different from the marketing airline) | Object |
| priceDetail | root | The fare details for the flight, including the total fare, net fare, fare components, taxes and fees, seats remaining, baggage details, refundable type, cabin class, and meal indicator for each fare type (adult, child, and infant). | Object |
| id | priceDetail | A unique ID for the fare. | String |
| totalFare | priceDetail | The total fare for the flight. | Number |
| netFare | priceDetail | The net fare for the flight. | Number |
| totalBaseFare | priceDetail | The base fare for the flight. | Number |
| totalTaxesAndFees | priceDetail | The total taxes and fees for the flight. | Number |
| managementFees | priceDetail | Breakup of management fees for the flight. | Object |
| managementFees | managementFees | The management fees for the flight | Number |
| gstOnManagementFees | managementFees | The GST on management fees for the flight | Number |
| totalManagementFees | managementFees | Management Fees + GST on management fees | Number |
| commission | priceDetail | Breakup of commission for the flight. | Object |
| grossCommission | commission | The gross commission for the flight | Number |
| tdsOnCommission | commission | The TDS deducted on gross commission for the flight | Number |
| netCommission | commission | The net commission after TDS deduction for the flight | Number |
| fareDescription | priceDetail | An object containing fare details for different passenger types (adult, child and infant). | Object |
| adult | priceDetail.fareDescription | An object containing fare details for an adult passenger. | Object |
| fareComponent | priceDetail.fareDescription.adult | An object containing the net, base, taxes and fees, and total fares for the adult passenger. | Object |
| taxesAndFees | priceDetail.fareDescription.adult | An array of objects containing the names and values of taxes and fees for the adult passenger. | Object |
| commission | priceDetail.fareDescription.adult | An array of objects containing the names and values of commission breakdown for the adult passenger. | Object |
| seatsRemaining | priceDetail.fareDescription.adult | The number of remaining seats available for adult passengers. | Number |
| baggage | priceDetail.fareDescription.adult |
An object that contains the baggage
details for adult passengers: checkIn: The check-in baggage limit for adult passengers. cabin: The cabin baggage limit for adult passengers. |
Object |
| refundableType | priceDetail .fareDescription.adult. | The refundable type of the fare for adult passengers. | RefundableEnum |
| cabinClass | priceDetail .fareDescription.adult. | The cabin class of the fare for adult passengers. | CabinClassEnum |
| fareClass | priceDetail .fareDescription.adult. | The fare class of the adult passengers. | String |
| mealIndicator | priceDetail .fareDescription.adult. | A boolean flag indicating if meal is included in the fare for adult passengers. | Boolean |
| child | priceDetail .fareDescription | An object containing fare details for a child passenger | Object |
| fareComponent | priceDetail .fareDescription.child | An object containing the net, base, taxes and fees, and total fares for the child passenger | Object |
| taxesAndFees | priceDetail .fareDescription.child | An array of objects containing the names and values of taxes and fees for the child passenger | Object |
| commission | priceDetail.fareDescription.child | An array of objects containing the names and values of commission breakdown for the child passenger. | Object |
| seatsRemaining | priceDetail .fareDescription.child | The number of remaining seats available for child passengers | Number |
| baggage | priceDetail .fareDescription.child | An object that contains the baggage details for adult passengers. checkIn: The check-in baggage limit for adult passengers. cabin: The cabin baggage limit for adult passengers. | Object |
| refundableType | priceDetail .fareDescription.child | The refundable type of the fare for child passengers. | RefundableEnum |
| cabinClass | priceDetail .fareDescription.child | The cabin class of the fare for child passengers. | CabinClassEnum |
| fareClass | priceDetail .fareDescription.child | The Fare class of the child passengers. | String |
| mealIndicator | priceDetail .fareDescription.child | A boolean flag indicating if meal is included in the fare for child passengers | Boolean |
| infant | priceDetail .fareDescription | An object containing fare details for a infant passenger | Object |
| fareComponent | priceDetail .fareDescription.infant | An object containing the net, base, taxes and fees, and total fares for the infant passenger | Object |
| taxesAndFees | priceDetail .fareDescription.infant | An array of objects containing the names and values of taxes and fees for the infant passenger | Object |
| commission | priceDetail.fareDescription.infant | An array of objects containing the names and values of commission breakdown for the infant passenger. | Object |
| seatsRemaining | priceDetail .fareDescription.infant | The number of remaining seats available for infant passengers | Number |
| baggage | priceDetail .fareDescription.infant | An object that contains the baggage details for adult passengers. checkIn: The check-in baggage limit for adult passengers. cabin: The cabin baggage limit for adult passengers. | Object |
| refundableType | priceDetail .fareDescription.infant | The refundable type of the fare for infant passengers. | RefundableEnum |
| cabinClass | priceDetail .fareDescription.infant | The cabin class of the fare for infant passengers. | CabinClassEnum |
| fareClass | priceDetail .fareDescription.infant | The Fare class of the infant passengers. | String |
| mealIndicator | priceDetail .fareDescription.infant | A boolean flag indicating if meal is included in the fare for infant passengers | Boolean |
| duration | root | The duration of the flight in minutes. | Number |
| stops | root | Whether flight is non stop. | String |
| conditions | root | Details about which fields should be passed in Add Passengers Request | Object |
| dob | conditions | Whether the date of birth should be passed in Add Passengers Request | Object |
| adultRequired | dob | Whether the date of birth should be passed for adult passengers | Boolean |
| childRequired | dob | Whether the date of birth should be passed for child passengers | Boolean |
| infantRequired | dob | Whether the date of birth should be passed for infant passengers | Boolean |
| isPassportRequired | conditions | Whether the passport details should be passed in Add Passengers Request | Boolean |
| isPassportIssueDateRequired | conditions | Whether the passport issue date should be passed in Add Passengers Request | Boolean |
Get Fare Rules
http://outward-api.travelcompanion.co/api/v1/flights/:id/fare-rules
Endpoint to search fare rules of a flight by ID. Both search and bookingId can be used to get fare rules.
The input body is empty.
The output includes an object, with a single key :
- fareRules: String indicating fare rules of a flight.
Add Passenger Details
http://outward-api.travelcompanion.co/api/v1/bookings/:id/passenger-details
Endpoint is used to add passenger details. This endpoint returns a booking ID and final amount of booking that is subsequently used in the [book + make endpoint].
ID passed is pricelist.id that we get from search flights
Input includes following fields:
-
passengers:
Object containing information about the
passengers traveling with three
keys(adults,children,infants).
DOB format YYYYMMDD - contactInfo: Object containing the contact details of the person booking the travel.
The output includes an object, with a 2 key :
- _id: booking ID that is later used in payment endpoint.
- amount: Total amount of booking in INR that is later used in payment endpoint.
Input
| Input | Description | Data Type | Required | Empty Value |
|---|---|---|---|---|
| passengers | Object containing information about the passengers traveling | Object | True | {} |
| passengers .adults | Array of objects containing information about each adult passenger | Array | True | [] |
| passengers .adults .title | For Adult the titles are Mr, Mrs and Ms For Children the titles are Master and Ms For Infants the titles are Master and Ms | PassengerTitleEnum | True | Mandatory Field |
| passengers .adults .firstName | The first name of the passenger | String | True | Mandatory Field |
| passengers .adults.lastName | The last name of the passenger | String | True | Mandatory Field |
| passengers .adults .dob | Date of birth of the passenger | String | Based on DOB conditions in review response | "" |
| passengers .adults .passport | Object containing information about the passenger's passport | Object | Based on isPassportRequired in conditions in review response |
{
"expiry": "",
"nationality": "",
"number": "" ,
"issueDate": ""
}
|
| passengers .adults .passport .expiry | The expiry date of the passenger's passport | String | False | "" |
| passengers .adults .passport .nationality | The nationality of the passenger, as specified by the passport | String | False | "" |
| passengers .adults .passport .number | The passport number of the passenger | String | False | "" |
| passengers .adults .passport .issueDate | The issue date of the passenger's passport | String | Based on isPassportIssueDateRequired in conditions in review response | "" |
|
passengers .children (Same sub-fields as adult) |
Array of objects containing information about each child passenger (between age 2 years old and 12 years old) | Array | True | [] |
|
passengers .infants (Same sub-fields as adult) |
Array of objects containing information about each infant passenger (under 2 years old) | Array | True | [] |
| contactDetails | Object containing the contact details of the person booking the travel | Object | True | Mandatory Field |
| contactDetails .mobileNumber | The mobile phone number of the person booking the travel | String | True | Mandatory Field |
| contactDetails .email | The email address of the person booking the travel | String | True | Mandatory Field |
Output
| Field | Parent | Description | Data Type |
|---|---|---|---|
| _id | root | Booking ID that is used to ticket and also to retreive booking | String |
| amount | root | Total amount of booking in INR that will be charged | Number |
Book + Make Payment
http://outward-api.travelcompanion.co/api/v1/bookings/:id/book
Endpoint to book and make payment for a flight booking.
The input request body includes the amount to be paid in INR:
{
"amount": 4453.6
}
The output includes an object with the following key fields:
- _id: The unique booking ID.
- priceDetail: An object representing the pricing details, including total fare, base fare, taxes, fees, and management fees.
- segments: An array of objects representing the flight segments, with fields like flight name, number, duration, departure, and arrival details.
- passengers: An object containing details of passengers (adults, children, and infants) in the booking.
- status: The current status of the booking ie BookingStatusEnum.
Output
| Field | Parent | Description | Data Type |
|---|---|---|---|
| _id | root | The unique booking ID. | String |
| priceDetail | root | The fare details for the flight, including the total fare, net fare, fare components, taxes and fees, seats remaining, baggage details, refundable type, cabin class, and meal indicator for each fare type (adult, child, and infant). | Object |
| id | priceDetail | A unique ID for the fare. | String |
| totalFare | priceDetail | The total fare for the flight. | Number |
| netFare | priceDetail | The net fare for the flight. | Number |
| totalBaseFare | priceDetail | The base fare for the flight. | Number |
| totalTaxesAndFees | priceDetail | The total taxes and fees for the flight. | Number |
| managementFees | priceDetail | Breakup of management fees for the flight. | Object |
| managementFees | managementFees | The management fees for the flight | Number |
| gstOnManagementFees | managementFees | The GST on management fees for the flight | Number |
| totalManagementFees | managementFees | Management Fees + GST on management fees | Number |
| commission | priceDetail | Breakup of commission for the flight. | Object |
| grossCommission | commission | The gross commission for the flight | Number |
| tdsOnCommission | commission | The TDS deducted on gross commission for the flight | Number |
| netCommission | commission | The net commission after TDS deduction for the flight | Number |
| fareDescription | priceDetail | An object containing fare details for different passenger types (adult, child and infant). | Object |
| adult | priceDetail.fareDescription | An object containing fare details for an adult passenger. | Object |
| fareComponent | priceDetail.fareDescription.adult | An object containing the net, base, taxes and fees, and total fares for the adult passenger. | Object |
| taxesAndFees | priceDetail.fareDescription.adult | An array of objects containing the names and values of taxes and fees for the adult passenger. | Object |
| commission | priceDetail.fareDescription.adult | An array of objects containing the names and values of commission breakdown for the adult passenger. | Object |
| seatsRemaining | priceDetail.fareDescription.adult | The number of remaining seats available for adult passengers. | Number |
| baggage | priceDetail.fareDescription.adult |
An object that contains the baggage
details for adult passengers: checkIn: The check-in baggage limit for adult passengers. cabin: The cabin baggage limit for adult passengers. |
Object |
| refundableType | priceDetail .fareDescription.adult. | The refundable type of the fare for adult passengers. | RefundableEnum |
| cabinClass | priceDetail .fareDescription.adult. | The cabin class of the fare for adult passengers. | CabinClassEnum |
| fareClass | priceDetail .fareDescription.adult. | The fare class of the adult passengers. | String |
| mealIndicator | priceDetail .fareDescription.adult. | A boolean flag indicating if meal is included in the fare for adult passengers. | Boolean |
| child | priceDetail .fareDescription | An object containing fare details for a child passenger | Object |
| fareComponent | priceDetail .fareDescription.child | An object containing the net, base, taxes and fees, and total fares for the child passenger | Object |
| taxesAndFees | priceDetail .fareDescription.child | An array of objects containing the names and values of taxes and fees for the child passenger | Object |
| commission | priceDetail.fareDescription.child | An array of objects containing the names and values of commission breakdown for the child passenger. | Object |
| seatsRemaining | priceDetail .fareDescription.child | The number of remaining seats available for child passengers | Number |
| baggage | priceDetail .fareDescription.child | An object that contains the baggage details for adult passengers. checkIn: The check-in baggage limit for adult passengers. cabin: The cabin baggage limit for adult passengers. | Object |
| refundableType | priceDetail .fareDescription.child | The refundable type of the fare for child passengers. | RefundableEnum |
| cabinClass | priceDetail .fareDescription.child | The cabin class of the fare for child passengers. | CabinClassEnum |
| fareClass | priceDetail .fareDescription.child | The Fare class of the child passengers. | String |
| mealIndicator | priceDetail .fareDescription.child | A boolean flag indicating if meal is included in the fare for child passengers | Boolean |
| infant | priceDetail .fareDescription | An object containing fare details for a infant passenger | Object |
| fareComponent | priceDetail .fareDescription.infant | An object containing the net, base, taxes and fees, and total fares for the infant passenger | Object |
| taxesAndFees | priceDetail .fareDescription.infant | An array of objects containing the names and values of taxes and fees for the infant passenger | Object |
| commission | priceDetail.fareDescription.infant | An array of objects containing the names and values of commission breakdown for the infant passenger. | Object |
| seatsRemaining | priceDetail .fareDescription.infant | The number of remaining seats available for infant passengers | Number |
| baggage | priceDetail .fareDescription.infant | An object that contains the baggage details for adult passengers. checkIn: The check-in baggage limit for adult passengers. cabin: The cabin baggage limit for adult passengers. | Object |
| refundableType | priceDetail .fareDescription.infant | The refundable type of the fare for infant passengers. | RefundableEnum |
| cabinClass | priceDetail .fareDescription.infant | The cabin class of the fare for infant passengers. | CabinClassEnum |
| fareClass | priceDetail .fareDescription.infant | The Fare class of the infant passengers. | String |
| mealIndicator | priceDetail .fareDescription.infant | A boolean flag indicating if meal is included in the fare for infant passengers | Boolean |
| segments | root | Details of each flight segment in the itinerary | Array |
| flight | segments | Information about the airline operating the flight | Object |
| name | segments.flight | Name of the airline | String |
| code | segments.flight | Two-letter code of the airline | String |
| Number | segments.flight | Flight number | String |
| duration | segments | Total duration of the flight segment in minutes | Number |
| layoverDuration | segments | Duration of any layover in minutes | Number |
| stops | segments | Number of stops in the flight segment | Number |
| stopsOverAirports | segments | Array of airports where the flight stops | Array of Objects |
| code | segments.stopsOverAirports | Three-letter code of the airport | String |
| name | segments.stopsOverAirports | Name of the airport | String |
| city | segments.stopsOverAirports | City where the airport is located | String |
| cityCode | segments.stopsOverAirports | Two-letter code of the city | String |
| country | segments.stopsOverAirports | Country where the airport is located | String |
| countryCode | segments.stopsOverAirports | Two-letter code of the country | String |
| terminal | segments.stopsOverAirports | Terminal where the flight stops | String |
| arrival | segments | Details of the arrival airport | Object |
| date | segments.arrival | Date of arrival in YYYYMMDD format | String |
| time | segments.arrival | Time of arrival in HHMMSS format | String |
| airport | segments.arrival | Details of the arrival airport | Object |
| code | segments.arrival.airport | Three-letter code of the airport | String |
| name | segments.arrival.airport | Name of the airport | String |
| city | segments.arrival.airport | City where the airport is located | String |
| cityCode | segments.arrival.airport | Two-letter code of the city | String |
| country | segments.arrival.airport | Country where the airport is located | String |
| countryCode | segments.arrival.airport | Two-letter code of the country | String |
| terminal | segments.arrival.airport | Terminal where the flight arrives | String |
| departure | segments | Details of the departure airport. | Object |
| date | segments.departure | Date of departure in YYYYMMDD format | String |
| time | segments.departure | Time of departure in HHMMSS format | String |
| airport | segments.departure | Details of the departure airport | Object |
| code | segments.departure.airport | Three-letter code of the airport | String |
| name | segments.departure.airport | Name of the airport | String |
| city | segments.departure.airport | City where the airport is located | String |
| cityCode | segments.departure.airport | Two-letter code of the city | String |
| country | segments.departure.airport | Country where the airport is located | String |
| countryCode | segments.departure.airport | Two-letter code of the country | String |
| terminal | segments.departure.airport | Terminal where the flight departs | String |
| operatingAirline | segments | Information about the airline operating the flight (if different from the marketing airline) | Object |
| status | root | The current status of the booking | BookingStatusEnum |
Retrieve Booking Details
http://outward-api.travelcompanion.co/api/v1/bookings/:id
Endpoint to retreive the booking details.
The input request body is empty
The output includes an object with the following key fields:
- _id: The unique booking ID.
- priceDetail: An object representing the pricing details, including total fare, base fare, taxes, fees, and management fees.
- segments: An array of objects representing the flight segments, with fields like flight name, number, duration, departure, and arrival details.
- passengers: An object containing details of passengers (adults, children, and infants) in the booking.
- status: The current status of the booking ie BookingStatusEnum.
Output
| Field | Parent | Description | Data Type |
|---|---|---|---|
| _id | root | The unique booking ID. | String |
| priceDetail | root | The fare details for the flight, including the total fare, net fare, fare components, taxes and fees, seats remaining, baggage details, refundable type, cabin class, and meal indicator for each fare type (adult, child, and infant). | Object |
| id | priceDetail | A unique ID for the fare. | String |
| totalFare | priceDetail | The total fare for the flight. | Number |
| netFare | priceDetail | The net fare for the flight. | Number |
| totalBaseFare | priceDetail | The base fare for the flight. | Number |
| totalTaxesAndFees | priceDetail | The total taxes and fees for the flight. | Number |
| managementFees | priceDetail | Breakup of management fees for the flight. | Object |
| managementFees | managementFees | The management fees for the flight | Number |
| gstOnManagementFees | managementFees | The GST on management fees for the flight | Number |
| totalManagementFees | managementFees | Management Fees + GST on management fees | Number |
| commission | priceDetail | Breakup of commission for the flight. | Object |
| grossCommission | commission | The gross commission for the flight | Number |
| tdsOnCommission | commission | The TDS deducted on gross commission for the flight | Number |
| netCommission | commission | The net commission after TDS deduction for the flight | Number |
| fareDescription | priceDetail | An object containing fare details for different passenger types (adult, child and infant). | Object |
| adult | priceDetail.fareDescription | An object containing fare details for an adult passenger. | Object |
| fareComponent | priceDetail.fareDescription.adult | An object containing the net, base, taxes and fees, and total fares for the adult passenger. | Object |
| taxesAndFees | priceDetail.fareDescription.adult | An array of objects containing the names and values of taxes and fees for the adult passenger. | Object |
| commission | priceDetail.fareDescription.adult | An array of objects containing the names and values of commission breakdown for the adult passenger. | Object |
| seatsRemaining | priceDetail.fareDescription.adult | The number of remaining seats available for adult passengers. | Number |
| baggage | priceDetail.fareDescription.adult |
An object that contains the baggage
details for adult passengers: checkIn: The check-in baggage limit for adult passengers. cabin: The cabin baggage limit for adult passengers. |
Object |
| refundableType | priceDetail .fareDescription.adult. | The refundable type of the fare for adult passengers. | RefundableEnum |
| cabinClass | priceDetail .fareDescription.adult. | The cabin class of the fare for adult passengers. | CabinClassEnum |
| fareClass | priceDetail .fareDescription.adult. | The fare class of the adult passengers. | String |
| mealIndicator | priceDetail .fareDescription.adult. | A boolean flag indicating if meal is included in the fare for adult passengers. | Boolean |
| child | priceDetail .fareDescription | An object containing fare details for a child passenger | Object |
| fareComponent | priceDetail .fareDescription.child | An object containing the net, base, taxes and fees, and total fares for the child passenger | Object |
| taxesAndFees | priceDetail .fareDescription.child | An array of objects containing the names and values of taxes and fees for the child passenger | Object |
| commission | priceDetail.fareDescription.child | An array of objects containing the names and values of commission breakdown for the child passenger. | Object |
| seatsRemaining | priceDetail .fareDescription.child | The number of remaining seats available for child passengers | Number |
| baggage | priceDetail .fareDescription.child | An object that contains the baggage details for adult passengers. checkIn: The check-in baggage limit for adult passengers. cabin: The cabin baggage limit for adult passengers. | Object |
| refundableType | priceDetail .fareDescription.child | The refundable type of the fare for child passengers. | RefundableEnum |
| cabinClass | priceDetail .fareDescription.child | The cabin class of the fare for child passengers. | CabinClassEnum |
| fareClass | priceDetail .fareDescription.child | The Fare class of the child passengers. | String |
| mealIndicator | priceDetail .fareDescription.child | A boolean flag indicating if meal is included in the fare for child passengers | Boolean |
| infant | priceDetail .fareDescription | An object containing fare details for a infant passenger | Object |
| fareComponent | priceDetail .fareDescription.infant | An object containing the net, base, taxes and fees, and total fares for the infant passenger | Object |
| taxesAndFees | priceDetail .fareDescription.infant | An array of objects containing the names and values of taxes and fees for the infant passenger | Object |
| commission | priceDetail.fareDescription.infant | An array of objects containing the names and values of commission breakdown for the infant passenger. | Object |
| seatsRemaining | priceDetail .fareDescription.infant | The number of remaining seats available for infant passengers | Number |
| baggage | priceDetail .fareDescription.infant | An object that contains the baggage details for adult passengers. checkIn: The check-in baggage limit for adult passengers. cabin: The cabin baggage limit for adult passengers. | Object |
| refundableType | priceDetail .fareDescription.infant | The refundable type of the fare for infant passengers. | RefundableEnum |
| cabinClass | priceDetail .fareDescription.infant | The cabin class of the fare for infant passengers. | CabinClassEnum |
| fareClass | priceDetail .fareDescription.infant | The Fare class of the infant passengers. | String |
| mealIndicator | priceDetail .fareDescription.infant | A boolean flag indicating if meal is included in the fare for infant passengers | Boolean |
| segments | root | Details of each flight segment in the itinerary | Array |
| flight | segments | Information about the airline operating the flight | Object |
| name | segments.flight | Name of the airline | String |
| code | segments.flight | Two-letter code of the airline | String |
| Number | segments.flight | Flight number | String |
| duration | segments | Total duration of the flight segment in minutes | Number |
| layoverDuration | segments | Duration of any layover in minutes | Number |
| stops | segments | Number of stops in the flight segment | Number |
| stopsOverAirports | segments | Array of airports where the flight stops | Array of Objects |
| code | segments.stopsOverAirports | Three-letter code of the airport | String |
| name | segments.stopsOverAirports | Name of the airport | String |
| city | segments.stopsOverAirports | City where the airport is located | String |
| cityCode | segments.stopsOverAirports | Two-letter code of the city | String |
| country | segments.stopsOverAirports | Country where the airport is located | String |
| countryCode | segments.stopsOverAirports | Two-letter code of the country | String |
| terminal | segments.stopsOverAirports | Terminal where the flight stops | String |
| arrival | segments | Details of the arrival airport | Object |
| date | segments.arrival | Date of arrival in YYYYMMDD format | String |
| time | segments.arrival | Time of arrival in HHMMSS format | String |
| airport | segments.arrival | Details of the arrival airport | Object |
| code | segments.arrival.airport | Three-letter code of the airport | String |
| name | segments.arrival.airport | Name of the airport | String |
| city | segments.arrival.airport | City where the airport is located | String |
| cityCode | segments.arrival.airport | Two-letter code of the city | String |
| country | segments.arrival.airport | Country where the airport is located | String |
| countryCode | segments.arrival.airport | Two-letter code of the country | String |
| terminal | segments.arrival.airport | Terminal where the flight arrives | String |
| departure | segments | Details of the departure airport. | Object |
| date | segments.departure | Date of departure in YYYYMMDD format | String |
| time | segments.departure | Time of departure in HHMMSS format | String |
| airport | segments.departure | Details of the departure airport | Object |
| code | segments.departure.airport | Three-letter code of the airport | String |
| name | segments.departure.airport | Name of the airport | String |
| city | segments.departure.airport | City where the airport is located | String |
| cityCode | segments.departure.airport | Two-letter code of the city | String |
| country | segments.departure.airport | Country where the airport is located | String |
| countryCode | segments.departure.airport | Two-letter code of the country | String |
| terminal | segments.departure.airport | Terminal where the flight departs | String |
| operatingAirline | segments | Information about the airline operating the flight (if different from the marketing airline) | Object |
| status | root | The current status of the booking | BookingStatusEnum |
Enums
BookingStatusEnum
Status of booking returned in book and get booking details API
| Value | Description |
|---|---|
| INITIATED | Booking Created, Passenger Details added and Price fixed but Not Yet booked |
| CONFIRMED | Booking Confirmed and Payment Deducted |
| AWAITING_PNR | Booking Done but PNR not yet release. You can contact agent for PNR, also you will be mailed when the PNR is added |
| FAILED | Booking failed |
| CANCELLED | Booking Cancelled (through Amendment) |
| ABORTED | Booking INITIATED but then not booked, but ABORTED by the ADMIN / USER |
CabinClassEnum
Cabin class passed in the search flights request and returned for each fare in search, review and booking responses
| Value | Description |
|---|---|
| ECONOMY | Standard economy cabin |
| PREMIUM_ECONOMY | Premium economy cabin, with more space and service than economy |
| BUSINESS | Business class cabin |
| FIRST | First class cabin |
| PRIVATE | Private cabin, offered only by some airlines and fare suppliers |
RefundableEnum
Refund policy of a fare, returned as refundableType for each fare in search, review and booking responses
| Value | Description |
|---|---|
| REFUNDABLE | The fare is refunded on cancellation, minus the cancellation charges in the fare rules |
| NON_REFUNDABLE | The fare is not refunded on cancellation |
| PARTIAL_REFUNDABLE | Only part of the fare is refunded on cancellation. Check the fare rules for the amount |
PassengerTitleEnum
| Value | Description |
|---|---|
| Mr | Adult Male |
| Mrs | Married Female |
| Ms | Unmarried Female |
| Master | Child or Infant Male |
FareSearchPnrFilterEnum
| Value | Description |
|---|---|
| ALL | All flight will be searched. This is the default behavior |
| INSTANT_PNR | Flights with PNR available on book will be searched |
FAQs
Where should I put the credentials?
You should put the credentials in the header of the request. The credentials are as follows: There are two types of credentials:
- X-API-KEY: The API key is used to authenticate the API request. To be passed in header in every request
- X-API-SECRET: The API secret is used to create more security for the API request. To be passed in header in every request
Contact Details
Travel Companion
Bookings, payments and account queries
- sales@travelcompanion.co
- Phone
- 9055500022
- Website
- agents.travelcompanion.co
Technical Support
API integration and technical issues
- Naveed Maqbool naveed@codeus.in
- Aadil Shabir aadil@codeus.in