Channel Managers · API docs

Update Rate Examples

Example requests are editable. Click to start editing.

For Hotel 484034

This hotel has pricing type "per person, per night" and includes taxes.

Request
<OTA_HotelRatePlanNotifRQ xmlns="http://www.despegar.com/hotels/ota/v1/" Version="1.0">
  <RatePlans HotelCode="484034">
    <RatePlan ChargeTypeCode="21" CurrencyCode="SRD" RatePlanCode="12">
      <Rates>
        <Rate Start="${year}-09-25" End="${year}-12-12" InvCode="844228">
          <BaseByGuestAmts>
            <BaseByGuestAmt AmountAfterTax="105" NumberOfGuests="1" AgeQualifyingCode="10" />
            <BaseByGuestAmt AmountAfterTax="165" NumberOfGuests="2" AgeQualifyingCode="10" />
            <BaseByGuestAmt AmountAfterTax="225" NumberOfGuests="3" AgeQualifyingCode="10" />
            <BaseByGuestAmt AmountAfterTax="295" NumberOfGuests="4" AgeQualifyingCode="10" />
          </BaseByGuestAmts>
          <AdditionalGuestAmounts>
            <AdditionalGuestAmount Amount="80" AgeQualifyingCode="8" />
            <AdditionalGuestAmount Amount="70" AgeQualifyingCode="7" />
          </AdditionalGuestAmounts>
        </Rate>
      </Rates>
    </RatePlan>
  </RatePlans>
</OTA_HotelRatePlanNotifRQ>
Response
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRatePlanNotifRS xmlns="http://www.despegar.com/hotels/ota/v1/" Version="v1" CorrelationID="despegar" TransactionIdentifier="5fc21415-75c3-4483-8cb5-fb9f014a651e">
    <Success/>
</OTA_HotelRatePlanNotifRS>

Top

Wrong Change Type

Since this hotel has pricing type "per room, per night", charge type "21" should be specified.

Request
<OTA_HotelRatePlanNotifRQ xmlns="http://www.despegar.com/hotels/ota/v1/" Version="1.0">
  <RatePlans HotelCode="484034">
    <RatePlan ChargeTypeCode="19" CurrencyCode="SRD" RatePlanCode="2">
      <Rates>
        <Rate Start="${year}-12-11" End="${year}-12-12" InvCode="16482">
          <BaseByGuestAmts>
            <BaseByGuestAmt AmountAfterTax="105" NumberOfGuests="1" AgeQualifyingCode="10" />
            <BaseByGuestAmt AmountAfterTax="165" NumberOfGuests="2" AgeQualifyingCode="10" />
            <BaseByGuestAmt AmountAfterTax="225" NumberOfGuests="3" AgeQualifyingCode="10" />
            <BaseByGuestAmt AmountAfterTax="295" NumberOfGuests="4" AgeQualifyingCode="10" />
          </BaseByGuestAmts>
          <AdditionalGuestAmounts>
            <AdditionalGuestAmount Amount="80" AgeQualifyingCode="8" />
            <AdditionalGuestAmount Amount="70" AgeQualifyingCode="7" />
          </AdditionalGuestAmounts>
        </Rate>
      </Rates>
    </RatePlan>
  </RatePlans>
</OTA_HotelRatePlanNotifRQ>
Response
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRatePlanNotifRS xmlns="http://www.despegar.com/hotels/ota/v1/" Version="v1" CorrelationID="despegar" TransactionIdentifier="d21e8b71-c1b7-444c-a737-1f5249205336">
    <Success/>
    <Warnings>
        <Warning Type="3" Code="W20005">The charge type used in ratePlan: 57 is incorrect. Please check this is in /v1/hotels/hotel-info/get or the extranet</Warning>
    </Warnings>
</OTA_HotelRatePlanNotifRS>

Top

Wrong Currency

Request
<OTA_HotelRatePlanNotifRQ xmlns="http://www.despegar.com/hotels/ota/v1/" Version="1.0">
  <RatePlans HotelCode="484034">
    <RatePlan ChargeTypeCode="21" CurrencyCode="USD" RatePlanCode="2">
      <Rates>
        <Rate Start="${year}-12-11" End="${year}-12-12" InvCode="16482">
          <BaseByGuestAmts>
            <BaseByGuestAmt AmountAfterTax="105" NumberOfGuests="1" AgeQualifyingCode="10" />
            <BaseByGuestAmt AmountAfterTax="165" NumberOfGuests="2" AgeQualifyingCode="10" />
            <BaseByGuestAmt AmountAfterTax="225" NumberOfGuests="3" AgeQualifyingCode="10" />
            <BaseByGuestAmt AmountAfterTax="295" NumberOfGuests="4" AgeQualifyingCode="10" />
          </BaseByGuestAmts>
          <AdditionalGuestAmounts>
            <AdditionalGuestAmount Amount="80" AgeQualifyingCode="8" />
            <AdditionalGuestAmount Amount="70" AgeQualifyingCode="7" />
          </AdditionalGuestAmounts>
        </Rate>
      </Rates>
    </RatePlan>
  </RatePlans>
</OTA_HotelRatePlanNotifRQ>
Response
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRatePlanNotifRS xmlns="http://www.despegar.com/hotels/ota/v1/" Version="v1" CorrelationID="despegar" TransactionIdentifier="faf85070-ac1a-46e5-81ba-059ea09924c0">
    <Success/>
    <Warnings>
        <Warning Type="3" Code="W20006">The currency used in ratePlan: 12 is incorrect. You are trying to change rates with a different currency. Please check this is in /v1/hotels/rate-plans/list or the extranet</Warning>
    </Warnings>
</OTA_HotelRatePlanNotifRS>

Top

Invalid Update Since Rate Plan is Linked

Request
<OTA_HotelRatePlanNotifRQ xmlns="http://www.despegar.com/hotels/ota/v1/" Version="1.0">
  <RatePlans HotelCode="484034">
    <RatePlan ChargeTypeCode="21" CurrencyCode="SRD" RatePlanCode="3">
      <Rates>
        <Rate Start="${year}-12-11" End="${year}-12-12" InvCode="16482">
          <BaseByGuestAmts>
            <BaseByGuestAmt AmountAfterTax="105" NumberOfGuests="1" AgeQualifyingCode="10" />
          </BaseByGuestAmts>
        </Rate>
      </Rates>
    </RatePlan>
  </RatePlans>
</OTA_HotelRatePlanNotifRQ>
Response
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRatePlanNotifRS xmlns="http://www.despegar.com/hotels/ota/v1/" Version="v1" CorrelationID="despegar" TransactionIdentifier="0cdeff87-bc19-4f5c-84ab-619edb36e429">
    <Success/>
    <Warnings>
        <Warning Type="3" Code="W20021">The ratePlan: 58 is a rate plan link and it does not allow to update rates. Use the linkedRatePlan to do this. Please check this is in /v1/hotels/rate-plans/list or the extranet</Warning>
    </Warnings>
</OTA_HotelRatePlanNotifRS>

Top