Transmission of the booking rules based on OTA_HotelBookingRuleNotifRQ / OTA_HotelBookingRuleNotifRS

Transmission of the booking rules based on OTA_HotelBookingRuleNotifRQ / OTA_HotelBookingRuleNotifRS

he OTA_HotelBookingRuleNotifRQ / OTA_HotelBookingRuleNotifRS can be used to transmit the booking rules on all the agreed levels. A request will be send every time a change in the booking rules has been detected on our system.

 

Determining the level for the booking rules

To indicate for which level (hotel, room type, rate plan or product) a booking rule should be applied, the attributes InvCode and/or RatePlanCode are used. In the Hotel-Spider system all the booking rules can be managed on all 4 levels. However a specific booking rule will only be accessible if at least one connected channel requires it.

Use case 1: Booking rules on hotel level
<StatusApplicationControl Start="2015-09-24" End="2015-10-14" />
Use case 2: Booking rules on room type level
<StatusApplicationControl Start="2015-09-24" End="2015-10-14" InvCode="00P5519245316dc1" />
Use case 3: Booking rules on rate plan level
<StatusApplicationControl Start="2015-09-24" End="2015-10-14" RatePlanCode="00P551924536469f" />
Use case 4: Booking rules on product level
<StatusApplicationControl Start="2015-09-24" End="2015-10-14" InvCode="00P5519245316dc1" RatePlanCode="00P551924536469f" />

The Hotel-Spider system will send the following request

Use case: OTA_HotelBookingRuleNotifRQ for room-based pricing
<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="MASTERUSERNAME" MessagePassword="MASTERPASSWORD" Type="13"></RequestorID> </Source> </POS> <RuleMessages HotelCode="HOTELCODE"> <RuleMessage> <StatusApplicationControl InvCode="00P5519245316dc1" RatePlanCode="00P551924536469f" Start="2015-08-24" End="2015-08-24"/> <BookingRules> <BookingRule> <LengthsOfStay> <LengthOfStay MinMaxMessageType="SetMinLOS" Time="2"/> <LengthOfStay MinMaxMessageType="SetMaxLOS" Time="4"/> </LengthsOfStay> <RestrictionStatus Restriction="Arrival" Status="Open"/> </BookingRule> <BookingRule> <RestrictionStatus Restriction="Departure" Status="Close"/> </BookingRule> <BookingRule> <RestrictionStatus Restriction="Master" Status="Open"/> </BookingRule> <BookingRule> <RestrictionStatus MinAdvancedBookingOffset="P2W" MaxAdvancedBookingOffset="P1Y"/> </BookingRule> </BookingRules> </RuleMessage> </RuleMessages> </OTA_HotelBookingRuleNotifRQ>

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"

EchoToken

Yes

This string should be returned in the response

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

Yes

The ID of the hotel on the online booking system

Child elements: RuleMessage

 

RuleMessage

Parent: RuleMessages

Mandatory: yes

Attributes: None

Child elements: StatusApplicationControl, BookingRules

 

StatusApplicationControl

Parent: RuleMessage

Mandatory: yes

Attributes:

Name

Mandatory

Description

InvCode

No

The ID of the room type on the online booking system

RatePlanCode

No

The ID of the rate plan on the online booking system

Start

Yes

The format will respect ISO 8601 2015-11-16

End

Yes

The format will respect ISO 8601 2015-11-16

Mon

No

Does this update apply to a Monday

Tue

No

Does this update apply to a Tuesday

Weds

No

Does this update apply to a Wednesday

Thur

No

Does this update apply to a Thursday

Fri

No

Does this update apply to a Friday

Sat

No

Does this update apply to a Saturday

Sun

No

Does this update apply to a Friday

Child elements: None

 

BookingRules

Parent: RuleMessage

Mandatory: yes

Attributes: None

Child elements: BookingRule

 

BookingRule

Parent: BookingRules

Mandatory: yes

Attributes: None

Child elements: LengthsOfStay, RestrictionStatus

 

LengthsOfStay

Parent: BookingRule

Mandatory: yes

Attributes: None

Child elements: LengthOfStay

 

LengthOfStay

Parent: LengthsOfStay

Mandatory: yes

Attributes:

Name

Mandatory

Description

Time

Yes

The new price to apply on the online booking system

MinMaxMessageType

Yes

Possible values are:

  • SetMinLOS

  • RemoveMinLOS

  • SetMaxLOS

  • RemoveMaxLOS

  • SetForwardMinStay

  • RemoveForwardMinStay

  • SetForwardMaxStay

  • RemoveForwardMaxStay

Child elements: None

 

RestrictionStatus

Parent: AvailStatusMessage

Mandatory: yes

Attributes:

Name

Mandatory

Description

Restriction

No

Possible values:

  • Master

  • Arrival

  • Departure

Status

No

Possible values are:

  • Open

  • Close

MinAdvancedBookingOffset

No

Value is given using the ISO 8601 Duration notation

MaxAdvancedBookingOffset

No

Value is given using the ISO 8601 Duration notation

Child elements: None

 

The online booking system must respond with either of the following formats

 

Use case 1. OTA_HotelBookingRuleNotifRS confirmation
<OTA_HotelBookingRuleNotifRS xmlns="http://www.opentravel.org/OTA/2003/05" TimeStamp="2015-11-25T17:21:43+01:00" EchoToken="" CorrelationID="" Version="1.0"> <Success /> </OTA_HotelBookingRuleNotifRS>
Use case 2. OTA_HotelBookingRuleNotifRS error notification
<OTA_HotelBookingRuleNotifRS xmlns="http://www.opentravel.org/OTA/2003/05" TimeStamp="2015-11-25T17:21:43+01:00" EchoToken="" CorrelationID="" Version="1.0"> <Errors> <Error Code="3008" Type="13" Status="NotProcessed" ShortText="Processing error" Tag="/">Hotel ID invalid</Error> </Errors> </OTA_HotelBookingRuleNotifRS>

 

Response structure

OTA_HotelBookingRuleNotifRS

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"

EchoToken

Yes

This string should be returned in the response

Child elements: Success, Errors

 

Success

Parent: OTA_HotelBookingRuleNotifRS

Mandatory: no

Attributes: None

Child elements: None

 

 

Errors

Parent: OTA_HotelBookingRuleNotifRS

Mandatory: No

Attributes: None

Child elements: Error

 

Error

Parent: Errors

Mandatory: yes

Attributes:

Name

Mandatory

Description

Code

Yes

The unique error code assigned by the online booking system

Type

Yes

 

Status

Yes

Possible values are:

  • NotProcessed

  • Incomplete

  • Complete

  • Unknown

ShortText

Yes

A short textual explanation of the error. Max 64 characters.

Tag

Yes

Indicates which element and/or attribute provoked the error to occur

Child elements: None

 

Transmitting specific rules

These rules are not the OTA booking rules, there are specifics for each partner. 

 

Use case 4: Booking rules on product level
<AdditionalRules> <AdditionalRule AdditionalRule="Cancellation">Free</AdditionalRule> </AdditionalRules>

The Hotel-Spider system will send the following request

Use case: OTA_HotelBookingRuleNotifRQ for room-based pricing
<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="MASTERUSERNAME" MessagePassword="MASTERPASSWORD" Type="13"></RequestorID> </Source> </POS> <RuleMessages HotelCode="HOTELCODE"> <RuleMessage> <StatusApplicationControl InvCode="00P5519245316dc1" RatePlanCode="00P551924536469f" Start="2015-08-24" End="2015-08-24"/> <BookingRules> <BookingRule> <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> <BookingRule> <AdditionalRules> <AdditionalRule AdditionalRule="Cancellation">Free</AdditionalRule> </AdditionalRules> </BookingRule> </BookingRules> </RuleMessage> </RuleMessages> </OTA_HotelBookingRuleNotifRQ>


Structure

AdditionalRules

Parent: OTA_HotelBookingRuleNotifRQ

Mandatory: No

Attributes: None

Child elements: AdditionalRule

 

AdditionalRule

Parent: AdditionalRules

Mandatory: yes

Attributes:

Name

Mandatory

Description

AdditionalRule

Yes

Rule name

 

 

 

 

Value : string

Child elements: None