OTA_HotelAvailNotifRQ

You'll use this message to tell us about rates and restrictions at a given hotel.

Below is perhaps the simplest example of an OTA_HotelAvailNotifRQ message:

It contains just one AvailStatusMessage with a BookingLimit attribute denoting the number of rooms available for the given StatusApplicationControl.

The StatusApplicationControl informs us that this availability integer should be applied to the first 14 days of April 2018 for the room type with the code 927df75b-a9fe-4d58-b3fd-2542a61f36ec

<OTA_HotelAvailNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2018-03-11T09:30:47+08:00" EchoToken="21ab4d9f-57fb-4744-a4f8-70ddbdaa6a20">
  <AvailStatusMessages HotelCode="90dd0e6d-438a-477e-aeb6-0292c1e780c3">
    <AvailStatusMessage BookingLimit="1">
      <StatusApplicationControl Start="2018-04-01" End="2018-04-14" InvTypeCode="927df75b-a9fe-4d58-b3fd-2542a61f36ec"/>
    </AvailStatusMessage>
  </AvailStatusMessages>
</OTA_HotelAvailNotifRQ>

Minimum Stays

Let's crank up the complexity a little by introducing a minimum stay.

Within the AvailStatusMessage and after the StatusApplicationControl, we add a LengthsOfStay element with one LengthOfStay element that has an attribute of MinMaxMessageType with a value of SetMinLOS and a Time attribute with a value of 2.

If you're thinking this will set a minimum stay of 2 nights to the given StatusApplicationControl – you'd be right. What's also necessary to note is that the StatusApplicationControl now requires a RatePlanCode because at Staylists we store minimum stays against a rate and not a room.

<OTA_HotelAvailNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2018-03-11T09:30:47+08:00" EchoToken="21ab4d9f-57fb-4744-a4f8-70ddbdaa6a20">
  <AvailStatusMessages HotelCode="90dd0e6d-438a-477e-aeb6-0292c1e780c3">
    <AvailStatusMessage BookingLimit="1">
      <StatusApplicationControl Start="2018-04-01" End="2018-04-14" InvTypeCode="927df75b-a9fe-4d58-b3fd-2542a61f36ec" RatePlanCode="fb00e505-d228-490a-a7c6-29e4a7ffb538"/>
      <LengthsOfStay>
        <LengthOfStay MinMaxMessageType="SetMinLOS" Time="2"/>
      </LengthsOfStay>
    </AvailStatusMessage>
  </AvailStatusMessages>
</OTA_HotelAvailNotifRQ>

Closing Rates

Now let's say you want to close those rates for the time being. All that's required is another element entitled RestrictionStatus with a Status attribute set to Close.

<OTA_HotelAvailNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2018-03-11T09:30:47+08:00" EchoToken="21ab4d9f-57fb-4744-a4f8-70ddbdaa6a20">
  <AvailStatusMessages HotelCode="90dd0e6d-438a-477e-aeb6-0292c1e780c3">
    <AvailStatusMessage BookingLimit="1">
      <StatusApplicationControl Start="2018-04-01" End="2018-04-14" InvTypeCode="927df75b-a9fe-4d58-b3fd-2542a61f36ec" RatePlanCode="fb00e505-d228-490a-a7c6-29e4a7ffb538"/>
      <LengthsOfStay>
        <LengthOfStay MinMaxMessageType="SetMinLOS" Time="2"/>
      </LengthsOfStay>
      <RestrictionStatus Status="Close"/>
    </AvailStatusMessage>
  </AvailStatusMessages>
</OTA_HotelAvailNotifRQ>

Opening Rates

No prizes for guessing that the Status attribute can be set to Open to open previously closed rates.

<OTA_HotelAvailNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2018-03-11T09:30:47+08:00" EchoToken="21ab4d9f-57fb-4744-a4f8-70ddbdaa6a20">
  <AvailStatusMessages HotelCode="90dd0e6d-438a-477e-aeb6-0292c1e780c3">
    <AvailStatusMessage BookingLimit="1">
      <StatusApplicationControl Start="2018-04-01" End="2018-04-14" InvTypeCode="927df75b-a9fe-4d58-b3fd-2542a61f36ec" RatePlanCode="fb00e505-d228-490a-a7c6-29e4a7ffb538"/>
      <LengthsOfStay>
        <LengthOfStay MinMaxMessageType="SetMinLOS" Time="2"/>
      </LengthsOfStay>
      <RestrictionStatus Status="Open"/>
    </AvailStatusMessage>
  </AvailStatusMessages>
</OTA_HotelAvailNotifRQ>

Closed to Arrival

If you want to prevent guests arriving on a given day, you can use the StatusApplicationControl to specify a given day. Then you can add a Restriction attribute with a value of Arrival to your RestrictionStatus element.

<OTA_HotelAvailNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2018-03-11T09:30:47+08:00" EchoToken="21ab4d9f-57fb-4744-a4f8-70ddbdaa6a20">
  <AvailStatusMessages HotelCode="90dd0e6d-438a-477e-aeb6-0292c1e780c3">
    <AvailStatusMessage BookingLimit="1">
      <StatusApplicationControl Start="2018-04-01" End="2018-04-14" InvTypeCode="927df75b-a9fe-4d58-b3fd-2542a61f36ec" RatePlanCode="fb00e505-d228-490a-a7c6-29e4a7ffb538" Mon="false" Tue="true" Weds="true" Thur="true" Fri="false" Sat="true" Sun="true"/>
      <LengthsOfStay>
        <LengthOfStay MinMaxMessageType="SetMinLOS" Time="2"/>
      </LengthsOfStay>
      <RestrictionStatus Restriction="Arrival" Status="Close"/>
    </AvailStatusMessage>
  </AvailStatusMessages>
</OTA_HotelAvailNotifRQ>

Closed to Departure

Again, this one's hardly a long mental leap.

<OTA_HotelAvailNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2018-03-11T09:30:47+08:00" EchoToken="21ab4d9f-57fb-4744-a4f8-70ddbdaa6a20">
  <AvailStatusMessages HotelCode="90dd0e6d-438a-477e-aeb6-0292c1e780c3">
    <AvailStatusMessage BookingLimit="1">
      <StatusApplicationControl Start="2018-04-01" End="2018-04-14" InvTypeCode="927df75b-a9fe-4d58-b3fd-2542a61f36ec" RatePlanCode="fb00e505-d228-490a-a7c6-29e4a7ffb538" Mon="false" Tue="true" Weds="true" Thur="true" Fri="false" Sat="true" Sun="true"/>
      <LengthsOfStay>
        <LengthOfStay MinMaxMessageType="SetMinLOS" Time="2"/>
      </LengthsOfStay>
      <RestrictionStatus Restriction="Departure" Status="Close"/>
    </AvailStatusMessage>
  </AvailStatusMessages>
</OTA_HotelAvailNotifRQ>

Multiple Updates

While the XML should only contain one AvailStatusMessages element (and thus requests can only update availability and rates at one hotel), it can contain many AvailStatusMessage elements with different StatusApplicationControl elements. Thus a room could be updated for a large number of date ranges. Or several rooms could be updated for a similar date range.