Post Specific Search
Request up-to-date price information of a specific train journey.
Request
Query parameters
| Name | Type | Description |
|---|---|---|
| from required | string | Code of departure train station or airport |
| ||
| to required | string | Code of arrival train station or airport |
| ||
| date required | string | Departure date in YYYY-MM-DD format, pattern: /^\d{4}-\d{2}-\d{2}$/ |
| departure | enum | Part of the day to depart inOne of:morning, afternoon, evening, night |
| return_date | string | Optional departure date of the return journey in YYYY-MM-DD format, pattern: /^\d{4}-\d{2}-\d{2}$/ |
| return_departure | enum | Optional part of the day, for the return journey, to depart inOne of:morning, afternoon, evening, night |
| pax required | string | Number of adult passengers and children (between parentheses), pattern: /^\d\(\d\)$/ |
| ||
JSON payload
This object should contain those details that will narrow the search to one specific journey.
At least one train or plane must be specified.
| Property path | Type | Description |
|---|---|---|
| planes | string[] | List of flight numbers |
Example: ["KL-204"] | ||
| time | string | Near exact time of departure in 24-hour hh:mm format |
Example: "08:55" | ||
| trains | string[] | List of train numbers |
Example: ["ICE-140"] | ||
| transfers | string[] | Optional list of train station and/or airport codes |
| pricePoint | string | Optional monetary amount the ticket prices should be close to |
Example: "72.50" | ||
Responses
-
Successful response with specific offer
Body
Property path Type Description ids string[]UUIDs identifying the itinerary segments
→ origin objectLocation of departure
origin.country stringUK English name of the country the location is in
origin.iataCode stringOptional IATA city code
origin.id stringGeohash of the location
origin.metroCode optional stringIf applicable, optional IATA code of the metropolis the city is in, pattern: /^[A-Z]{3}$/origin.name stringCommon name of the location in English
→ destination objectLocation of arrival
destination.country stringUK English name of the country the location is in
destination.iataCode stringOptional IATA city code
destination.id stringGeohash of the location
destination.metroCode optional stringIf applicable, optional IATA code of the metropolis the city is in, pattern: /^[A-Z]{3}$/destination.name stringCommon name of the location in English
→ itinerary objectItinerary of the outbound travel segments
→ itinerary.departure objectDetails of the event of departure
itinerary.departure.date stringISO-8601 date and time of departure, pattern: /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+\-]\d{2}:\d{2}$/itinerary.departure.tz string→ itinerary.departure.station objectTrain station, mutually exclusive with
airport….departure.station.code stringMost relevant code used to designate this train station
….departure.station.name stringName of the train station in English
….departure.station.city stringCommon name, in English, of the city the train station is located in
….departure.station.country stringUK English name of the train station the location is in
→ itinerary.departure.airport objectAirport, mutually exclusive with
station….departure.airport.code stringMost relevant code used to designate this airport
….departure.airport.name stringName of the airport in English
….departure.airport.metroCode optional stringIf applicable, optional IATA code of the metropolis the airport is in, pattern: /^[A-Z]{3}$/….departure.airport.city stringCommon name, in English, of the city the airport is located in
….departure.airport.country stringUK English name of the country the airport is in
→ itinerary.arrival objectDetails of the event of arrival
itinerary.arrival.date stringISO-8601 date and time of departure, pattern: /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+\-]\d{2}:\d{2}$/itinerary.arrival.tz string→ itinerary.arrival.station objectTrain station, mutually exclusive with
airport….arrival.station.code stringMost relevant code used to designate this train station
….arrival.station.name stringName of the train station in English
….arrival.station.city stringCommon name, in English, of the city the train station is located in
….arrival.station.country stringUK English name of the train station the location is in
→ itinerary.arrival.airport objectAirport, mutually exclusive with
station….arrival.airport.code stringMost relevant code used to designate this airport
….arrival.airport.name stringName of the airport in English
….arrival.airport.metroCode optional stringIf applicable, optional IATA code of the metropolis the airport is in, pattern: /^[A-Z]{3}$/….arrival.airport.city stringCommon name, in English, of the city the airport is located in
….arrival.airport.country stringUK English name of the country the airport is in
→ returnItinerary optional objectOptional itinerary of the inbound trip segments
→ returnItinerary.departure objectDetails of the event of departure
….departure.date stringISO-8601 date and time of departure, pattern: /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+\-]\d{2}:\d{2}$/….departure.tz string→ ….departure.station objectTrain station, mutually exclusive with
airport….departure.station.code stringMost relevant code used to designate this train station
….departure.station.name stringName of the train station in English
….departure.station.city stringCommon name, in English, of the city the train station is located in
….departure.station.country stringUK English name of the train station the location is in
→ ….departure.airport objectAirport, mutually exclusive with
station….departure.airport.code stringMost relevant code used to designate this airport
….departure.airport.name stringName of the airport in English
….departure.airport.metroCode optional stringIf applicable, optional IATA code of the metropolis the airport is in, pattern: /^[A-Z]{3}$/….departure.airport.city stringCommon name, in English, of the city the airport is located in
….departure.airport.country stringUK English name of the country the airport is in
→ returnItinerary.arrival objectDetails of the event of arrival
….arrival.date stringISO-8601 date and time of departure, pattern: /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+\-]\d{2}:\d{2}$/….arrival.tz string→ ….arrival.station objectTrain station, mutually exclusive with
airport….arrival.station.code stringMost relevant code used to designate this train station
….arrival.station.name stringName of the train station in English
….arrival.station.city stringCommon name, in English, of the city the train station is located in
….arrival.station.country stringUK English name of the train station the location is in
→ ….arrival.airport objectAirport, mutually exclusive with
station….arrival.airport.code stringMost relevant code used to designate this airport
….arrival.airport.name stringName of the airport in English
….arrival.airport.metroCode optional stringIf applicable, optional IATA code of the metropolis the airport is in, pattern: /^[A-Z]{3}$/….arrival.airport.city stringCommon name, in English, of the city the airport is located in
….arrival.airport.country stringUK English name of the country the airport is in
→ priceTiers objectOfferings in various price categories
→ priceTiers.budget optional objectOptional budget offer price
priceTiers.budget.currency optional "EUR"priceTiers.budget.total optional stringTotal all-in price, pattern: /^\d+\.\d{2,4}$/→ priceTiers.budget.structure optional arrayDetails about the price structure
….budget.structure[].label string….budget.structure[].relative stringOptional relative adjustment
….budget.structure[].absolute stringOptional absolute adjustment, pattern: /^\d+\.\d{2,4}$/….budget.structure[].over optional integerOptional index of the amount this is an adjustment over
….budget.structure[].change stringAbsolute amount this adjustment changes the price by, pattern: /^\d+\.\d{2,4}$/….budget.structure[].subtotal stringNew subtotal after applying this adjustment, pattern: /^\d+\.\d{2,4}$/→ priceTiers.standard objectStandard price
priceTiers.standard.currency optional "EUR"priceTiers.standard.total optional stringTotal all-in price, pattern: /^\d+\.\d{2,4}$/→ priceTiers.standard.structure optional arrayDetails about the price structure
….standard.structure[].label string….standard.structure[].relative stringOptional relative adjustment
….standard.structure[].absolute stringOptional absolute adjustment, pattern: /^\d+\.\d{2,4}$/….standard.structure[].over optional integerOptional index of the amount this is an adjustment over
….standard.structure[].change stringAbsolute amount this adjustment changes the price by, pattern: /^\d+\.\d{2,4}$/….standard.structure[].subtotal stringNew subtotal after applying this adjustment, pattern: /^\d+\.\d{2,4}$/→ priceTiers.premium optional objectOptional premium offer price
priceTiers.premium.currency optional "EUR"priceTiers.premium.total optional stringTotal all-in price, pattern: /^\d+\.\d{2,4}$/→ priceTiers.premium.structure optional arrayDetails about the price structure
….premium.structure[].label string….premium.structure[].relative stringOptional relative adjustment
….premium.structure[].absolute stringOptional absolute adjustment, pattern: /^\d+\.\d{2,4}$/….premium.structure[].over optional integerOptional index of the amount this is an adjustment over
….premium.structure[].change stringAbsolute amount this adjustment changes the price by, pattern: /^\d+\.\d{2,4}$/….premium.structure[].subtotal stringNew subtotal after applying this adjustment, pattern: /^\d+\.\d{2,4}$/ -
Bad request due to invalid query parameters or request payload.
A non-unique result will also cause a 400.Body
Property path Type Description error objecterror.description optional stringOptional longer explanation describing the error.
error.message stringConcise error message.
error.reason optional stringOptional underlying reason that caused the error to happen.
Empty trains and planes
{ "error": { "message": "Please specify trains and/or planes", "description": "To search for offers at least one train or plane needs to be specified." } }Ambiguous result
{ "error": { "message": "Non-unique search result", "description": "The search query resulted in more than one offer being found.", "reason": "Search criteria are not specific enough." } } -
Unauthorized due to invalid or missing authentication token
Headers
Name Description WWW-Authenticate Required authentication method
Example: Basic realm="/calendar"; charset="UTF-8"Body
Property path Type Description error objecterror.description optional stringOptional longer explanation describing the error.
error.message stringConcise error message.
error.reason optional stringOptional underlying reason that caused the error to happen.
Example
WWW-Authenticate: Basic realm="/calendar"; charset="UTF-8"{ "error": { "message": "Authorization required", "description": "Price calendar endpoint is for authorized consumers only.", "reason": "Unable to find authentication token in request" } } -
No matching offer could be found
Body
Property path Type Description error objecterror.description optional stringOptional longer explanation describing the error.
error.message stringConcise error message.
error.reason optional stringOptional underlying reason that caused the error to happen.
Example
{ "error": { "message": "Offer not found", "description": "The search query did not return any matching offers.", "reason": "Search criteria may be too restrictive." } }