Update rates
URL: /v1/hotels/rate-plans/update
Goals
To update in the extranet and in the website the rates for the room/rate plan requested of a specific property in a set period of time.
Notes
The API is deliberately pedantic in making the distinctions detailed below to make sure both the hotel and channel manager know what values they are updating.
Charge Type Code
This is a known source of confusion between the hotel and the channel manager. The charge type code and the pricing structure are tied to the hotel configuration. Specifically, the charge type code selects one of the two pricing models supported by Despegar.com: Per person, per night and per room, per night. The pricing structure matches the pricing model.
Taxes
Another source of confusion. The hotel selects whether they'd like to indicate rates
including taxes or not. You can obtain this setting from Get Hotel Information
(look for the TaxPolicy element).
Depending on this value, you need to use either @AmountAfterTax or @AmountBeforeTax.
Message Detail
Input: OTA_HotelRatePlanNotifRQ
| Element | Number | Description |
|---|---|---|
| OTA_HotelRatePlanNotifRQ | 1 | Root element |
| OTA_HotelRatePlanNotifRQ / RatePlans | 1 | Rate plan collection |
| @HotelCode | 1 | The unique hotel code |
| RatePlans / RatePlan | All the information of an specific rate plan. | |
| @RatePlanCode | 1 | Identifier code of the rate plan |
| @ChargeTypeCode | 1 | Indicates how the rate is applied. Refer to OpenTravel Charge Type (CHG) code table. Despegar.com supports only the following values: "19": Per room per night "21": Per person per night |
| @CurrencyCode | 1 | ISO 4217 currency code. Example: USD, ARG, EUR. |
| RatePlan / Rates | ||
| Rates / Rate | ||
| @InvCode | 1 | Room identifier code. |
| @Start | 1 | Data request start date (inclusive). |
| @End | 1 | Data request end date (exclusive). |
| Rate / BaseByGuestAmts | 1 | |
| BaseByGuestAmts / BaseByGuestAmt | 1 | Base charge for the indicated number of guests for an age code classification. |
| @NumberOfGuests | 1 | The number of guests linked to the rate. |
| @AgeQualifyingCode | 1 | Define the age range of the rate. Refer to OpenTravel Age Qualifying Code (AQC) code table. Possible values: "10": Adult "8": Child "7": Infant "3": Baby |
| @AmountBeforeTax | 1 | The new rate without taxes. |
| @AmountAfterTax | 1 | The new rate with taxes. |
| Rate / AdditionalGuestAmounts | 0..1 | |
| AdditionalGuestAmounts / AdditionalGuestAmount | 1 | The amount charged by the extra guest is related to the age group of the base guest. |
| @MaxAdditionalGuests | 1 | Maximum additional guests. |
| @AgeQualifyingCode | 1 | Define the age range of the rate. Refer to OpenTravel Age Qualifying Code (AQC) code table. Possible values: "10": Adult (Only for per room per night) "8": Child "7": Infant "3": Baby |
| @Amount | 1 | Additional amount |
Output: OTA_HotelRatePlanNotifRS
| Element | Number | Description |
|---|---|---|
| OTA_HotelRatePlanNotifRS | 1 | Root element |
| @Version | 1 | Service version |
| OTA_HotelRatePlanNotifRS / Success | 0..1 | It is present if the request has been processed successfully. The error node is not present if this node appears. |
| OTA_HotelRatePlanNotifRS / Errors | 0..1 | Contains an error list in case the request was not processed correctly. |
| Errors / Error | 1..n | If there is an error node then there has to exist at least one error node. The element will contain the error text. |
| @Type | 1 | Error type |
| @Code | 0..1 | Error code |
| OTA_HotelRatePlanNotifRS / Warnings | 0..1 | Contains a warning list in case the request was processed partially. |
| Warnings / Warning | 1..n | If there is a warnings node then there has to exist at least one warning node. The element will contain the warning text. |
| @Type | 1 | Warning type |
| @Code | 0..1 | Warning code |