Channel Managers · API docs

Get Rate Examples

Example requests are editable. Click to start editing.

Get Rates for Rate Plan 12 for Hotel 484034

Request
<OTA_HotelRatePlanRQ xmlns="http://www.despegar.com/hotels/ota/v1/" Version="2">
  <RatePlans>
    <RatePlan>
      <DateRange Start="${year}-01-03" End="${year}-01-05" />
      <RatePlanCandidates>
        <RatePlanCandidate RatePlanCode="12" />
      </RatePlanCandidates>
      <HotelRef HotelCode="484034" />
    </RatePlan>
  </RatePlans>
</OTA_HotelRatePlanRQ>
Response
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRatePlanRS xmlns="http://www.despegar.com/hotels/ota/v1/" Version="v1" CorrelationID="despegar">
    <Success/>
    <RatePlans HotelCode="484034">
        <RatePlan CurrencyCode="USD" ChargeTypeCode="19" RatePlanCode="12">
            <Rates>
                <Rate Start="2019-09-25" End="2019-12-24" InvCode="844228">
                    <BaseByGuestAmts>
                        <BaseByGuestAmt AmountBeforeTax="400.0" NumberOfGuests="3" AgeQualifyingCode="10"/>
                    </BaseByGuestAmts>
                    <AdditionalGuestAmounts/>
                </Rate>
            </Rates>
            <Description>
                <Text>Standard rate</Text>
            </Description>
        </RatePlan>
    </RatePlans>
</OTA_HotelRatePlanRS>

Top

Wrong Dates

Request
<OTA_HotelRatePlanRQ xmlns="http://www.despegar.com/hotels/ota/v1/" Version="2">
  <RatePlans>
    <RatePlan>
      <DateRange Start="${year}/01/03" End="${year}/01/05" />
      <RatePlanCandidates>
        <RatePlanCandidate RatePlanCode="2" />
      </RatePlanCandidates>
      <HotelRef HotelCode="484034" />
    </RatePlan>
  </RatePlans>
</OTA_HotelRatePlanRQ>
Response
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRatePlanRS xmlns="http://www.despegar.com/hotels/ota/v1/" Version="v1" CorrelationID="despegar">
    <Errors>
        <Error Type="7" Code="E40004" NodeList="">cvc-datatype-valid.1.2.1: '2019/01/03' is not a valid value for 'date'.. Please consult documentation regarding the correct message format at https://channel.despegar.com</Error>
    </Errors>
</OTA_HotelRatePlanRS>

Top

Missing Rate Plan Code

Request
<OTA_HotelRatePlanRQ xmlns="http://www.despegar.com/hotels/ota/v1/" Version="2">
  <RatePlans>
    <RatePlan>
      <DateRange Start="${year}-01-03" End="${year}-01-05" />
      <HotelRef HotelCode="484034" />
    </RatePlan>
  </RatePlans>
</OTA_HotelRatePlanRQ>
Response
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRatePlanRS xmlns="http://www.despegar.com/hotels/ota/v1/" Version="v1" CorrelationID="despegar">
    <Errors>
        <Error Type="10" Code="E40002" NodeList="/OTA_HotelRatePlanRQ/RatePlans/RatePlan/DateRange/@Start  /OTA_HotelRatePlanRQ/RatePlans/RatePlan/RatePlanCandidates/RatePlanCandidate/@RatePlanCode">Required field missing</Error>
    </Errors>
</OTA_HotelRatePlanRS>

Top