OTA_HotelBookingRuleRQ / OTA_HotelBookingRuleRS

The OTA_BookingRuleRQ messages are used to read booking rules/restrictions in the Hotel-Spider system, for the four levels :

  • Booking rules at Hotel level
  • Booking rules at Room level
  • Booking rules at RatePlan level
  • Booking rules at SellableProduct level

Endpoints

Example request and response

Requesting booking rules at Hotel level :

OTA_HotelAvailNotifRQ request
<OTA_HotelBookingRuleRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opentravel.org/OTA/2003/05" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_HotelBookingRuleRQ.xsd" TimeStamp="2012-10-05T14:20:50" Target="Test" Version="1.005">
  <POS>
    <Source>
      <RequestorID Type="5" ID="USERNAME" MessagePassword="PASSWORD"></RequestorID>
    </Source>
  </POS>
  <RuleMessage HotelCode="HOTELCODE">
	<StatusApplication Start="2017-04-01" End="2017-04-12" />
  </RuleMessage>
</OTA_HotelBookingRuleRQ>

Requesting booking rules at Room level :

OTA_HotelAvailNotifRQ request
<OTA_HotelBookingRuleRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opentravel.org/OTA/2003/05" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_HotelBookingRuleRQ.xsd" TimeStamp="2012-10-05T14:20:50" Target="Test" Version="1.005">
  <POS>
    <Source>
      <RequestorID Type="5" ID="USERNAME" MessagePassword="PASSWORD"></RequestorID>
    </Source>
  </POS>
  <RuleMessage HotelCode="HOTELCODE">
	<StatusApplication Start="2017-04-01" End="2017-04-12" InvCode="ROOMID" />
  </RuleMessage>
</OTA_HotelBookingRuleRQ>

Requesting booking rules at RatePlan level :

OTA_HotelAvailNotifRQ request
<OTA_HotelBookingRuleRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opentravel.org/OTA/2003/05" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_HotelBookingRuleRQ.xsd" TimeStamp="2012-10-05T14:20:50" Target="Test" Version="1.005">
  <POS>
    <Source>
      <RequestorID Type="5" ID="USERNAME" MessagePassword="PASSWORD"></RequestorID>
    </Source>
  </POS>
  <RuleMessage HotelCode="HOTELCODE">
	<StatusApplication Start="2017-04-01" End="2017-04-12" RatePlanCode="RATEPLANID" />
  </RuleMessage>
</OTA_HotelBookingRuleRQ>

Requesting booking rules at SellableProduct level :

OTA_HotelAvailNotifRQ request
<OTA_HotelBookingRuleRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opentravel.org/OTA/2003/05" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_HotelBookingRuleRQ.xsd" TimeStamp="2012-10-05T14:20:50" Target="Test" Version="1.005">
  <POS>
    <Source>
      <RequestorID Type="5" ID="USERNAME" MessagePassword="PASSWORD"></RequestorID>
    </Source>
  </POS>
  <RuleMessage HotelCode="HOTELCODE">
	<StatusApplication Start="2017-04-01" End="2017-04-12" InvCode="ROOMID" RatePlanCode="RATEPLANID" />
  </RuleMessage>
</OTA_HotelBookingRuleRQ>

Request structure

OTA_HotelBookingRuleRQ

Parent: None (Root element)

Mandatory: yes

Attributes:

NameMandatoryDescription
TimeStampYesThe format should respect the ISO 8601 2015-11-16T22:23:48+00:00
TargetYes

When sending updates to the staging environment "Test" must be used.

When sending updates to the production environment "Production" must be used.

VersionYesThe default value should be "1.000"

Child elements: POS (when using POS authentication. See Authentication methods for more information), AvailStatusMessages


RuleMessage

Parent: OTA_BookingRuleNotifRQ

Mandatory: yes

Attributes:

NameMandatoryDescription
HotelCodeYes

Children: StatusApplicationControl


StatusApplicationControl

Parent: RuleMessage

Mandatory: yes

Attributes:

NameMandatoryDescription
StartYesThe format should respect the ISO 8601 2015-11-16
EndYes

The format should respect the ISO 8601 2015-11-17

The End date is inclusive meaning that it will also be retrieved.

InvCode/InvTypeCode/RoomIDNo

The Hotel-Spider room ID

By default our system will search for the InvCode attribute. Should you have been using InvTypeCode in a previous development (for example: OTA version of the Booking.com interface ), we can configure our interface to ignore InvCode and work with InvTypeCode. The same goes for the RoomID attribute.

RatePlanCode/RatePlanType/RatePlanIDNo

The Hotel-Spider rate ID

By default our system will search for the RatePlanCode atttribute. Should you have been using RatePlanType in a previous development, we can configure our interface to ignore RatePlanCode and work with RatePlanType. The same goes for the RatePlanID attribute.

Determining which level to update

  • No InvCode nor RatePlanCode: return the list of booking rules applied at the hotel level
  • InvCode is given but no RatePlanCode: return the list of booking rules applied at the room level
  • RatePlanCode is given but no InvCode: return the list of booking rules applied at the rate plan level
  • InvCode and RatePlanCode are given: return the list of booking rules applied at the product level


Response structure


<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelBookingRuleRS xmlns="http://www.opentravel.org/OTA/2003/05" TimeStamp="2017-03-24T16:39:05+01:00" CorrelationID="00Q58d53d99269fe" Version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_HotelBookingRuleRS.xsd">
  <RuleMessage HotelCode="HOTELCODE">
    <StatusApplication Start="2017-04-01" End="2017-04-12" InvTypeCode="ROOMID">
    <BookingRules>
      <BookingRule Start="2017-04-01" End="2017-04-02">
        <RestrictionStatus Restriction="Master" Status="Close">
        <RestrictionStatus Restriction="Arrival" Status="Open">
        <RestrictionStatus Restriction="Departure" Status="Open">
        <LengthsOfStay ArrivalDateBased="0">
          <LengthOfStay MinMaxMessageType="MinLOS" Time="1">
          <LengthOfStay MinMaxMessageType="MaxLOS" Time="0">
        </LengthsOfStay>
        <LengthsOfStay ArrivalDateBased="1">
          <LengthOfStay MinMaxMessageType="MinLOS" Time="1">
          <LengthOfStay MinMaxMessageType="MaxLOS" Time="0">
        </LengthsOfStay>
        <TPA_Extensions>
          <BookingChannels>
            <BookingChannel BookingChannelID="16" BookingChannelName="Reconline">
              <Rules>
                <Rule Name="ReconlineCancel">0</Rule>
              </Rules>
            </BookingChannel>
            <BookingChannel BookingChannelID="3" BookingChannelName="Booking">
              <Rules>
                <Rule Name="BookingMinimumContractedRooms">0</Rule>
              </Rules>
            </BookingChannel>
            <BookingChannel BookingChannelID="6" BookingChannelName="Expedia">
              <Rules>
                <Rule Name="ExpediaBaseAllotment">-1</Rule>
              </Rules>
            </BookingChannel>
          </BookingChannels>
        </TPA_Extensions>
      </BookingRule>
      <BookingRule Start="2017-04-03" End="2017-04-12">
        <RestrictionStatus Restriction="Master" Status="Open">
        <RestrictionStatus Restriction="Arrival" Status="Open">
        <RestrictionStatus Restriction="Departure" Status="Open">
        <LengthsOfStay>
          <LengthOfStay MinMaxMessageType="ForwardMinStay" Time="1">
          <LengthOfStay MinMaxMessageType="ForwardMaxStay" Time="0">
          <LengthOfStay MinMaxMessageType="MinLOS" Time="1">
          <LengthOfStay MinMaxMessageType="MaxLOS" Time="0">
          <LengthOfStay MinMaxMessageType="FixedLOS" Time="0">
        </LengthsOfStay>
        <TPA_Extensions>
          <BookingChannels>
            <BookingChannel BookingChannelID="16" BookingChannelName="Reconline">
              <Rules>
                <Rule Name="ReconlineCancel">0</Rule>
              </Rules>
            </BookingChannel>
            <BookingChannel BookingChannelID="3" BookingChannelName="Booking">
              <Rules>
                <Rule Name="BookingMinimumContractedRooms">0</Rule>
              </Rules>
            </BookingChannel>
            <BookingChannel BookingChannelID="6" BookingChannelName="Expedia">
              <Rules>
                <Rule Name="ExpediaBaseAllotment">-1</Rule>
              </Rules>
            </BookingChannel>
          </BookingChannels>
        </TPA_Extensions>
      </BookingRule>
    </BookingRules>
  </RuleMessage>
  <Success></Success>
</OTA_HotelBookingRuleRS>


OTA_HotelBookingRuleRS

Parent: None (Root element)

Mandatory: yes

Attributes:

NameMandatoryDescription
TimeStampYesThe format will respect the ISO 8601 2015-11-16T22:23:48+00:00
TargetYesThe same value, used in the request, will be returned.
VersionYesThe value wil be "1.000"

Child elements: SuccessWarnings and Errors

Success

Parent: OTA Response root element

Mandatory: No

Attributes: None

Child elements: None


Warnings

Parent: OTA Response root element

Mandatory: No

Attributes: None

Child elements: None


Warning

Parent: Warnings

Mandatory: yes (If Warnings is provided)

Attributes:

NameMandatoryDescription
TypeYesOTA EWT type code

Code

YesOTA ERR error code
StatusYesPossible values: NotProcessed | Incomplete | Complete | Unknown
ShortTextYesTextual explanation of the error.

Child elements: None


Errors

Parent: OTA Response root element

Mandatory: No

Attributes: None

Child elements: Error


Error

Parent: Error

Mandatory: yes (If Errors is provided)

Attributes:

NameMandatoryDescription
TypeYesOTA EWT type code

Code

YesOTA ERR error code
StatusYesPossible values: NotProcessed | Incomplete | Complete | Unknown
ShortTextYesTextual explanation of the error.

Child elements: None


RuleMessage

Parent: OTA_HotelBookingRuleNotifRS

Mandatory: yes

Multiple : no

Attributes:

NameMandatoryDescription
HotelCodeYes

Children: BookingRules, StatusApplicationControl


StatusApplicationControl

Parent: RuleMessage

Mandatory: yes

Multiple : no

Attributes:

NameMandatoryDescription
StartYesThe format should respect the ISO 8601 2015-11-16
EndYes

The format should respect the ISO 8601 2015-11-17

The End date is inclusive meaning that it will also be updated.

InvCode/InvTypeCode/RoomIDNo

The Hotel-Spider room ID

RatePlanCode/RatePlanType/RatePlanIDNo

The Hotel-Spider rate ID


BookingRules

Parent: RuleMessage

Mandatory: yes

Multiple : no

Children: BookingRule


BookingRule

Parent: BookingRules

Mandatory: yes

Multiple : yes

Attributes:

NameMandatoryDescription
StartYesThe format should respect the ISO 8601 2015-11-16
EndYes

The format should respect the ISO 8601 2015-11-17

The End date is inclusive.

InvCode/InvTypeCode/RoomIDNo

The Hotel-Spider room ID

RatePlanCode/RatePlanType/RatePlanIDNo

The Hotel-Spider rate ID

Children: RestrictionStatus, LenghtsOfStay, TPA_Extensions


LengthsOfStay

Parent: BookingRule

Multiple : Yes

Mandatory: No

Attributes:

NameMandatoryDescription
ArrivalDateBasedNoCan be set to 0 or 1. If this boolean value is set to 1, the restriction set has an effect only on the arrival day of a booking, whereas the '0' value may affect a search for availability or reservation on all the dates that the query covers. When left out, '0' is assumed.

Child elements: LengthOfStay


LengthOfStay

Parent: LengthsOfStay

Multiple : Yes

Mandatory: yes (If LengthsOfStay is provided)

Attributes:

NameMandatoryDescription
TimeYes

The integer value that will determine which Minimum Length Of Stay or which Maximum Length Of Stay will be applied.

"1"is the default value for a MinLOS or a ForwardMinStay. This is equal to transmitting "RemoveMinLOS" or "RemoveForwardMinStay".

"0" is the default value for a MaxLOS or a ForwardMaxStay. This is equal to transmitting "RemoveMaxLOS" or "RemoveForwardMaxStay".

MinMaxMessageTypeYes

Possible values are:

  • MinLOS
  • MaxLOS

Children: None


RestrictionStatus

Parent: BookingRule

Mandatory: No

Multiple : Yes

Attributes:

NameMandatoryDescription
StatusYes

Possible values are "Open" or "Close".

RestrictionNo

Possible values are "Master", "Arrival" or "Departure"

When set to "Master", depending on the value of the Status attribute AND the level identification via the StatusApplicationControl element, this will either open/close on Hotel level, on room level, on rate plan level or on product level.

When set to "Arrival", depending on the value of the Status attribute AND the level identification via the StatusApplicationControl element, this will either prevent (Status="Close") or allow (Status="Open") a guest to book with this date as arrival.

When set to "Departure", depending on the value of the Status attribute AND the level identification via the StatusApplicationControl element, this will either prevent (Status="Close") or allow (Status="Open") a guest to book with this date as departure.

Children: None


TPA_Extensions

Describe the booking rules applied to connected channels

Parent: BookingRule

Mandatory: No

Attributes: None

Children: BookingChannels


BookingChannels

Parent: TPA_Extension

Mandatory: No

Attributes: None

Children: BookingChannel


BookingChannel

Parent: BookingChannels

Multiple : Yes

Mandatory: No

Attributes:

NameMandatoryDescription
BookingChannelIDYes

Hotel-Spider channel ID

BookingChannelNameYes

Channel name

Children: BookingChannel


Rules

Parent: BookingChannel

Mandatory: No

Attributes: None

Children: Rule


Rule

Parent: Rules

Mandatory: No

Attributes:

NameMandatoryDescription
NameYes

Specific booking rule name

Node value:

MandatoryDescription
Yes

the value of the specific booking rules

Children: none