Archived

This section includes documentation for API references for our older versions of Product API. While this documentation can be used for reference, we would recommend partners to update to the newer versions of these calls to ensure the latest additions and functionalities are captured.

Room type V2

Obtain a list of room types

Parameters

Parameter Parameter Type Description Required Data Type Default
Authorization header Authorization token in http header. Format: Authorization: Basic [username:password encoded by Base64] Yes Base64 encoded auth token
propertyId path Expedia Property ID Yes string
status query Status filter. String. Only supported value is "all". false string If not provided, API will only return active room types (meaning room type with at least one active rate plan, as room type status can't be directly controlled, but is rather inferred from its rate plans statuses).

Success Responses

Status Code Description Response Model
200 OK RoomType

Creates a new room type

Parameters

Parameter Parameter Type Description Required Data Type
Authorization header Authorization token in http header. Format: Authorization: Basic [username:password encoded by Base64] Yes Base64 encoded auth token
propertyId path Expedia Property Id Yes string
body body JSON message describing the new room type Yes RoomType

Examples

{
  "partnerCode": "MyStringCode",
  "name": {
    "attributes": {
      "typeOfRoom": "Penthouse",
      "roomClass": "Executive",
      "includeBedType": true,
      "view": "City View",
      "featuredAmenity": "Jetted Tub"
    }
  },
  "ageCategories": [
    {
      "category": "Adult",
      "minAge": 18
    },
    {
      "category": "ChildAgeA",
      "minAge": 6
    },
    {
      "category": "Infant",
      "minAge": 0
    }
  ],
  "maxOccupancy": {
    "adults": 2,
    "children": 1,
    "total": 3
  },
  "standardBedding": [
    {
      "option": [
        {
          "quantity": 1,
          "type": "King Bed"
        }
      ]
    }
  ],
  "extraBedding": [
    {
      "quantity": 1,
      "type": "Rollaway Bed",
      "size": "Full",
      "surcharge": {
        "type": "Per Day",
        "amount": 20
      }
    }
  ],
  "regulatoryRecords": {
    "category": "HOTEL",
    "records": [
      {
        "registrationNumber": "STR321321321",
        "registrationNumberType": "License",
        "expiry": "2022-12-12"
      }
    ],
     "exemptionCategories": [
           "MAX_NIGHT_CAP"
           ]
  },
  "smokingPreferences": [
    "Non-Smoking"
  ],
  "roomSize": {
    "squareFeet": 300,
    "squareMeters": 14
  },
  "views": [
    "Ocean View",
    "Beach View"
  ]
}

Success Responses

Status Code Description Response Model
201 Created RoomType

Read a single room type

Parameters

Parameter Parameter Type Description Required Data Type
Authorization header Authorization token in http header. Format: Authorization: Basic [username:password encoded by Base64] Yes Base64 encoded auth token
propertyId path Expedia Property ID Yes string
roomTypeId path Room type resource ID. Integer Yes string

Success Responses

Status Code Description Response Model
200 OK RoomType

Modify an existing room type

Expedia offers 2 ways to modify a room type.

Using the PUT verb, partners can perform a full overlay change of the room type resource. It means that all elements of a room type need to be provided, and any optional element not provided will be erased/removed.

Using the PATCH verb, partners can perform a partial update of a room type. Expedia implemented the Merge-Patch RFC.

Room Type Modify - Full Overlay (PUT)

Parameters

Parameter Parameter Type Description Required Data Type
Authorization header Authorization token in http header. Format: Authorization: Basic [username:password encoded by Base64] Yes Base64 encoded auth token
propertyId path Expedia Property Id Yes string
roomTypeId path Room type resource ID Yes string
body body JSON message with modified room type Yes RoomType

Examples

{
  "resourceId": 200142893,
  "partnerCode": "MyStringCode",
  "name": {
    "attributes": {
      "typeOfRoom": "Penthouse",
      "roomClass": "Executive",
      "includeBedType": true,
      "view": "City View",
      "featuredAmenity": "Jetted Tub"
    },
    "value": "Executive Penthouse, 1 King Bed, Jetted Tub, City View (Rooftop Terrace)"
  },
  "status": "Active",
  "ageCategories": [
    {
      "category": "Adult",
      "minAge": 18
    },
    {
      "category": "ChildAgeA",
      "minAge": 6
    },
    {
      "category": "Infant",
      "minAge": 0
    }
  ],
  "maxOccupancy": {
    "adults": 2,
    "children": 1,
    "total": 3
  },
  "standardBedding": [
    {
      "option": [
        {
          "quantity": 1,
          "type": "King Bed",
          "size": "King"
        }
      ]
    }
  ],
  "extraBedding": [
    {
      "quantity": 1,
      "type": "Sofa Bed",
      "size": "Full",
      "surcharge": {
        "type": "Per Day",
        "amount": 20
      }
    }
  ],
  "regulatoryRecords": {
    "category": "HOTEL",
    "records": [
      {
        "registrationNumber": "STR321321321",
        "registrationNumberType": "License",
        "expiry": "2022-12-12"
      }
    ],
     "exemptionCategories": [
           "MAX_NIGHT_CAP"
           ]
  },
  "smokingPreferences": [
    "Non-Smoking"
  ],
  "roomSize": {
    "squareFeet": 300,
    "squareMeters": 14
  },
  "views": [
    "Ocean View",
    "Beach View"
  ],
  "wheelchairAccessibility": true
}

Success Responses

Status Code Description Response Model
200 OK RoomType

Room Type Modify - Partial Update (PATCH)

Expedia chose the merge-patch method for partial update, as described in IETF RFC.

This method allows partners to update a room type by providing only the fields/values they need to change. This saves partners from having to first read the room type before updating it. If partners provide the complete room type data, this method essentially behaves just like the update method.

The response will always be the complete image of the room type after changes have been applied.

Important

The PATCH logic only applies to first (top) level elements/objects of the room type. Partners can decide to include any number of these top level elements/objects, and any elements/objects not included will be ignored/untouched. If a partner includes any array or complex object (such as name, age categories or max occupancy), these objects will need to be fully specified with all the desired elements/attributes/object changes, as they are treated as full overlay.

First-level elements/objects not provided in the input will remain unchanged. Some top-level elements can be removed. To do so, you have to explicitly specify it in the JSON message, as null. For array types, you need to provide a "null" or empty array value.

Also note that all validation rules are applied on the complete updated room type data. For instance, only providing a ageCategories that has no "Adult" category will yield the appropriate error response.

Parameters

Parameter Parameter Type Description Required Data Type
Authorization header Authorization token in http header. Format: Authorization: Basic [username:password encoded by Base64] Yes Base64 encoded auth token
propertyId path Expedia Property ID Yes string
roomTypeId path Room type resource ID Yes string
body body JSON message of partially updated room type Yes RoomType

Examples

Updating both the partner code and the name attributes:

{
  "partnerCode": "PatchedPartnerCode",
  "name": {
    "attributes": {
      "typeOfRoom": "Loft",
      "roomClass": "Deluxe",
      "area": "Poolside"
    }
  }
}

Updating only the maximum occupancy:

{
  "maxOccupancy": {
    "total": 3,
    "adults": 2
  }
}

Success Responses

Status Code Description Response Model
200 OK RoomType

RoomType Resource Definition

Property Name Type Required for POST Description
resourceId integer No Integer. Required for modify, and cannot be changed. This resource ID is what will be used to manage availability and rates, and also what Expedia specifies in booking messages to identify the room booked.
partnerCode string Yes Partner room type code/identifier. Max. 40 characters. Has to be unique across all room types for this hotel. This is used as a unique key to ensure partners do not duplicate room types in Expedia system.
name RoomTypeName Yes Name object. Collection of elements/attributes related the name of a room.
status enum No Possible values are (Active, Inactive). Room type status is derived from the rate plans associated with the room type: if at least one rate plan is active, the room type status will be active. If all rate plans are inactive, then the room type becomes inactive as well. This value can be omitted in a create request. If provided during create, it will be ignored. This value cannot be edited in an update message. If modified, an error will be returned.
ageCategories Array[RoomTypeAgeCategory] Yes Array of age categories. Defines the different age categories supported by the room type. At the very least, the 'Adult' category must be defined.
maxOccupancy Occupancy No Defines the maximum occupancy of the room in total and by age category. Always returned by room type GET. Optional for room type create and update. When not provided the Product API will calculate the occuancy based on bedding options.
standardBedding BeddingOption Yes Minimum 1 maxium 2 bedding options a room may have. Each bedding option can be with a combination of beds (type, size and quality).
extraBedding Array[ExtraBed] No Defines the extra bed combination (type, size and quality) the room type may have.
smokingPreferences Array[smokingPreferenceEnum] Yes Used to define whether the room type is smoking, nonsmoking, or if both options are available on request. If a single smoking option is provided, then the room is, by default, only available in this configuration. If both options are provided, then a choice will be offered to the customer at the time he makes a reservation, and the customer preference will be sent in electronic booking messages to the partner.
roomSize RoomSize No Used to define room size. When used, both size in square feet and in square meters must be specified.
views Array[viewEnum] No Used to define view(s) from the room. There can be up to 2 different views defined per room type.
wheelchairAccessibility boolean No Used to indicate whether the room is configured to be wheelchair accessible or not.
_links RoomTypeLinks No Collection of URLs that point to various resources related to the current resource. Cannot be provided in create requests. Cannot be changed via partial (PATCH) or full overlay (PUT) updates.

RoomTypeName

More information can be found on room type names in the "FAQ and Guides" section, under "Understanding Expedia's Logic Around Room Names" section.

Property Name Type Description
attributes RoomNameAttributes Collection of attributes that can be used to build a room type name. Should only be provided if partner doesn’t want to use one of the predefined names Expedia supports.
value string For create and modify requests, optional and ignored if name attributes are used. Required if name attributes are not provided. When provided in create or update requests, without any name attributes, value provided needs to be one of the predefined room names found in PredefinedRoomNamesEnum section. For read, create and modify responses, if partner is making use of room name attributes, this field will contain the auto-generated name based off the attributes that were provided, in English-US language. If partner is using a predefined name, this field will contain the predefined name value, as provided in the create or update request.

RoomNameAttributes

More information can be found on room type names in the "FAQ and Guides" section, under "Understanding Expedia's Logic Around Room Names" section.

Property Name Type Required Description
typeOfRoom typeOfRoomEnum Yes Attribute that determines the type of room, which is used to compose the name
roomClass roomClassEnum No Attribute that described the class of room, which is used to compose the name
includeBedType boolean No Attribute that determines whether or not to include bed type on the room name
bedroomDetails bedroomDetailsEnum No Attribute that describes details of the bedroom used to compose the name of the room
includeSmokingPref boolean No Attribute that determines if room has smoking preference
accessibility boolean No Attribute that determines if room is considered wheelchair accessible
view viewEnum No Attribute that gives additional information about the view of the room
featuredAmenity featuredAmenityEnum No Attribute used to highlight a feature of the room on its name
area areaEnum No Attributed used to highlight the location of the room

RoomTypeAgeCategory

Property Name Type Required Description
category categoryEnum Yes Defines which category of age is being defined.
minAge integer Yes Defines what is the minimum age for a person to belong in the given age category.

Occupancy

Property Name Type Required Description
total integer Yes Total count of person that can reside in the room.
adults integer Yes Max number of adults that can reside in the room.
children integer Yes Max number of children that can reside in the room.

BeddingOption

Property Name Type Required Description
option Array[Bed] Yes Each bedding option can be with a combination of beds (type, size and quality).

Bed

Property Name Type Required Description
quantity integer Yes Number of beds.
type bedTypeEnum Yes Defines the bed type. Example: "King Bed", "Sofa Bed".
size bedSizeEnum No Defines the size of the bed. Example: "King", "Queen". When specified, only certain sizes can be used for each type. For bed types where Expedia accepts different sizes, when the size is not specific, Expedia will default to the smallest size possbile for the bed type.

Extra Bed

Property Name Type Required Description
quantity integer Yes Number of beds.
type bedTypeEnum Yes Defines the bed type. Example: "King Bed", "Sofa Bed".
size bedSizeEnum No Defines the size of the bed. Example: "King", "Queen". When specified, only certain sizes can be used for each type. For bed types where Expedia accepts different sizes, when the size is not specific, Expedia will default to the smallest size possible for the bed type.
surcharge surcharge No Defines the surcharge of the bed. Only extra beds of type "Crib" and "Rollaway Bed" can have a surcharge defined.

Surcharge

Property Name Type Required Description
type surchargeTypeEnum Yes Defines the surcharge type. Example: "Free", "Per Day".
amount number No Defines the amount of the surcharge. Must be defined if type is not "Free".

regulatoryRecords

Property Name Type Required Description
category categoryEnum Yes Used to specify the category of property as per jurisdiction requirements. Utilized for regulatory validation purposes.
records records Yes Lists the regulatory data attributes Expedia is collecting.
exemptionCategories exemptionCategories Yes List of exemptions for this bookable unit as determined/keyed by district config

records

Property Name Type Required Description
registrationNumber string Yes Used to specify the license/registration number of the property/room type that is registered with the city's regulators. Could be required for certain jurisdictions depending on property type.
registrationNumberType registrationNumberTypeEnum Yes Type of license/registration number that is registered with the city's regulator. Could be required for certain jurisdictions depending on property type.
expiry date No Date of expiration of the license/registration number in YYYY-MM-DD format.

RoomSize

Property Name Type Required Description
squareFeet integer Yes Room size in square feet.
squareMeters integer Yes Room size in square meters.

Property Name Type Description
self Link URL of the current resource. Cannot be provided in create requests. Cannot be changed via partial (PATCH) or full overlay (PUT) updates.