Best fares, easy and straightforward integration
Designed with for developers
On this page you'll learn how to create bookings. Bookings created via Create Booking are only saved in our database and no further action is taken. This allows you to verify the returned response.
You will have to Issue the booking, which will create reservations, make payments and ticket the reservations all at once.
Creating a booking is done in two steps:
You will have to POST a JSON object like the example below. Please keep reading for full reference.
Please note that some fields may or may not be required depending on the policy of each individual airline.
Please refer to
Flights
for additional information.
Each individual flight will contain the passengerFields and bookerFields
fields which will let you know whether a field is required or not for that particular flight.
{ "flights":{ "residents":{ "adults":1 }, "flightId":6 }, "booking":{ "booker":{ "title":1, "firstName":"John", "lastName":"Wick", "email":"john.wick@flight.co.tz", "nationality":33 "phone":{ "phoneCode":33, # This is a Country ID "phoneNumber":"12345789" }, }, "passengers":[ { "type":1, "title":1, "firstName":"John", "lastName":"Wick", "email":"john.wick@flight.co.tz", "nationality":207, "phone":{ "phoneCode":33, # This is a Country ID "phoneNumber":"12345789" }, "birthDate":{ # 3rd of March 1981 "year":"1981", # 4 digit year "month":"3", # Note: no leading zeros "day":"3" # Note: no leading zeros }, "passport":{ "number":"1234", "expiry":{ "year":"2040", "month":"3", "day":"3" }, "issuer":33, "issueDate":{ "year":"2013", "month":"3", "day":"3" } }, "nationalId":{ "number":"1234", "expiry":{ "year":"2040", "month":"3", "day":"3" }, "issuer":33, "issueDate":{ "year":"2013", "month":"3", "day":"3" } }, "placeOfBirth":"Vidin" } ] } }
Upon successful booking, you will get an HTTP 201 CREATED status code with a Location header pointing to the correct Get Booking URL for this booking.
The Response body will contain exactly the same content as returned by Get Booking
Under the flights key you will have to provide information about the flight(s) and passenger counts by their type and residency.
flightId | Mandatory | Departure Flight ID see Search |
returnFlightId | Mandatory |
Return Flight ID
see
Search
Can't be the same as flightId |
residents | Optional | Residents See Passenger Counts below |
nonResidents | Optional | Residents See Passenger Counts below |
adults | Optional | Adults |
children | Optional | Children |
infants | Optional | Infants |
The minimal data required for an adult traveling one way would be the flightId and 1 adult passenger (either resident or non-resident, depending on whether you know their nationality beforehand or your business logic)
Please note that upon passenger data submission, passenger residency may change on a per-carrier basis.
This means that a passenger may or may not be eligible for a resident (cheaper) fare.
This is done automatically. You can compare our computed price upon creating a booking with yours.
Sometimes, if a fare is no longer available, you may get a higher price. This can also happen if a passenger is not eligible for a resident fare.
You may also get a cheaper price for your passengers if any of them is eligible for a resident fare, but you submitted them as non-residents.
Please look at
Issue Booking
for additional information.
In case there's a cheaper fare found for a passenger, it will automatically be booked for them.
If, however, the price has gone up due to a fare no longer available or a passenger not eligible for a resident fare, then you'll get an error.
Please refer to Issue Booking for additional information on how to handle that.
Under the booker key you will have to provide information about the person that creates the reservation. They do not have to be necessarily flying.
title | Mandatory | Title ID. Please refer to Static Data for additional information. |
firstName | Mandatory | First Name |
lastName | Mandatory | Last Name |
Mandatory | A valid email is required | |
nationality | Optional |
This value represents a Country. There are three options for submitting data to this field.
|
phone | Optional | Please refer to Common Fields - Phone |
Passengers are represented by an array of objects. Each object consists of the following fields
type | Mandatory | Passenger Type ID. Please refer to Static Data for additional information. |
title | Mandatory | Title ID. Please refer to Static Data for additional information. |
firstName | Mandatory | First Name |
lastName | Mandatory | Last Name |
Mandatory | A valid email is required for ADULTS only | |
nationality | Optional |
This value represents a Country. There are three options for submitting data to this field.
|
phone | Optional | Please refer to Common Fields - Phone |
birthDate | Optional | Please refer to Common Fields - Date |
passport | Optional | Passport information. Please refer to Common Fields - Document |
nationalId | Optional | National ID information. Please refer to Common Fields - Document |
placeOfBirth | Optional | Place of birth. String. Free-text submitted by the passenger. |
"phone":{ # In this case, Tanzania. # Can be: # 1. integer 207 # 2. two letter code string "TZ" # 3. or phone code string with a leading plus sign "+255" "phoneCode":207, "phoneNumber":"12345789" }
phoneCode | Mandatory |
This value represents a Country. There are three options for submitting data to this field.
|
phoneNumber | Mandatory | The phoneNumber field is the phone number withOUT the country code. |
"birthDate":{ # 3rd of March 1981 "year":"1981", # 4 digit year "month":"3", # Note: no leading zeros "day":"3" # Note: no leading zeros }
year | Mandatory | 4-digit Year |
month | Mandatory | Month, no leading zeros, starting from 1 |
day | Mandatory | Day, no leading zeros, starting from 1 |
"passport":{ "number":"1234", "expiry":{ "year":"2040", "month":"3", "day":"3" }, # In this case, Tanzania. # Can be: # 1. integer 207 # 2. two letter code string "TZ" # 3. or phone code string with a leading plus sign "+255" "issuer":207, "issueDate":{ "year":"2013", "month":"3", "day":"3" } }
number | Mandatory | Passenger document number |
expiry | Mandatory | Document expiry date. Please refer to Date above. |
issuer | Mandatory |
This value represents a Country. There are three options for submitting data to this field.
|
issueDate | Mandatory | Document issue date. Please refer to Date above. |