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
- HTTP RAW POST
- SOAP
- JSON (We recommend using OTA via XML, if you want to use JSON interface please contact us)
Example request and response
<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 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:
Name | Mandatory | Description |
---|---|---|
TimeStamp | Yes | The format should respect the ISO 8601 2015-11-16T22:23:48+00:00 |
Target | Yes | When sending updates to the staging environment "Test" must be used. When sending updates to the production environment "Production" must be used. |
Version | Yes | The 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:
Name | Mandatory | Description |
---|---|---|
HotelCode | No | 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. |
HotelName | No | This 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:
Name | Mandatory | Description |
---|---|---|
Start | Yes | The format should respect the ISO 8601 2015-11-16 |
End | Yes | The format should respect the ISO 8601 2015-11-17 The End date is inclusive meaning that it will also be updated. |
InvCode/InvTypeCode/RoomID | No | 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/RatePlanID | No | 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:
Name | Mandatory | Description |
---|---|---|
MinAdvancedBookingOffset | No | 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:
|
MinAdvancedBookingOffset | No | 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:
|
Children: LengthsOfStay, RestrictionStatus
LengthsOfStay
Parent: BookingRule
Mandatory: No
Attributes:
Name | Mandatory | Description |
---|---|---|
ArrivalDateBased | No | Can 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:
Name | Mandatory | Description |
---|---|---|
Time | Yes | 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". |
MinMaxMessageType | Yes | Possible values are:
|
Children: None
RestrictionStatus
Parent: BookingRule
Mandatory: No
Attributes:
Name | Mandatory | Description |
---|---|---|
Status | Yes | Possible values are "Open" or "Close". |
Restriction | No | 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
Response structure
OTA_HotelBookingRuleNotifRS
Parent: None (Root element)
Mandatory: yes
Attributes:
Name | Mandatory | Description |
---|---|---|
TimeStamp | Yes | The format will respect the ISO 8601 2015-11-16T22:23:48+00:00 |
Target | Yes | The same value, used in the request, will be returned. |
Version | Yes | The 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:
Name | Mandatory | Description |
---|---|---|
Type | Yes | OTA EWT type code |
Code | Yes | OTA ERR error code |
Status | Yes | Possible values: NotProcessed | Incomplete | Complete | Unknown |
ShortText | Yes | Textual 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:
Name | Mandatory | Description |
---|---|---|
Type | Yes | OTA EWT type code |
Code | Yes | OTA ERR error code |
Status | Yes | Possible values: NotProcessed | Incomplete | Complete | Unknown |
ShortText | Yes | Textual explanation of the error. |
Child elements: None