trip-purpose-prediction
Returns the forecast purpose of a trip
get/travel/predictions/trip-purpose
Request
- Base URLhttps://test.api.amadeus.com/v1
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
originLocationCodestring required
city/airport IATA code from which the traveler will depart, e.g. BOS for Boston
destinationLocationCodestring required
city/airport IATA code to which the traveler is going, e.g. PAR for Paris
departureDatestring required
the date on which the traveler will depart from the origin to go to the destination. Dates are specified in the ISO 8601 YYYY-MM-DD format, e.g. 2017-12-25
returnDatestring required
the date on which the traveler will depart from the destination to return to the origin. Dates are specified in the ISO 8601 YYYY-MM-DD format, e.g. 2018-02-28
searchDatestring
the date on which the traveler is performing the search. If this parameter is not specified, current date will be used. Dates are specified in the ISO 8601 YYYY-MM-DD format, e.g. 2018-02-28
Response
Success
Example response
{
"data": {
"id": "NYCMAD20231201",
"probability": "0.9995216",
"result": "LEISURE",
"subType": "trip-purpose",
"type": "prediction"
},
"meta": {
"defaults": {
"searchDate": "2023-01-12"
},
"links": {
"self": "https://test.api.amadeus.com/v1/travel/predictions/trip-purpose?originLocationCode=NYC&destinationLocationCode=MAD&departureDate=2023-12-01&returnDate=2023-12-12&searchDate=2023-01-12"
}
}
}Changes
No recorded changes to this operation across all 3 revisions of this API.