# Get user travel preferences Endpoint: GET /v2/users/{userId}/travel-preferences Version: v2 Security: Bearer ## Path parameters: - `userId` (string, required) Identifier for user. Example: "4974a66b-7493-4f41-908c-58ba81093947" ## Response 200 fields (application/json): - `preferences` (object) Travel preferences. - `preferences.airPref` (object) Travel preferences related to air travel. - `preferences.airPref.airlinePrefs` (array) - `preferences.airPref.airlinePrefs.airlines` (array) Example: ["Indigo"] - `preferences.airPref.airlinePrefs.flightType` (string) Enum: "UNKNOWN_FLIGHT_TYPE", "DOMESTIC", "INTERNATIONAL", "ALL" - `preferences.airPref.alliancePref` (object) Alliance preferences. - `preferences.airPref.alliancePref.alliances` (array, required) Enum: "UNKNOWN_ALLIANCE", "STAR_ALLIANCE", "ONEWORLD", "SKYTEAM", "VANILLA_ALLIANCE", "U_FLY_ALLIANCE", "VALUE_ALLIANCE" - `preferences.airPref.farePref` (object) Fare preferences. - `preferences.airPref.farePref.fareTypes` (array, required) Enum: "UNKNOWN_TYPE", "CHANGEABLE", "REFUNDABLE" - `preferences.airPref.homeAirport` (string) Example: "NEW YORK" - `preferences.airPref.mealPref` (object) Meal preferences. - `preferences.airPref.mealPref.exclMealPrefs` (array) Enum: "UNKNOWN_MEAL", "AVML", "BBML", "BLML", "CHML", "DBML", "FPML", "GFML", "HFML", "HNML", "KSML", "LCML", "LFML", "LPML", "LSML", "MOML", "NLML", "NSML", "ORML", "PFML", "RVML", "SFML", "SPML", "VGML", "VJML", "VLML", "VOML" - `preferences.airPref.mealPref.inclMealPrefs` (array) Enum: "UNKNOWN_MEAL", "AVML", "BBML", "BLML", "CHML", "DBML", "FPML", "GFML", "HFML", "HNML", "KSML", "LCML", "LFML", "LPML", "LSML", "MOML", "NLML", "NSML", "ORML", "PFML", "RVML", "SFML", "SPML", "VGML", "VJML", "VLML", "VOML" - `preferences.airPref.mealPref.specialMealDescription` (string) Example: "Veg only meal" - `preferences.airPref.numStopPref` (object) Preferred number of stops. - `preferences.airPref.numStopPref.numOfStops` (integer, required) Example: 34 - `preferences.airPref.seatAmenityPref` (object) Seat amenity preference. - `preferences.airPref.seatAmenityPref.seatAmenityTypes` (array, required) Enum: "UNKNOWN_AIR_SEAT_AMENITY_TYPE", "FLAT_BED", "WIFI", "IN_SEAT_POWER" - `preferences.airPref.seatLocationPrefs` (array) - `preferences.airPref.seatLocationPrefs.cabins` (array) Enum: "UNKNOWN_CABIN", "ECONOMY", "PREMIUM_ECONOMY", "BUSINESS", "FIRST" - `preferences.airPref.seatLocationPrefs.isBulkHeadPref` (boolean) - `preferences.airPref.seatLocationPrefs.maxFlightDurationInHours` (integer) Example: 3 - `preferences.airPref.seatLocationPrefs.position` (string) Enum: "UNKNOWN_POSITION", "AISLE", "WINDOW", "AISLE_OR_WINDOW" - `preferences.airPref.preferredAirports` (array) A list of user preferred airports. - `preferences.airPref.preferredAirports.airportName` (string) Airport name. Example: "San Francisco International Airport" - `preferences.airPref.preferredAirports.airportCode` (string, required) IATA airport code. Example: "SFO" - `preferences.airPref.preferredAirports.label` (string, required) The label of preferred airport or rail station. Enum: "HOME", "WORK", "OTHER" - `preferences.preferredCurrency` (string) Example: "USD" - `preferences.railCards` (array) - `preferences.railCards.cardNumber` (string) Number of card - `preferences.railCards.expiryDate` (object) Expiry date of the Rail Card. - `preferences.railCards.expiryDate.iso8601` (string, required) Example: "2017-07-21" - `preferences.railCards.name` (string, required) Name of the Rail Card. Example: "Veterans Railcard" - `preferences.railCards.spotnanaCode` (string, required) Unique Spotnana code/identifier for Rail Card. Example: "VET" - `preferences.railCards.vendor` (string, required) Vendor Name. Example: "ATOC" - `preferences.railPref` (object) Travel preferences related to rail station. - `preferences.railPref.preferredRailStations` (array) A list of user preferred rail stations. - `preferences.railPref.preferredRailStations.stationName` (string) Rail station name. Example: "Chicago Union Station" - `preferences.railPref.preferredRailStations.stationCode` (string, required) Rail station code. Example: "CHI" - `preferences.railPref.preferredRailStations.cityName` (string) Name of city where the rail station is located. Example: "Chicago" - `preferences.railPref.preferredRailStations.countryCode` (string) Alpha-2 country code where the rail station is located. - `preferences.railPref.seatPreference` (object) Preference about seat of rail. - `preferences.railPref.seatPreference.hasAccessibility` (boolean) Whether or not requires assistance for disability. - `preferences.railPref.seatPreference.seatTypes` (array) Enum: "SLEEPER_BED", "NORMAL", "TABLE_SEAT" - `preferences.railPref.seatPreference.seatLocations` (array) Enum: "AISLE", "WINDOW", "SOLO" - `preferences.railPref.seatPreference.deckLevels` (array) Enum: "UPPER_DECK", "LOWER_DECK" - `preferences.railPref.seatPreference.seatDirections` (array) Enum: "FORWARD", "BACKWARD" - `preferences.railPref.travelClasses` (array) A list of class of service for rail. Enum: "FIRST", "STANDARD", "BUSINESS", "SLEEPER", "STANDARD_PREMIUM", "BUSINESS_PREMIUM", "COACH", "ROOM", "EXECUTIVE" - `preferences.railPref.coachPreferences` (array) A list of coach preference for rail. Enum: "SMOKING", "NON_SMOKING", "PETS_ALLOWED", "RESTAURANT", "QUIET" - `preferences.railPref.conditionalRates` (array) A list of conditional rates for rail. Enum: "MILITARY", "AAA", "GOVERNMENT" - `preferences.carPref` (object) Travel preferences related to car. - `preferences.carPref.vendors` (array) A list of car vendors. - `preferences.carPref.vendors.code` (string, required) Vendor code Example: "ZE" - `preferences.carPref.vendors.name` (string, required) Vendor name Example: "HERTZ" - `preferences.carPref.vendors.isPresentInPreferredVendors` (boolean) Whether the car vendor is present in preferred vendor list. This is an optional field which gets populated only in the preferred vendor autocomplete API. Example: true - `preferences.carPref.carTypes` (array) A list of types of car. Enum: "OTHER", "MINI", "ECONOMY", "COMPACT", "MID_SIZE", "STANDARD", "FULL_SIZE", "PREMIUM", "LUXURY", "CONVERTIBLE", "MINIVAN", "SUV", "VAN", "PICKUP", "SPORTS", "SPECIAL", "RECREATIONAL_VEHICLE", "WAGON" - `preferences.carPref.engineTypes` (array) A list of types of engine. Enum: "UNKNOWN_ENGINE", "PETROL", "DIESEL", "ELECTRIC", "CNG", "HYBRID", "HYDROGEN", "MULTI_FUEL", "ETHANOL" - `preferences.carPref.transmissionTypes` (array) A list of types of transmission. Enum: "MANUAL", "AUTOMATIC" - `preferences.hotelPref` (object) Travel preferences related to hotel. - `preferences.hotelPref.hotelParentChains` (array) A list of hotel parent chains. - `preferences.hotelPref.hotelParentChains.chainCode` (string) The code of hotel chain. Example: "EM" - `preferences.hotelPref.hotelParentChains.chainName` (string) The name of hotel chain. Example: "Mariott" - `preferences.hotelPref.hotelBrands` (array) A list of hotel brands. - `preferences.hotelPref.hotelBrands.brandCode` (string) The code of hotel brand. Example: "HY" - `preferences.hotelPref.hotelBrands.brandName` (string) The name of hotel brand. Example: "Global Hytt Corp." - `preferences.hotelPref.hotelAmenityTypes` (array) A list of HotelAmenities. Enum: "PARKING", "FREE_PARKING", "FREE_BREAKFAST", "POOL", "WIFI", "FITNESS_CENTER", "FAMILY_FRIENDLY", "RECEPTION", "SPA", "RESTAURANT", "BAR", "TRANSPORTATION", "PET_FRIENDLY", "BUSINESS_CENTER", "AIR_CONDITIONING", "BEACH_ACCESS", "LAUNDRY_SERVICES", "ROOM_SERVICE", "ACCESSIBLE" - `preferences.hotelPref.roomPreference` (object) Room options and stay preference. - `preferences.hotelPref.roomPreference.isMobilityAccessible` (boolean) Whether or not mobility accessible room, tub. - `preferences.hotelPref.roomPreference.bedCount` (string) The number of bed in the room. Enum: "ONE_BED", "TWO_BEDS" - `preferences.hotelPref.roomPreference.roomType` (string) Single selection of type of room. Enum: "SMOKING", "NON_SMOKING" - `preferences.hotelPref.roomPreference.mostImportantFact` (string) Single selection of the most import fact. Enum: "ROOM_TYPE", "BED_COUNT", "ROOM_LOCATION" - `preferences.hotelPref.roomPreference.roomLocation` (string) Location of the hotel room Enum: "HIGH_FLOOR", "LOW_FLOOR", "NEAR_ELEVATOR" - `preferences.hotelPref.roomPreference.pillowType` (string) The type of pillow in hotel room. Enum: "FOAM", "EXTRA_FOAM", "EXTRA_FEATHER" - `preferences.hotelPref.roomPreference.roomAmenityPrefs` (array) Enum: "FEATHER_FREE_ROOM", "EXTRA_TOWELS", "REFRIGERATOR" ## Response 401 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 403 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 404 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error.