Overview
This API lets you define ways to dynamically apply actions to a rate whenever conditions are met, such as adjusting the price or enabling refundability. Unlike the Promotions API, which can only apply eligible promotions with the deepest discounts, this API applies any actions when certain conditions are met, including price adjustments that might ultimately increase the final price.
Requests
Syntax
The RateModifications
message uses the following syntax:
<?xml version="1.0" encoding="UTF-8"?>
<RateModifications partner="partner_key"
id="message_ID"
timestamp="timestamp">
<HotelRateModifications hotel_id="HotelID" action="[overlay]">
<ItineraryRateModification id="ModificationID" action="[delete]">
<BookingDates>
<DateRange start="YYYY-MM-DD" end="YYYY-MM-DD" days_of_week=""MTWHFSU_or_subset""/>
<DateRange start="YYYY-MM-DD" end="YYYY-MM-DD" days_of_week=""MTWHFSU_or_subset""/>
</BookingDates>
<BookingWindow min="integer" max="integer"/>
<CheckinDates>
<DateRange start="YYYY-MM-DD" end="YYYY-MM-DD" days_of_week=""MTWHFSU_or_subset""/>
</CheckinDates>
<CheckoutDates>
<DateRange start="YYYY-MM-DD" end="YYYY-MM-DD" days_of_week=""MTWHFSU_or_subset""/>
</CheckoutDates>
<Devices>
<Device type="[desktop|tablet|mobile]"/>
</Devices>
<LengthOfStay min="integer" max="integer"/>
<MinimumAmount before_discount="integer"/>
<RatePlans>
<RatePlan id="PackageID_1"/>
<RatePlan id="PackageID_2"/>
</RatePlans>
<RoomTypes>
<RoomType id="RoomID_1"/>
<RoomType id="RoomID_2"/>
</RoomTypes>
<StayDates application="[all|any]">
<DateRange start="YYYY-MM-DD" end="YYYY-MM-DD" days_of_week=""MTWHFSU_or_subset""/>
</StayDates>
<UserCountries type="[include|exclude]">
<Country code="country_code"/>
</UserCountries>
<ModificationActions>
<PriceAdjustment multiplier="float"/>
<RateRule id="RateRuleID"/>
<Refundable available="[false|true]"
refundable_until_days="number_of_days"
refundable_until_time="time"/>
<Availability status="[unavailable]"/>
</ModificationActions>
</ItineraryRateModification>
</HotelRateModifications>
</RateModifications>
Elements and attributes
The RateModifications
message has the following elements and
attributes:
Element / @Attribute | Occurrences | Type | Description |
---|---|---|---|
RateModifications | 1 | Complex element | The root element of a rate modifications message. |
RateModifications / @partner | 1 | string | The partner account for this message. This string value is the
"Partner key" value listed on
the
Account settings page in Hotel Center.
Note: If you have a backend that provides feeds for
multiple accounts, this value needs to match the |
RateModifications / @id | 1 | string | A unique identifier for this request message. This value is returned in the response message. Allowed characters are a-z, A-Z, 0-9, _ (underscore), and - (dash). |
RateModifications / @timestamp | 1 | DateTime | The creation date and time of this message. |
RateModifications / HotelRateModifications | 0..n | HotelRateModifications | Rate modifications for a property. Each rate modification applies to a single property. Note: If multiple rate modifications can be applied to the same rate, all modifications are applied. No specific order is guaranteed. |
RateModifications / HotelRateModifications / @hotel_id | 1 | string | The unique identifier for the property. This value must match the
Hotel ID specified using
<id> in the <listing> element
in the Hotel List Feed. The Hotel ID is also listed in Hotel Center. |
RateModifications / HotelRateModifications / @action | 0..1 | enum | If |
RateModifications / HotelRateModifications / ItineraryRateModification | 0..200 | ItineraryRateModification | A single rate modification for a property. Note:Rate modifications are difficult to debug and we recommend using them sparingly. Contact your Technical Account Manager (TAM) for use cases that require more than 200 rate modifications. |
RateModifications / HotelRateModifications / ItineraryRateModification / @id | 1 | string | A unique identifier for the rate modification. The maximum number of characters allowed is 40. Allowed characters are a-z, A-Z, 0-9, _ (underscore), - (dash), and . (period). |
RateModifications / HotelRateModifications / ItineraryRateModification / @action | 0..1 | enum | If not specified and a rate modification with the same
If specified, the value must be |
RateModifications / HotelRateModifications / ItineraryRateModification / BookingDates | 0..1 | BookingDates | A container for one or more date ranges that define when booking must occur in order for the rate modification to be applied. |
RateModifications / HotelRateModifications / ItineraryRateModification / BookingDates / DateRange | 1..99 | DateRange | A date range specifying when booking must occur for the rate modification to be applied. |
RateModifications / HotelRateModifications / ItineraryRateModification / BookingDates / DateRange / @start | 0..1 | Date | The starting date (based on the property's time zone), inclusive, of
the date range. This date must be before, or the same as, the
end date. If start isn't specified, the date
range is effectively unlimited in terms of a start date. |
RateModifications / HotelRateModifications / ItineraryRateModification / BookingDates / DateRange / @end | 0..1 | Date | The ending date (based on the property's time zone), inclusive, of the
date range. This date must be the same as, or after, the
start date. If end isn't specified, the date
range is effectively unlimited in terms of an end date. |
RateModifications / HotelRateModifications / ItineraryRateModification / BookingDates / DateRange / @days_of_week | 0..1 | string | The days of the week that are allowed in the date range. If not specified, all days are allowed in the date range. Each character in the string specifies a day. For example, "MTWHF" specifies that weekdays are allowed in the date range. Valid characters are:
Any character combination is valid. |
RateModifications / HotelRateModifications / ItineraryRateModification / BookingWindow | 0..1 | BookingWindow | Specifies the time period when booking must occur relative to the check-in date (based on the property's time zone). For example, the booking window can be set to least 7 days, but not more than 180 days, prior to check-in. |
RateModifications / HotelRateModifications / ItineraryRateModification / BookingWindow / @min | 0..1 | integer | The minimum number of days prior to check-in when booking must occur for the rate modification to be applied. If this isn't specified, there is no minimum. |
RateModifications / HotelRateModifications / ItineraryRateModification / BookingWindow / @max | 0..1 | integer | The maximum number of days prior to check-in when booking must occur for the rate modification to be applied. If this isn't specified, there is no maximum. |
RateModifications / HotelRateModifications / ItineraryRateModification / CheckinDates | 0..1 | CheckinDates | A container for one or more date ranges that define when check-in must occur for the rate modification to be applied. |
RateModifications / HotelRateModifications / ItineraryRateModification / CheckinDates / DateRange | 1..99 | DateRange | A date range specifying when check-in must occur for the rate modification to be applied. This element is not required if you're deleting one or more rate modifications. |
RateModifications / HotelRateModifications / ItineraryRateModification / CheckinDates / DateRange / @start | 0..1 | Date | The starting date (based on the property's time zone), inclusive, of
the date range. This date must be before, or the same as, the
end date. If start isn't specified, the date
range is effectively unlimited in terms of a start date. |
RateModifications / HotelRateModifications / ItineraryRateModification / CheckinDates / DateRange / @end | 0..1 | Date | The ending date (based on the property's time zone), inclusive, of the
date range. This date must be the same as, or after, the
start date. If end isn't specified, the date
range is effectively unlimited in terms of an end date. |
RateModifications / HotelRateModifications / ItineraryRateModification / CheckinDates / DateRange / @days_of_week | 0..1 | string | The days of the week that are allowed in the date range. If not specified, all days are allowed in the date range. Each character in the string specifies a day. For example, "MTWHF" specifies that weekdays are allowed in the date range. Valid characters are:
Any character combination is valid. |
RateModifications / HotelRateModifications / ItineraryRateModification / CheckoutDates | 0..1 | CheckoutDates | A container for one or more date ranges that define when check-out must occur for the rate modification to be applied. |
RateModifications / HotelRateModifications / ItineraryRateModification / CheckoutDates / DateRange | 1..99 | DateRange | A date range specifying when check-out must occur for the rate modification to be applied. This element is not required if you're deleting one or more rate modifications. |
RateModifications / HotelRateModifications / ItineraryRateModification / CheckoutDates / DateRange / @start | 0..1 | Date | The starting date (based on the property's time zone), inclusive, of
the date range. This date must be before, or the same as, the
end date. If start isn't specified, the date
range is effectively unlimited in terms of a start date. |
RateModifications / HotelRateModifications / ItineraryRateModification / CheckoutDates / DateRange / @end | 0..1 | Date | The ending date (based on the property's time zone), inclusive, of the
date range. This date must be the same as, or after, the
start date. If end isn't specified, the date
range is effectively unlimited in terms of an end date. |
RateModifications / HotelRateModifications / ItineraryRateModification / CheckoutDates / DateRange / @days_of_week | 0..1 | string | The days of the week that are allowed in the date range. If not specified, all days are allowed in the date range. Each character in the string specifies a day. For example, "MTWHF" specifies that weekdays are allowed in the date range. Valid characters are:
Any character combination is valid. |
RateModifications / HotelRateModifications / ItineraryRateModification / Devices | 0..1 | Devices | Container for listing the user devices that are eligible for the rate modification. If specified, then the rate modification is only applied if the user matches one of the listed devices. If not specified, then this does not restrict application of the rate modification. |
RateModifications / HotelRateModifications / ItineraryRateModification / Devices / Device | 1..3 | Device | Defines one type of user device that is eligible for the rate modification. |
RateModifications / HotelRateModifications / ItineraryRateModification / Devices / Device / @type | 1 | enum | A type of device. The value must be desktop ,
tablet , or mobile . |
RateModifications / HotelRateModifications / ItineraryRateModification / ModificationActions | 1 | ModificationActions | Action(s) which are applied to the rate if all specified conditions are met. |
RateModifications / HotelRateModifications / ItineraryRateModification / ModificationActions / PriceAdjustment | 0..1 | PriceAdjustment | Modifies the rate by multiplying both AmountBeforeTax and
AmountAfterTax by the specified multiplier |
RateModifications / HotelRateModifications / ItineraryRateModification / ModificationActions / PriceAdjustment / @multiplier | 1 | float | Both AmountBeforeTax and AmountAfterTax are
multiplied by this value. |
RateModifications / HotelRateModifications / ItineraryRateModification / ModificationActions / RateRule | 0..1 | RateRule | Modifies the rate by applying the specified rate rule ID to it. |
RateModifications / HotelRateModifications / ItineraryRateModification / ModificationActions / RateRule / @id | 1 | string | This ID matches a rate to a definition in your
Rate Rule Definition file.
Note:
|
RateModifications / HotelRateModifications / ItineraryRateModification / ModificationActions / Refundable | 0..1 | Refundable | Overwrites the rate's refundability to the specified value.
When setting the attributes, note the following:
|
RateModifications / HotelRateModifications / ItineraryRateModification / ModificationActions / Refundable / @available | 1 | boolean | (Required) Set to 1 or
true to indicate if the rate allows a full
refund; otherwise set to 0 or false . |
Transaction / PropertyDataSet / PackageData / Refundable / @refundable_until_days | 0..1 | integer | (Required if
available is true ) Specifies
the number of days in advance of check-in that a full refund can be
requested. The value of refundable_until_days
must be an integer between 0 and 330, inclusive. |
RateModifications / HotelRateModifications / ItineraryRateModification / ModificationActions / Refundable / @refundable_until_time | 0..1 | Time | (Recommended if available is true ) Specifies
the latest time of day, in the local time of the hotel, that a full
refund request is honored. This can be combined with
refundable_until_days to specify, for
example, that "refunds are available until 4:00PM two days before
check-in". If refundable_until_time isn't set, the value
defaults to midnight. |
RateModifications / HotelRateModifications / ItineraryRateModification / ModificationActions / Availability | 0..1 | Availability | Overwrites the rate's availability to the specified value.
We only support setting the rate to unavailable . |
RateModifications / HotelRateModifications / ItineraryRateModification / ModificationActions / Availability / @status | 1 | enum | If status="unavailable" , the rate is treated
as if it is unavailable, regardless of whether a valid price exists for
it. |
RateModifications / HotelRateModifications / ItineraryRateModification / LengthOfStay | 0..1 | LengthOfStay | Defines length of stay limits within which this rate modification can be applied. The rate modification is not applied when length of stay is outside of the min and max limits. |
RateModifications / HotelRateModifications / ItineraryRateModification / LengthOfStay / @min | 0..1 | integer | The minimum nights allowed in the stay for the rate modification to be applied. If this isn't specified, there is no minimum. |
RateModifications / HotelRateModifications / ItineraryRateModification / LengthOfStay / @max | 0..1 | integer | The maximum nights allowed in the stay for the rate modification to be applied. If this isn't specified, there is no maximum. |
RateModifications / HotelRateModifications / ItineraryRateModification / MinimumAmount | 0..1 | MinimumAmount | Specifies the minimum sum of the daily room rates (using the larger of
AmountBeforeTax or AmountAfterTax ) that must
be exceeded for the rate modification to be applied. |
RateModifications / HotelRateModifications / ItineraryRateModification / MinimumAmount / @before_discount | 1 | integer | The value that must be exceeded for the rate modification to be applied. |
RateModifications / HotelRateModifications / ItineraryRateModification / RatePlans | 0..1 | RatePlans | Container for a list of rate plans to which the rate modification
applies. If <RatePlans> isn't specified, the rate
modification applies to all rate plans. |
RateModifications / HotelRateModifications / ItineraryRateModification / RatePlans / RatePlan | 1..n | RatePlan | Specifies a rate plan. A rate plan is defined by a combination of package, rates, and availability, as defined in Transaction (Property Data), OTA_HotelRateAmountNotifRQ, and OTA_HotelAvailNotifRQ messages, and as identified by the PackageID. |
RateModifications / HotelRateModifications / ItineraryRateModification / RatePlans / RatePlan / @id | 1 | string | The unique identifier for the rate plan. This value maps to the
PackageID value in <PackageData>
in a Transaction (Property Data) message, and in the
RatePlanCode attribute in
<StatusApplicationControl> in both
<OTA_HotelRateAmountNotifRQ> and
<OTA_HotelAvailNotifRQ> messages.
The maximum number of characters allowed is 50. |
RateModifications / HotelRateModifications / ItineraryRateModification / RoomTypes | 0..1 | RoomTypes | Container for a list of room types to which the rate modification applies.
The rate modification is applied to each <RoomType>
specified. If <RoomTypes> isn't specified, the
rate modification applies to all rooms. |
RateModifications / HotelRateModifications / ItineraryRateModification / RoomTypes / RoomType | 1..n | RoomType | Specifies a room type. A room type is defined in a
<RoomData> element in a
Transaction (Property Data) message and is
referenced using its <RoomID> value. (Its
<RoomID> value is also referenced by the
InvTypeCode attribute in OTA_HotelRateAmountNotifRQ
messages.) |
RateModifications / HotelRateModifications / ItineraryRateModification / RoomTypes / RoomType / @id | 1 | string | The unique identifier for the inventory (room type). This value maps
to <RoomID> in a Transaction (Property Data) message.
The maximum number of characters allowed is 50. |
RateModifications / HotelRateModifications / ItineraryRateModification / StayDates | 0..1 | StayDates | A container for one or more date ranges that determine how the rate modification is applied, such as to accommodate seasonal pricing. |
RateModifications / HotelRateModifications / ItineraryRateModification / StayDates / @application | 1 | enum | Describes how the rate modification should be applied. Valid values are:
This attribute must always be specified. |
RateModifications / HotelRateModifications / ItineraryRateModification / StayDates / DateRange | 1..99 | DateRange | A date range specifying dates when the rate modification is to be applied. |
RateModifications / HotelRateModifications / ItineraryRateModification / StayDates / DateRange / @start | 0..1 | Date | The starting date (based on the property's time zone), inclusive, of
the date range. This date must be before, or the same as, the
end date. If start isn't specified, the date
range is effectively unlimited in terms of a start date. |
RateModifications / HotelRateModifications / ItineraryRateModification / StayDates / DateRange / @end | 0..1 | Date | The ending date (based on the property's time zone), inclusive, of the
date range. This date must be the same as, or after, the start
date. If end isn't specified, the date
range is effectively unlimited in terms of an end date. |
RateModifications / HotelRateModifications / ItineraryRateModification / StayDates / DateRange / @days_of_week | 0..1 | string | The days of the week that are allowed in the date range. If not specified, all days are allowed in the date range. Each character in the string specifies a day. For example, "MTWHF" specifies that weekdays are allowed in the date range. Valid characters are:
Any character combination is valid. |
RateModifications / HotelRateModifications / ItineraryRateModification / UserCountries | 0..1 | UserCountries | If specified, the rate modification is only applied if the user is located in one of the specified countries. If not specified, the rate modification is applied regardless of the user's location. |
RateModifications / HotelRateModifications / ItineraryRateModification / UserCountries / @type | 0..1 | enum | The type of UserCountries specification.
Valid values are If the UserCountries If the UserCountries If the UserCountries |
RateModifications / HotelRateModifications / ItineraryRateModification / UserCountries / Country | 1..300 | Country | Specifies an allowed user country for the rate modification. |
RateModifications / HotelRateModifications / ItineraryRateModification / UserCountries / Country / @code | 1 | string | A CLDR country code,
such as DE or FR . Note that, for some
countries, the CLDR country code isn't the same as the 2-letter ISO
country code. Also, CLDR region codes are not supported. |
Examples
Basic message
The following example shows a basic RateModifications
` message:
<?xml version="1.0" encoding="UTF-8"?>
<RateModifications partner="account_xyz"
id="123_abc"
timestamp="2023-05-22T16:20:00-04:00">
<HotelRateModifications hotel_id="Property_1">
<ItineraryRateModification id="1">
<BookingDates>
<DateRange start="2023-07-01" end="2023-07-31" days_of_week="MTWHF"/>
<DateRange start="2023-09-01" end="2023-09-30"/>
</BookingDates>
<BookingWindow min="7" max="330"/>
<CheckinDates>
<DateRange start="2023-10-01" end="2023-10-31" days_of_week="FSU"/>
</CheckinDates>
<CheckoutDates>
<DateRange start="2023-10-08" end="2023-11-07" days_of_week="FSU"/>
</CheckoutDates>
<Devices>
<Device type="mobile"/>
<Device type="tablet"/>
</Devices>
<LengthOfStay min="2" max="14"/>
<RatePlans>
<RatePlan id="234"/>
<RatePlan id="567"/>
</RatePlans>
<RoomTypes>
<RoomType id="123"/>
<RoomType id="456"/>
</RoomTypes>
<UserCountries>
<Country code="US"/>
<Country code="GB"/>
</UserCountries>
<ModificationActions>
<PriceAdjustment multiplier="1.2"/>
</ModificationActions>
</ItineraryRateModification>
</HotelRateModifications>
</RateModifications>
Delete one rate modification
The following example shows how to delete one rate modification for a property:
<?xml version="1.0" encoding="UTF-8"?>
<RateModifications partner="account_xyz"
id="123_abc"
timestamp="2023-05-22T16:20:00-04:00">
<HotelRateModifications hotel_id="Property_1">
<ItineraryRateModification id="1" action="delete"/>
</HotelRateModifications>
</RateModifications>
Delete all rate modifications
The following example shows how to delete all rate modifications for a property:
<?xml version="1.0" encoding="UTF-8"?>
<RateModifications partner="account_xyz"
id="123_abc"
timestamp="2023-05-22T16:20:00-04:00">
<HotelRateModifications hotel_id="Property_1" action="overlay"/>
</RateModifications>
Overlay all rate modifications
The following example shows how to overlay <HotelRateModifications>
for
property with one or more new rate modifications. When
action="overlay"
, all stored rate modifications are deleted prior to
storing the rate modifications specified in the current message:
<?xml version="1.0" encoding="UTF-8"?>
<RateModifications partner="account_xyz"
id="123_abc"
timestamp="2023-05-22T16:20:00-04:00">
<HotelRateModifications hotel_id="Property_1" action="overlay"/>
<ItineraryRateModification id="1">
<BookingDates>
<DateRange start="2023-09-01" end="2023-09-30"/>
</BookingDates>
<ModificationActions>
<PriceAdjustment multiplier="1.2"/>
</ModificationActions>
<RoomTypes>
<RoomType id="123"/>
<RoomType id="456"/>
</RoomTypes>
<RatePlans>
<RatePlan id="234"/>
<RatePlan id="567"/>
</RatePlans>
</ItineraryRateModification>
</HotelRateModifications>
</RateModifications>
Multiple modification actions
The following example shows how to perform multiple modification actions at one time:
<?xml version="1.0" encoding="UTF-8"?>
<RateModifications partner="account_xyz"
id="123_abc"
timestamp="2023-05-22T16:20:00-04:00">
<HotelRateModifications hotel_id="Property_1">
<ItineraryRateModification id="1">
<BookingDates>
<DateRange start="2023-01-01" end="2023-02-28"/>
</BookingDates>
<ModificationActions>
<PriceAdjustment multiplier=".95"/>
<Refundable available="true"
refundable_until_days="1"
refundable_until_time="12:00:00"/>
</ModificationActions>
</ItineraryRateModification>
</HotelRateModifications>
</RateModifications>
Turn off a rate plan for user countries
The following example shows how to limit a rate plan to only
Japanese (JP
) users:
<?xml version="1.0" encoding="UTF-8"?>
<RateModifications partner="account_xyz"
id="123_abc"
timestamp="2023-05-22T16:20:00-04:00">
<HotelRateModifications hotel_id="Property_1">
<ItineraryRateModification id="1">
<RatePlans>
<RatePlan id="jp_only"/>
</RatePlans>
<UserCountries type="exclude">
<Country code="JP"/>
</UserCountries>
<ModificationActions>
<Availability status="unavailable"/>
</ModificationActions>
</ItineraryRateModification>
</HotelRateModifications>
</RateModifications>
Responses
Syntax
The RateModificationsResponse
message uses the following syntax:
<?xml version="1.0" encoding="UTF-8"?>
<RateModificationsResponse timestamp="timestamp"
id="message_ID"
partner="partner_key">
<!-- Either Success or Issues will be populated. -->
<Success/>
<Issues>
<Issue code="issue_code" status="issue_type"><var>issue_description</var></Issue>
</Issues>
</RateModificationsResponse>
Elements and attributes
The RateModificationsResponse
message has the following
elements and attributes:
Element / @Attribute | Occurrences | Type | Description |
---|---|---|---|
RateModifications | 1 | Complex element | The root element indicating the success or issues for a received RateModifications request message. |
RateModificationsResponse / @timestamp | 1 | DateTime | The creation date and time of this message. |
RateModificationsResponse / @id | 1 | string | The unique identifier from the associated RateModifications message. |
RateModificationsResponse / @partner | 1 | string | The partner account for this message. |
RateModificationsResponse / Success | 0..1 | Success | Indicates that the RateModifications message was processed successfully
without warnings, errors, or failures.
Either |
RateModificationsResponse / Issues | 0..1 | Issues | A container for one or more issues encountered while processing the
RateModifications message.
Either |
RateModificationsResponse / Issues / Issue | 1..n | Issue | The description of a warning, error, or failure encountered while processing the RateModifications message. Details on these issues can be found in Feed Status Error Messages. |
RateModificationsResponse / Issues / Issue / @code | 1 | integer | The identifier for the issue. |
RateModificationsResponse / Issues / Issue / @status | 1 | enum | The type of issue encountered. Valid values are |
Examples
Success
The following is a response to a successfully processed RateModifications message.
<?xml version="1.0" encoding="UTF-8"?>
<RateModificationsResponse timestamp="2023-05-22T16:20:00-04:00"
id="12345678"
partner="partner_key">
<Success/>
</RateModificationsResponse>
Issues
The following is a response to a RateModifications message not processed due to errors.
<?xml version="1.0" encoding="UTF-8"?>
<RateModificationsResponse timestamp="2023-05-22T16:20:00-04:00"
id="12345678"
partner="partner_key">
<Issues>
<Issue code="1001" status="error">Example</Issue>
</Issues>
</RateModificationsResponse>