Skip to main content

Multi-planning booking

If you offer your users to have different journeys for some or all of the travellers within the same booking, this is how it should be handled! 👀

What is multi-planning trips?

In rare situations, you may be confronted with travellers willing to book their outbound trip together but have to return on different dates. This is what we call "multi-planning trips".

For instance, if for a 2-person trip between Barcelona and Lisbon, one traveller is due to return on the 24th and the other on the 26th, you will be able to create a single contract with Koala by following the steps below.

How can you create a multi-planning trip?

Step 1: Make one quote by different journey plans

You will need to do one Quote for each unique flight plan.

For example, a booking of 2 travellers (Person A and Person B) has a journey starting on the 12th of January for Person A and B but a return on the 24th for Person A and the 26th for Person B, you should do a quote for all the journeys of Person A and another quote for a Person B. If we take another example with travelers A, B, C with A and C taking the same flights, and B taking another return flight, then you should quote 2 times as well: one with A and C, the other one with B.

curl -X POST "https://staging-partner.api.hikoala.co/quotes" -H "Content-Type: application/JSON" -H "accept: application/JSON" -H "Authorization: Bearer <token>"

With travelers A and B the same departure journey but with a different return, you should do as follows:

Traveler A:

{
"data": {
"currency": "EUR",
"trips": [
{
"price": {
"amount": 590.97,
"currency": "EUR"
},
"journeys": [
{
"flights": [
{
"airlineIata": "AF",
"number": "66",
"departureAirportIata": "CDG",
"arrivalAirportIata": "LAX",
"departureDate": "2022-07-12T09:50:00+02:00",
"arrivalDate": "2022-07-12T12:50:00-07:00"
}
]
},
{
"flights": [
{
"airlineIata": "AF",
"number": "65",
"departureAirportIata": "LAX",
"arrivalAirportIata": "CDG",
"departureDate": "2022-07-24T09:50:00-07:00",
"arrivalDate": "2022-07-24T18:50:00+02:00"
}
]
}
],
"travelers": [
{
"ageRange": "ADULT"
}
]
}
]
}
}

Traveler B:

{
"data": {
"currency": "EUR",
"trips": [
{
"price": {
"amount": 590.97,
"currency": "EUR"
},
"journeys": [
{
"flights": [
{
"airlineIata": "AF",
"number": "66",
"departureAirportIata": "CDG",
"arrivalAirportIata": "LAX",
"departureDate": "2022-07-12T09:50:00+02:00",
"arrivalDate": "2021-07-12T12:50:00-07:00"
}
]
},
{
"flights": [
{
"airlineIata": "AF",
"number": "65",
"departureAirportIata": "LAX",
"arrivalAirportIata": "CDG",
"departureDate": "2022-07-26T09:50:00-07:00",
"arrivalDate": "2022-07-26T18:50:00+02:00"
}
]
}
],
"travelers": [
{
"ageRange": "ADULT"
}
]
}
]
}
}

Please store each id you received in the responses, you will need it for Step 2.

Step 2: Create the contract

Once you have completed Step 1, you will need to make one unique Subscription call containing all the id obtained in step 1.

You will need to be careful on the traveler information details attached to each journey to declare the right travellers.

curl -X POST "https://staging-partner.api.hikoala.co/subscriptions" -H "Content-Type: application/JSON" -H "accept: application/JSON" -H "Authorization: Bearer <token>"

To create the contract for these 2 quotes in our example above, you would do the following query:

{
"data": {
"bookingNumber": "5K7SXD",
"quotes": [
{
"reference": "<QUOTE_REFERENCE>",
"travelers": [
{
"ageRange": "ADULT",
"birthdate": "1968-06-09",
"firstName": "Traveler",
"lastName": "A"
}
]
},
{
"reference": "<QUOTE_REFERENCE>",
"travelers": [
{
"ageRange": "ADULT",
"birthdate": "1972-03-05",
"firstName": "Traveler",
"lastName": "B"
}
]
}
],
"client": {
"email": "traveler.A@gmail.com",
"firstname": "Traveler",
"lastname": "A"
}
}
}

Possible outputs

Our API can send you back the following responses:

  • 201: The Subscription is valid and the contract is successfully created. The travelers are now covered by Koala 🐨
  • 400: The Subscription is invalid. You may have forgotten one mandatory field or made a mistake with one format.
  • 401: The Subscription cannot be created because you are experimenting an issue with your token.
  • 409: The Subscription cannot be created because the booking number or the quote reference you used has already been sent to us.