Channel Managers · API docs

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:

  1. The charge type code.
  2. The pricing structure.
  3. 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

ElementNumberDescription
OTA_HotelRatePlanRQ1Root element
OTA_HotelRatePlanRQ / RatePlans1Rate plan collection
RatePlans / RatePlan1Defines the criteria to identify the rate plan to be returned.
RatePlan / DateRange0..1A date or date range for the search criteria.
@Start1Data request start date (inclusive).
@End1Data request end date (exclusive).
RatePlan / RatePlanCandidates1Caveat. This element cannot be repeated in this context, a separate RatePlan element must be issued per each rate plan to get rates for.
RatePlanCandidates / RatePlanCandidate1
@RatePlanCode1Identifier code of the rate plan

Output: OTA_HotelRatePlanRS

ElementNumberDescription
OTA_HotelRatePlanRS1Root element
OTA_HotelRatePlanRQ / RatePlans1Rate plan collection
@HotelCode1The code of the hotel to be queried.
RatePlans / RatePlanAll the information of a specific rate plan.
@RatePlanCode1Identifier code of the rate plan.
@ChargeTypeCode1Indicates 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
@CurrencyCode1ISO 4217 currency code. Example: USD, ARG, EUR.
RatePlan / Rates
Rates / Rate
@InvCode1The unique room code.
@Start1Start date (inclusive).
@End1End date (exclusive).
Rate / BaseByGuestAmts1
BaseByGuestAmts / BaseByGuestAmt1Base charge for the indicated number of guests for an age code classification.
@NumberOfGuests0..1The number of guests linked to the rate.
@AgeQualifyingCode0..1Defines 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
@AmountBeforeTax1The rate. This field is used if the hotel doesn't upload its prices with taxes included
@AmountAfterTax1The rate. This field is used if the hotel uploads its prices with taxes included
Rate / AdditionalGuestAmounts0..1
AdditionalGuestAmounts / AdditionalGuestAmount1Additional 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.
@AgeQualifyingCode1Define 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
@Amount1Additional amount
RatePlan / Description
Description / TextRate plan name