OTA_HotelBookingRuleNotifRQ / OTA_HotelBookingRuleNotifRS

The OTA_HotelBookingRulelNotif messages are used to update the following elements in the Hotel-Spider system:

  • Restrictions per date


Every time the hotel's stay restrictions (Booking rules) have been changed inside the third party software, the changes (and only the changes) should be transfered to Hotel-Spider. As this is a "notif" message, it implies that the third party software client pushes the information to the Hotel-Spider servers.

Endpoints

Example request and response

OTA_HotelBookingRuleNotifRQ request
<OTA_HotelBookingRuleNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_HotelBookingRuleNotifRQ.xsd" Version="1.000" Target="Test" TimeStamp="2011-08-01T12:05:56">
  <POS>
    <Source>
      <RequestorID ID="USERNAME" MessagePassword="PASSWORD"></RequestorID>
    </Source>
  </POS>
  <RuleMessages HotelCode="HOTELCODE" HotelName="HOTELNAME">
    <RuleMessage>
      <StatusApplicationControl InvCode="00P5519245316dc1" RatePlanCode="00P551924536469f" Start="2015-08-24" End="2015-08-24"/>
      <BookingRules>
        <BookingRule MinAdvancedBookingOffset="P4D"  MaxAdvancedBookingOffset="P4D"> 
          <LengthsOfStay>
            <LengthOfStay MinMaxMessageType="MinLOS" Time="2"/>
            <LengthOfStay MinMaxMessageType="MaxLOS" Time="4"/>
          </LengthsOfStay>
          <RestrictionStatus Restriction="Arrival" Status="Open"/>
        </BookingRule>
        <BookingRule>
          <RestrictionStatus Restriction="Departure" Status="Close"/>
        </BookingRule>
        <BookingRule>
          <RestrictionStatus Restriction="Master" Status="Open"/>
        </BookingRule>
      </BookingRules>
    </RuleMessage>
  </RuleMessages>
</OTA_HotelBookingRuleNotifRQ>
OTA_HotelBookingRuleNotifRS response
<OTA_HotelBookingRuleNotifRS xmlns="http://www.opentravel.org/OTA/2003/05" schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_HotelBookingRuleNotifRQ.xsd" TimeStamp="2015-11-17T14:45:54+01:00" Target="Test" Version="1.0" CorrelationID="00Q564b2f91e1bf6">
  <Success />
</OTA_HotelBookingRuleNotifRS>


Request structure

OTA_HotelBookingRuleNotifRQ

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), RuleMessages


RuleMessages

Parent: OTA_HotelBookingRuleNotifRQ

Mandatory: yes

Attributes:

NameMandatoryDescription
HotelCodeNo

The Hotel-Spider hotel ID which you are updating

By default our system will search for the HotelCode attribute. Should this not be available, our system will try to identify the hotel based on the room ID as this is uniquely linked to one hotel.

HotelNameNoThis attribute can be used for readability.

Child elements: RuleMessage


RuleMessage

Parent: RuleMessages

Mandatory: yes

Attributes: None

Children: StatusApplicationControl, BookingRules


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 updated.

InvCode/InvTypeCode/RoomIDNo

The Hotel-Spider room ID which you are updating

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 which you are updating.

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.

Children: None

Determining which level to update

All the parameters transmitted will apply on the level determined by the combination of the InvCode and/or RatePlanCode attributes.

  • No InvCode nor RatePlanCode: The update will be for the hotel level
  • InvCode is given but no RatePlanCode: The update will be for the room level
  • RatePlanCode is given but no InvCode: The update will be for the rate plan level
  • InvCode and RatePlanCode are given: The update will be for the product level


BookingRules

Parent: RuleMessage

Mandatory: yes

Attributes: None

Children: BookingRule


BookingRule

Parent: BookingRules

Mandatory: yes

Attributes: 


NameMandatoryDescription
MinAdvancedBookingOffsetNo

Minimum amount of time between the reservation and the arrival

(this value is transfered using the ISO 8601 Duration notation)

e.g. if the value is "P2D" for a given date, no reservation can be made in the last 2 days before the arrival date

Possible values are:

  • P0DT0H (none)
  • P0DT6H (same day 18h00)
  • P0DT9H (same day 15h00)
  • P0DT12H (Same day 12h00)
  • P0DT15H (Same day 09h00)
  • P1DT6H (One day 18h00)
  • P1DT9H (One day 15h00)
  • P1DT12H (One day 12h00)
  • P1DT15H (One day 09h00)
  • P2D (Two days)
  • P2DT6H (Two days 18h00)
  • P2DT12H (Two days 12h00)
  • P2DT15H (Two days 09h00)
  • P3D (3 days)
  • P4D (4 days)
  • P5D (5 days)
  • P6D (6 days)
  • P1W (1 week)
  • P2W (2 weeks)
  • P3W (3 weeks)
  • P1M (1 month)
  • P2M (2 months)
  • P3M (3 months)
  • P4M (4 months)
  • P5M (5 months)
  • P6M (6 months)
  • P1Y (1 year)
MinAdvancedBookingOffsetNo

maximum amount of time between the reservation and the arrival

(this value is transfered using the ISO 8601 Duration notation)

e.g. if the value is "P6M" for a given date, no reservation can be made before the last 6 months before the arrival date


Possible values are:

  • P1Y (1 year)
  • P6M (6 months)
  • P5M (5 months)
  • P4M (4 months)
  • P3M (3 months)
  • P2M (2 months)
  • P1M (1 month)
  • P3W (3 weeks)
  • P2W (2 weeks)
  • P1W (1 week)
  • P6D (6 days)
  • P5D (5 days)
  • P4D (4 days)
  • P3D (3 days)
  • P2DT15H (Two days 09h00)
  • P2DT12H (Two days 12h00)
  • P2DT6H (Two days 18h00)
  • P2D (Two days)
  • P1DT15H (One day 09h00)
  • P1DT12H (One day 12h00)
  • P1DT9H (One day 15h00)
  • P1DT6H (One day 18h00)
  • P0DT15H (Same day 09h00)
  • P0DT12H (Same day 12h00)
  • P0DT9H (same day 15h00)
  • P0DT6H (same day 18h00)
  • P0DT0H (none)

Children: LengthsOfStay, RestrictionStatus


LengthsOfStay

Parent: BookingRule

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

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
  • SetMinLOS
  • RemoveMinLOS
  • ForwardMinStay
  • SetForwardMinStay
  • RemoveForwardMinStay
  • MaxLOS
  • SetMaxLOS
  • RemoveMaxLOS
  • ForwardMaxStay
  • SetForwardMaxStay
  • RemoveForwardMayStay
  • FixedLOS

Children: None


RestrictionStatus

Parent: BookingRule

Mandatory: No

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

No Restriction attribute provided

Should no Restriction attribute be provided (Only a Status attribute), the update will be interpreted as-if Restriction="Master" was provided.


Response structure

OTA_HotelBookingRuleNotifRS

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: Success, Warnings 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