Channel Managers · API docs

Update Availability and Restriction Examples

Example requests are editable. Click to start editing.

Update Only Availability For Hotel 484034

Request
<OTA_HotelAvailNotifRQ xmlns="http://www.despegar.com/hotels/ota/v1/" Version="1.0">
  <AvailStatusMessages HotelCode="484034">
    <AvailStatusMessage BookingLimit="10" BookingLimitMessageType="SetLimit">
      <StatusApplicationControl Start="${year}-12-01" End="${year}-12-02" InvCode="844228" />
    </AvailStatusMessage>
  </AvailStatusMessages>
</OTA_HotelAvailNotifRQ>
Response
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelAvailNotifRS xmlns="http://www.despegar.com/hotels/ota/v1/" Version="v1" CorrelationID="despegar" TransactionIdentifier="d6e6726d-5059-4f18-9c1a-c3dd058865a7">
    <Success/>
</OTA_HotelAvailNotifRS>

Top

Update Some Restrictions For Hotel 484034

Request
<OTA_HotelAvailNotifRQ xmlns="http://www.despegar.com/hotels/ota/v1/" Version="1.0">
  <AvailStatusMessages HotelCode="484034">
    <AvailStatusMessage>
      <StatusApplicationControl Start="${year}-12-01" End="${year}-12-02" RatePlanCode="11" InvCode="844228" />
      <LengthsOfStay>
        <LengthOfStay Time="3" TimeUnit="Day" MinMaxMessageType="MinLOS" />
        <LengthOfStay Time="30" TimeUnit="Day" MinMaxMessageType="MaxLOS" />
      </LengthsOfStay>
    </AvailStatusMessage>
  </AvailStatusMessages>
</OTA_HotelAvailNotifRQ>
Response
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelAvailNotifRS xmlns="http://www.despegar.com/hotels/ota/v1/" Version="v1" CorrelationID="despegar" TransactionIdentifier="72780b5f-75ac-4238-8176-782cf4b8ac1a">
    <Success/>
</OTA_HotelAvailNotifRS>

Top

Update Availability and All Possible Restrictions For Hotel 484034

Request
<OTA_HotelAvailNotifRQ xmlns="http://www.despegar.com/hotels/ota/v1/" Version="1.0">
  <AvailStatusMessages HotelCode="484034">
    <AvailStatusMessage BookingLimit="950" BookingLimitMessageType="SetLimit">
      <StatusApplicationControl Start="${year}-12-01" End="${year}-12-10" InvCode="844228" />
    </AvailStatusMessage>
    <AvailStatusMessage>
      <StatusApplicationControl Start="${year}-12-01" End="${year}-12-02" RatePlanCode="12" InvCode="844228" />
      <LengthsOfStay>
        <LengthOfStay Time="3" TimeUnit="Day" MinMaxMessageType="MinLOS" />
        <LengthOfStay Time="30" TimeUnit="Day" MinMaxMessageType="MaxLOS" />
      </LengthsOfStay>
      <RestrictionStatus Restriction="Arrival" Status="Close" />
    </AvailStatusMessage>
    <AvailStatusMessage>
      <StatusApplicationControl Start="${year}-12-01" End="${year}-12-02" RatePlanCode="12" InvCode="844228" />
      <RestrictionStatus Restriction="Departure" Status="Close" />
    </AvailStatusMessage>
  </AvailStatusMessages>
</OTA_HotelAvailNotifRQ>
Response
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelAvailNotifRS xmlns="http://www.despegar.com/hotels/ota/v1/" Version="v1" CorrelationID="despegar" TransactionIdentifier="a8eb7fd9-83eb-4219-8537-b7fd64a9aac4">
    <Success/>
</OTA_HotelAvailNotifRS>

Top

Set Stop-Sell for Room 844228 For Hotel 484034

Request
<OTA_HotelAvailNotifRQ xmlns="http://www.despegar.com/hotels/ota/v1/" Version="1.0">
  <AvailStatusMessages HotelCode="484034">
    <AvailStatusMessage>
      <StatusApplicationControl Start="${year}-12-01" End="${year}-12-02" RatePlanCode="12" InvCode="844228" />
      <RestrictionStatus Status="Close"/>
    </AvailStatusMessage>
  </AvailStatusMessages>
</OTA_HotelAvailNotifRQ>
Response
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelAvailNotifRS xmlns="http://www.despegar.com/hotels/ota/v1/" Version="v1" CorrelationID="despegar" TransactionIdentifier="86580e68-ee22-457f-bbe9-6b0435860623">
    <Success/>
</OTA_HotelAvailNotifRS>

Top

Unknown Room Code

Request
<OTA_HotelAvailNotifRQ xmlns="http://www.despegar.com/hotels/ota/v1/" Version="1.0">
  <AvailStatusMessages HotelCode="484034">
    <AvailStatusMessage BookingLimit="10" BookingLimitMessageType="SetLimit">
      <StatusApplicationControl Start="${year}-12-01" End="${year}-12-02" InvCode="1" />
    </AvailStatusMessage>
  </AvailStatusMessages>
</OTA_HotelAvailNotifRQ>
Response
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelAvailNotifRS xmlns="http://www.despegar.com/hotels/ota/v1/" Version="v1" CorrelationID="despegar" TransactionIdentifier="d5cd26a2-c6df-44c7-915c-2b246d547178">
    <Success/>
    <Warnings>
        <Warning Type="3" Code="W40004">Availability update for room 1 failed with error: Requested resource has not been found. Could not find room filtering by id=1</Warning>
    </Warnings>
</OTA_HotelAvailNotifRS>

Top

Unknown Rate Plan Code

Request
<OTA_HotelAvailNotifRQ xmlns="http://www.despegar.com/hotels/ota/v1/" Version="1.0">
  <AvailStatusMessages HotelCode="484034">
    <AvailStatusMessage>
      <StatusApplicationControl Start="${year}-12-01" End="${year}-12-02" RatePlanCode="NOT_EXIST" InvCode="74959" />
      <LengthsOfStay>
        <LengthOfStay Time="3" TimeUnit="Day" MinMaxMessageType="MinLOS" />
        <LengthOfStay Time="30" TimeUnit="Day" MinMaxMessageType="MaxLOS" />
      </LengthsOfStay>
    </AvailStatusMessage>
  </AvailStatusMessages>
</OTA_HotelAvailNotifRQ>
Response
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelAvailNotifRS xmlns="http://www.despegar.com/hotels/ota/v1/" Version="v1" CorrelationID="despegar" TransactionIdentifier="662ce9ac-ad6c-4330-8b90-72389224f270">
    <Success/>
    <Warnings>
        <Warning Type="3" Code="W20001">The ratePlan: NOT_EXIST does not exist. Please check this is in /v1/hotels/rate-plans/list or the extranet</Warning>
        <Warning Type="3" Code="W20003">The room rate for: (RoomCode , ratePlanCode) (74959 , NOT_EXIST) does not exist. Please check this is in /v1/hotels/availability/list or the extranet</Warning>
    </Warnings>
</OTA_HotelAvailNotifRS>

Top

Invalid Update of Inherited Restrictions

Request
<OTA_HotelAvailNotifRQ xmlns="http://www.despegar.com/hotels/ota/v1/" Version="1.0">
  <AvailStatusMessages HotelCode="484034">
    <AvailStatusMessage>
      <StatusApplicationControl Start="${year}-12-01" End="${year}-12-02" RatePlanCode="28" InvCode="74959" />
      <RestrictionStatus Restriction="Arrival" Status="Open"/>
    </AvailStatusMessage>
    <AvailStatusMessage>
      <StatusApplicationControl Start="${year}-12-03" End="${year}-12-04" RatePlanCode="38" InvCode="74961" />
      <LengthsOfStay>
        <LengthOfStay Time="3" TimeUnit="Day" MinMaxMessageType="MinLOS" />
        <LengthOfStay Time="30" TimeUnit="Day" MinMaxMessageType="MaxLOS" />
      </LengthsOfStay>
      <RestrictionStatus Restriction="Departure" Status="Open"/>
    </AvailStatusMessage>
  </AvailStatusMessages>
</OTA_HotelAvailNotifRQ>
Response
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelAvailNotifRS xmlns="http://www.despegar.com/hotels/ota/v1/" Version="v1" CorrelationID="despegar" TransactionIdentifier="285c0a33-b50b-48d8-af46-ac102154a968">
    <Success/>
    <Warnings>
        <Warning Type="3" Code="W20001">The ratePlan: 28 does not exist. Please check this is in /v1/hotels/rate-plans/list or the extranet</Warning>
        <Warning Type="3" Code="W20003">The room rate for: (RoomCode , ratePlanCode) (844228 , 28) does not exist. Please check this is in /v1/hotels/availability/list or the extranet</Warning>
        <Warning Type="3" Code="W20001">The ratePlan: 38 does not exist. Please check this is in /v1/hotels/rate-plans/list or the extranet</Warning>
        <Warning Type="3" Code="W20003">The room rate for: (RoomCode , ratePlanCode) (844228 , 38) does not exist. Please check this is in /v1/hotels/availability/list or the extranet</Warning>
    </Warnings>
</OTA_HotelAvailNotifRS>

Top