# Update user travel preferences

Endpoint: PUT /v2/users/{userId}/travel-preferences
Version: v2
Security: Bearer

## Security:

  - `Bearer` (unknown)
    http bearer

## Path parameters:

  - `userId` (string, required)
    Identifier for user.

## Request 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)

  - `preferences.airPref.airlinePrefs.flightType` (string)
    Enum: "UNKNOWN_FLIGHT_TYPE", "DOMESTIC", "INTERNATIONAL", "ALL"

  - `preferences.airPref.alliancePref` (object)
    Alliance preferences.

  - `preferences.airPref.alliancePref.alliances` (array, required)

  - `preferences.airPref.farePref` (object)
    Fare preferences.

  - `preferences.airPref.farePref.fareTypes` (array, required)

  - `preferences.airPref.homeAirport` (string)
    Example: NEW YORK

  - `preferences.airPref.mealPref` (object)
    Meal preferences.

  - `preferences.airPref.mealPref.exclMealPrefs` (array)

  - `preferences.airPref.mealPref.inclMealPrefs` (array)

  - `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)

  - `preferences.airPref.seatLocationPrefs` (array)

  - `preferences.airPref.seatLocationPrefs.cabins` (array)

  - `preferences.airPref.seatLocationPrefs.isBulkHeadPref` (boolean)
    Example: false

  - `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)
    Date in ISO 8601 standard.

  - `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.
    Example: false

  - `preferences.railPref.seatPreference.seatTypes` (array)

  - `preferences.railPref.seatPreference.seatLocations` (array)

  - `preferences.railPref.seatPreference.deckLevels` (array)

  - `preferences.railPref.seatPreference.seatDirections` (array)

  - `preferences.railPref.travelClasses` (array)
    A list of class of service for rail.

  - `preferences.railPref.coachPreferences` (array)
    A list of coach preference for rail.

  - `preferences.railPref.conditionalRates` (array)
    A list of conditional rates for rail.

  - `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.

  - `preferences.carPref.engineTypes` (array)
    A list of types of engine.

  - `preferences.carPref.transmissionTypes` (array)
    A list of types of transmission.

  - `preferences.carPref.conditionalRates` (array)
    A list of conditional rates for rail.

  - `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.

  - `preferences.hotelPref.roomPreference` (object)
    Room options and stay preference.

  - `preferences.hotelPref.roomPreference.isMobilityAccessible` (boolean)
    Whether or not mobility accessible room, tub.
    Example: false

  - `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)

  - `preferences.hotelPref.conditionalRates` (array)
    A list of conditional rates for rail.

## Response 204:

  - `204` (unknown)
    No Content

## Response 401:

  - `401` (unknown)
    Unauthorized

## 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:

  - `403` (unknown)
    Forbidden

## 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:

  - `404` (unknown)
    The specified resource was not found.

## 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.

