Get rates
URL: /v1/hotels/rate-plans/get
Goals
To return rates for a date range, for all or selected room-rates.
Notes
When you want to update rates, you need to, basically, send back the same structure you get from this message with the new values.
You need to take note of three very important things:
- The charge type code.
- The pricing structure.
- Rates including taxes or not.
See the notes for updating rates for more details.
Don't forget to see the examples. Hotel 638049 uses per person, per night, while hotel 282445 uses per room, per night pricing models.
Pricing Models
These sample Rate elements show how each pricing model manifests itself in the response of this message.
For each model, the hotel can also configure extra charges.
Per room, per night — Standard
<Rate Start="2016-10-01" End="2016-10-02" InvCode="193047">
<BaseByGuestAmts>
<BaseByGuestAmt AmountBeforeTax="122.0" NumberOfGuests="1" AgeQualifyingCode="10"/>
</BaseByGuestAmts>
<AdditionalGuestAmounts/>
</Rate>
Per room, per night — With Extra Charges
<Rate Start="2016-10-01" End="2016-10-02" InvCode="193048">
<BaseByGuestAmts>
<BaseByGuestAmt AmountBeforeTax="144.0" NumberOfGuests="2" AgeQualifyingCode="10"/>
</BaseByGuestAmts>
<AdditionalGuestAmounts>
<AdditionalGuestAmount Amount="11.0" AgeQualifyingCode="7"/>
<AdditionalGuestAmount Amount="22.0" AgeQualifyingCode="8"/>
<AdditionalGuestAmount Amount="33.0" AgeQualifyingCode="10"/>
</AdditionalGuestAmounts>
</Rate>
Per person, per night — Standard
<Rate Start="2016-10-01" End="2016-10-02" InvCode="193045">
<BaseByGuestAmts>
<BaseByGuestAmt AmountAfterTax="211.0" NumberOfGuests="1" AgeQualifyingCode="10"/>
<BaseByGuestAmt AmountAfterTax="222.0" NumberOfGuests="2" AgeQualifyingCode="10"/>
<BaseByGuestAmt AmountAfterTax="233.0" NumberOfGuests="3" AgeQualifyingCode="10"/>
<BaseByGuestAmt AmountAfterTax="244.0" NumberOfGuests="4" AgeQualifyingCode="10"/>
</BaseByGuestAmts>
<AdditionalGuestAmounts/>
</Rate>
Per person, per night — With Extra Charges
<Rate Start="2016-10-01" End="2016-10-02" InvCode="193046">
<BaseByGuestAmts>
<BaseByGuestAmt AmountAfterTax="211.0" NumberOfGuests="1" AgeQualifyingCode="10"/>
<BaseByGuestAmt AmountAfterTax="222.0" NumberOfGuests="2" AgeQualifyingCode="10"/>
<BaseByGuestAmt AmountAfterTax="233.0" NumberOfGuests="3" AgeQualifyingCode="10"/>
<BaseByGuestAmt AmountAfterTax="244.0" NumberOfGuests="4" AgeQualifyingCode="10"/>
</BaseByGuestAmts>
<AdditionalGuestAmounts>
<AdditionalGuestAmount Amount="11.0" AgeQualifyingCode="7"/>
<AdditionalGuestAmount Amount="22.0" AgeQualifyingCode="8"/>
</AdditionalGuestAmounts>
</Rate>
Message Detail
Input: OTA_HotelRatePlanRQ
| Element | Number | Description |
|---|---|---|
| OTA_HotelRatePlanRQ | 1 | Root element |
| OTA_HotelRatePlanRQ / RatePlans | 1 | Rate plan collection |
| RatePlans / RatePlan | 1 | Defines the criteria to identify the rate plan to be returned. |
| RatePlan / DateRange | 0..1 | A date or date range for the search criteria. |
| @Start | 1 | Data request start date (inclusive). |
| @End | 1 | Data request end date (exclusive). |
| RatePlan / RatePlanCandidates | 1 | Caveat. This element cannot be repeated in this context, a separate RatePlan element must be issued per each rate plan to get rates for. |
| RatePlanCandidates / RatePlanCandidate | 1 | |
| @RatePlanCode | 1 | Identifier code of the rate plan |
Output: OTA_HotelRatePlanRS
| Element | Number | Description |
|---|---|---|
| OTA_HotelRatePlanRS | 1 | Root element |
| OTA_HotelRatePlanRQ / RatePlans | 1 | Rate plan collection |
| @HotelCode | 1 | The code of the hotel to be queried. |
| RatePlans / RatePlan | All the information of a 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 | The unique room code. |
| @Start | 1 | Start date (inclusive). |
| @End | 1 | End date (exclusive). |
| Rate / BaseByGuestAmts | 1 | |
| BaseByGuestAmts / BaseByGuestAmt | 1 | Base charge for the indicated number of guests for an age code classification. |
| @NumberOfGuests | 0..1 | The number of guests linked to the rate. |
| @AgeQualifyingCode | 0..1 | Defines the age range of the rate. Refer to OpenTravel Age Qualifying Code (AQC) code table. For this instance, Despegar.com supports only the following value: "10": Adult |
| @AmountBeforeTax | 1 | The rate. This field is used if the hotel doesn't upload its prices with taxes included |
| @AmountAfterTax | 1 | The rate. This field is used if the hotel uploads its prices with taxes included |
| Rate / AdditionalGuestAmounts | 0..1 | |
| AdditionalGuestAmounts / AdditionalGuestAmount | 1 | Additional charges collection according to the age classification of additional guests. The amount charged by the extra guest is related to the age group of the base guest. |
| @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 |
| RatePlan / Description | ||
| Description / Text | Rate plan name |