Travel
Last update: January 24, 2024
What is considered a travel item?
A complete travel is an item. This means that if you take a 10 day trip with 4 different places, it is considered as the same travel. The content of the purchase.item_list.quantity field must be 1 and the content of the purchase.item_list.price field is the price of the entire trip.
How to manage this object for a family trip?
The number_of_travelers field, in journey object (content of the travel object), allows you to process the same trip for several people.
How should we describe a trip with stopover included?
Each journey includes only the main departure and arrival of the flight. If a Paris-Moscow flight passes through Amsterdam, Amsterdam is a stopover and should not be considered a transition.
Examples (API V1)
Find 3 examples below to help you understand better.
- A customer buys 2 tickets. A round-trip ticket from Paris to New-York for 250€ and another from Lille to London for 150€. We has 2 travels/items, each
travelhas 2journey: one outward and one return.
{
"purchase_amount": 2650,
"number_of_items": 2,
"item_list": [
{
"is_main_item": 1,
"category_code": 14,
"label": "A/R Paris - NewYork",
"item_external_code": "189",
"quantity": 1,
"price": 2500.0,
"travel": {
"main_traveler_surname": "Nelson",
"main_traveler_firstname": "Dupond",
"main_traveler_birthdate": "1987-08-28",
"journey": [
{
"number_of_travelers": 1,
"journey_number": "O",
"journey_date": "2018-12-01",
"departure_city": "Paris",
"arrival_city": "New York",
"ticket_category": "First class",
"exchangeability_flag": 1,
"travel_insurance_flag": 1,
"mean_of_transport_code": 1
},
{
"number_of_travelers": 1,
"journey_number": "R",
"journey_date": "2018-12-06",
"departure_city": "New York",
"arrival_city": "Paris",
"ticket_category": "First class",
"exchangeability_flag": 1,
"travel_insurance_flag": 1,
"mean_of_transport_code": 1
}
]
}
},
{
"is_main_item": 0,
"category_code": 14,
"label": "A/R Lille - Londres",
"item_external_code": "190",
"quantity": 1,
"price": 150.0,
"travel": {
"main_traveler_surname": "Nils",
"main_traveler_firstname": "Brenkman",
"main_traveler_birthdate": "1976-07-16",
"journey": [
{
"number_of_travelers": 1,
"journey_number": "O",
"journey_date": "2019-01-01",
"departure_city": "Lille",
"arrival_city": "Londres",
"ticket_category": "First class",
"exchangeability_flag": 1,
"travel_insurance_flag": 1,
"mean_of_transport_code": 2
},
{
"number_of_travelers": 1,
"journey_number": "R",
"journey_date": "2019-01-10",
"departure_city": "Londres",
"arrival_city": "Lille",
"ticket_category": "First class",
"exchangeability_flag": 1,
"travel_insurance_flag": 1,
"mean_of_transport_code": 2
}
]
}
}
]
}
- A family of 4 people (2 adults and 2 children) wants to travel from Paris to New York then go to San Francisco and come back to Paris. During their trip, they will stay in a hotel in New York for a few days and then travel to San Francisco by bus to stay in rendal accomodation. We have 1
travelitem. The complete trip consists of 3journeyand 2stay.- Journeys are:
- Paris-New York by plane
- New York-San Francisco by bus
- San Francisco-Paris by plane
- Stays are:
- Hotel in New York
- Rended accomodation in San Franscico
- Journeys are:
{
"purchase_amount": 2300,
"number_of_items": 1,
"item_list": [
{
"is_main_item": 1,
"category_code": 14,
"label": "A/R Paris - NewYork",
"item_external_code": "189",
"quantity": 1,
"price": 2300.0,
"travel": {
"main_traveler_surname": "Nils",
"main_traveler_firstname": "Brenkman",
"main_traveler_birthdate": "1976-07-16",
"journey": [
{
"number_of_travelers": 4,
"journey_number": "O",
"journey_date": "2018-12-01",
"departure_city": "Paris",
"arrival_city": "New York",
"ticket_category": "First class",
"exchangeability_flag": 1,
"travel_insurance_flag": 1,
"mean_of_transport_code": 1
},
{
"number_of_travelers": 4,
"journey_number": "T1",
"journey_date": "2018-12-06",
"departure_city": "New York",
"arrival_city": "San Francisco",
"ticket_category": "First class",
"exchangeability_flag": 1,
"travel_insurance_flag": 1,
"mean_of_transport_code": 3
},
{
"number_of_travelers": 4,
"journey_number": "R",
"journey_date": "2018-12-12",
"departure_city": "San Francisco",
"arrival_city": "Paris",
"ticket_category": "First class",
"exchangeability_flag": 1,
"travel_insurance_flag": 1,
"mean_of_transport_code": 1
}
],
"stay": [
{
"number_of_travelers": 4,
"place_of_residence": "Hotel central of New-York",
"number_of_rooms": 2,
"arrival_date": "2018-12-01",
"departure_date": "2018-12-06",
"vehicle_rental_flag": 1,
"stay_insurance_flag": 0,
"stay_type_code": 1
},
{
"number_of_travelers": 4,
"place_of_residence": "Air Bnb - The big palm tree - San Francisco",
"arrival_date": "2018-12-07",
"departure_date": "2018-12-12",
"vehicle_rental_flag": 0,
"stay_insurance_flag": 0,
"stay_type_code": 2
}
]
}
}
]
}
- The client needs to organize a long trip with several destinations, flights, trains and accomodations.
Consequently, we have, in 1travelobject, as many elements divided into 2 objects:trip- destinations, flights and trainsstay- accomodations
Find below an example.
{
"number_of_items": 1,
"purchase_amount": 4000,
"item_list": [
{
"category_code": 14,
"is_main_item": 1,
"label": "Vol et excursion",
"item_external_code": "189",
"quantity": 1,
"price": 4000.0,
"travel": {
"main_traveler_surname": "Nils",
"main_traveler_firstname": "Brenkman",
"main_traveler_birthdate": "1976-07-16",
"journey": [
{
"number_of_travelers": 1,
"journey_number": "O",
"journey_date": "2018-12-01",
"departure_city": "LILLE",
"arrival_city": "PARIS",
"ticket_category": "First class",
"exchangeability_flag": 1,
"travel_insurance_flag": 1,
"mean_of_transport_code": 2
},
{
"number_of_travelers": 1,
"journey_number": "T1",
"journey_date": "2018-12-02",
"departure_city": "PARIS",
"arrival_city": "MARNE LA VALLEE",
"ticket_category": "0",
"exchangeability_flag": 1,
"travel_insurance_flag": 1,
"mean_of_transport_code": 2
},
{
"number_of_travelers": 1,
"journey_number": "T2",
"journey_date": "2018-12-02",
"departure_city": " MARNE LA VALLEE ",
"arrival_city": "PARIS",
"ticket_category": 0,
"exchangeability_flag": 1,
"travel_insurance_flag": 1,
"mean_of_transport_code": 2
},
{
"number_of_travelers": 1,
"journey_number": "T3",
"journey_date": "2018-12-06",
"departure_city": " PARIS ",
"arrival_city": "NEWYORK",
"ticket_category": 0,
"exchangeability_flag": 1,
"travel_insurance_flag": 1,
"mean_of_transport_code": 1
},
{
"number_of_travelers": 1,
"journey_number": "T4",
"journey_date": "2018-12-08",
"departure_city": " NEWYORK ",
"arrival_city": " Manhattan ",
"ticket_category": 0,
"exchangeability_flag": 1,
"travel_insurance_flag": 1,
"mean_of_transport_code": 2
},
{
"number_of_travelers": 1,
"journey_number": "T5",
"journey_date": "2018-12-09",
"departure_city": "Manhattan ",
"arrival_city": " NEWYORK ",
"ticket_category": 0,
"exchangeability_flag": 1,
"travel_insurance_flag": 1,
"mean_of_transport_code": 2
},
{
"number_of_travelers": 1,
"journey_number": "R",
"journey_date": "2018-12-12",
"departure_city": " NEWYORK ",
"arrival_city": " PARIS ",
"ticket_category": "economic",
"exchangeability_flag": 1,
"travel_insurance_flag": 1,
"mean_of_transport_code": 1
}
],
"stay": [
{
"number_of_travelers": 1,
"place_of_residence": "Hotel of Paris",
"number_of_rooms": 2,
"arrival_date": "2018-12-02",
"departure_date": "2018-12-06",
"vehicle_rental_flag": 1,
"stay_insurance_flag": 0,
"stay_type_code": 1
},
{
"number_of_travelers": 1,
"place_of_residence": "Air Bnb - Manathan",
"arrival_date": "2018-12-09",
"departure_date": "2018-12-12",
"vehicle_rental_flag": 0,
"stay_insurance_flag": 0,
"stay_type_code": 2
}
]
}
}
]
}