RMS Restrictions




pmsXchange will receive updates for restrictions via the OTA_HotelAvailNotifRQ message. pmsXchange will process the updates and respond with the OTA_HotelAvailNotifRS as a receipt of success or failure to process the request.

OTA_HotelAvailNotifRQ

The OTA_HotelAvailNotifRQ  message can be used to update restrictions for one room type for a single hotel. Specifically:

  • Stop sell or 'close out' of a room

  • Closed to arrival

  • Closed to departure

  • Minimum stays

  • Maximum stays

Each OTA_HotelAvailNotifRQ message must contain a single AvailStatusMessages element to indicate the hotel to update using the AvailStatusMessages/@HotelCode attribute. The AvailStatusMessages/AvailStatusMessage elements will contain the updates to process over a date range. There can be several AvailStatusMessage updates per request, however each request must be limited to one hotel.

The basic structure of the message is as follows:

<OTA_HotelAvailNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2005-08-01T09:30:47+08:00" EchoToken="echo-abc123"> <POS> <Source> <RequestorID Type="22" ID="PMS1"/> </Source> </POS> <AvailStatusMessages HotelCode="HOTEL"> <AvailStatusMessage> <StatusApplicationControl Start="2024-01-01" End="2024-01-14" InvTypeCode="SUP" RatePlanCode="GLD" Mon="0" Tue="0" Weds="0" Thur="0" Fri="1" Sat="1" Sun="1" /> <!-- Content omitted --> </AvailStatusMessage> <AvailStatusMessage> <StatusApplicationControl Start="2024-01-01" End="2024-01-14" InvTypeCode="SUP" RatePlanCode="GLD" Mon="0" Tue="0" Weds="0" Thur="0" Fri="1" Sat="1" Sun="1" /> <!-- Content omitted --> </AvailStatusMessage> <AvailStatusMessage> <StatusApplicationControl Start="2024-01-01" End="2024-01-14" InvTypeCode="SUP" RatePlanCode="GLD" Mon="0" Tue="0" Weds="0" Thur="0" Fri="1" Sat="1" Sun="1" /> <!-- Content omitted --> </AvailStatusMessage> </AvailStatusMessages> </OTA_HotelAvailNotifRQ>

StatusApplicationControl

This element must appear once in each AvailStatusMessage element. The StatusApplicationControl element which is used to specify the room type, rate code and dates for which the update applies.

The dates affected by the update are controlled by the mandatory @Start and @End attributes. Use the Mon, Tue, Wed, Thur, Fri, Sat or Sun attributes to apply the update to specific days of the week. If any of these day of week attributes is present, then they must all be present. For example it is not possible to specify just the Mon and Fri attribute and not include the other 5.

The room type or room types affected by the update are derived by the @InvTypeCode and @RatePlanCode attributes. InvTypeCode is required and RatePlanCode is optional. It is possible to have 1 or more pmsXchange room types linked to the same InvTypeCode/RatePlanCode combination and the update will be applied to all room types found with matching values.

Setting Stop Sells, Closed to Arrival and Closed to Departure

Stop sell, closed to arrival and closed to departure updates will be sent through using the RestrictionStatus node. Below is a set of scenarios on how to send restrictions.

Note that stop sells, closed to arrival and closed to departure can be received separately so their status should be assumed as separate. For example a message which set stop sell will not change the states of closed to arrival and departure.

If you choose to send Stop Sell, CTA and CTD on a Room Level (RatePlanCode not present), then all updates (Open and Close) should follow the same rule.
Same applies if you choose to send the restrictions on a Room Rate Level (InvTypeCode and RatePlanCode present). 
It is not acceptable to send Room level restriction updates, then overlay with Room Rate level updates or vice versa.



Restriction Type

How it will be sent

Restriction Type

How it will be sent

Room is stop sold

<RestrictionStatus Status="Close" />

Room is opened for sale

<RestrictionStatus Status="Open" />

Room is set as closed to arrival

<RestrictionStatus Status="Close" Restriction="Arrival" />

Room is set as open to arrival

<RestrictionStatus Status="Open" Restriction="Arrival" />

Room is set as closed to departure

<RestrictionStatus Status="Close" Restriction="Departure" />

Room is set as open to departure

<RestrictionStatus Status="Open" Restriction="Departure" />

Set Stop Sell
<OTA_HotelAvailNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2005-08-01T09:30:47+08:00" EchoToken="echo-abc123"> <POS> <Source> <RequestorID Type="22" ID="PMS1"/> </Source> </POS> <AvailStatusMessages HotelCode="HOTEL"> <AvailStatusMessage> <StatusApplicationControl Start="2024-01-01" End="2024-01-14" InvTypeCode="SUP" RatePlanCode="GLD"/> <RestrictionStatus Status="Close" /> </AvailStatusMessage> </AvailStatusMessages> </OTA_HotelAvailNotifRQ>


Set Closed to Arrival

<OTA_HotelAvailNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2005-08-01T09:30:47+08:00" EchoToken="echo-abc123"> <POS> <Source> <RequestorID Type="22" ID="PMS1"/> </Source> </POS> <AvailStatusMessages HotelCode="HOTEL"> <AvailStatusMessage> <StatusApplicationControl Start="2024-01-01" End="2024-01-14" InvTypeCode="SUP" RatePlanCode="GLD"/> <RestrictionStatus Restriction="Arrival" Status="Close" /> </AvailStatusMessage> </AvailStatusMessages> </OTA_HotelAvailNotifRQ> 


Set Closed to Departure

One AvailStatusMessage can contain updates for one RestrictionStatus. Below is an example on how to set CTA, CTD and stop sell the room in a single update.

Set Stop Sell, CTA, CTD

Setting Minimum Stay

Setting minimum stay is achieved by including the LengthsOfStay element. This element contains a single LengthOfStay element with mandatory attributes @MinMaxMessageType and @Time. @MinMaxMessageType has a fixed value of "SetMinLOS" and the @Time is the minimum stay period in days. Please make sure that there isn't any conflicting logic between MinLOS and MaxLOS i.e. ensure that hotels cannot set a MinLOS value that is greater than the MaxLOS value for a given date.

Set MinLOS to 2

Setting Maximum Stay

Setting maximum stay is achieved by including the LengthsOfStay element. This element contains a single LengthOfStay element with mandatory attributes @MinMaxMessageType and @Time. @MinMaxMessageType has a fixed value of "SetMaxLOS" and the @Time is the maximum stay period in days. Please make sure that there isn't any conflicting logic between MaxLOS and MinLOS i.e. ensure that hotels cannot set a MaxLOS value that is less than the MinLOS value for a given date.

Set MaxLOS to 7



Remove MaxLOS

Update multiple values example request

As mentioned above, each AvailStatusMessage can set maximum stays, minimum stays and stop sells individually or in combination. This example shows a message updating minimum stays and stop sells in a single AvailStatusMessage:

OTA_HotelAvailNotifRQ Specification

Elements and attributes marked with Number=1 or more will always be sent. 0 means that the element or attribute is optional, while a second numeric value or 'n' indicates the element or attribute can repeat (where n = no limit)"



Element

Number

Description

Element

Number

Description

OTA_HotelAvailNotifRQ

1

Root node

@EchoToken

1

Globally unique identifier for the request, the value will be returned in the response EchoToken.

@TimeStamp

1

Time of the transaction in xml schema dateTime format. Format like yyyy-MM-dd'T'HH:mm:ssZZ, (i.e '2021-03-09T20:05:52+08:00')

@Version

1

Always 1

OTA_HotelAvailNotifRQ / POS / Source / RequestorID

1

This identifies the system which is sending the update for Restrictions. This element must appear in the first Source element.

@Type

1

Fixed at 22 (ESRP)

@ID

1

The ID used will be agreed by the trading partners and remain the same throughout the messages.

OTA_HotelAvailNotifRQ / AvailStatusMessages

1

Contains the restrictions messages

@HotelCode

1

The code for the property whose restrictions is being updated

AvailStatusMessages / AvailStatusMessage

1..n

Contains the restrictions messages. If there is more than one room type to update, there should be one AvailStatusMessage per room type.

AvailStatusMessage / StatusApplicationControl

1

Contains specific info about the room restrictions

@Start

1

The start date for which the restrictions update is being set

@End

1

The end date for which the restrictions update is being set. The end date is inclusive.
End date cannot be more than 750 days in the future. 

@RatePlanCode

0..1

This is the rate plan whose restrictions is being updated. Must enter RatePlanCode and/or InvTypeCode to identify room

@InvTypeCode

0..1

Identifies the room type for which the restrictions is being updated. Must enter RatePlanCode and/or InvTypeCode to identify room

@Mon, Tue, Weds, Thur, Fri, Sat, Sun

0..1

"0" or "1". Optional, if not set all are assumed to be set to true
The day of the week indicators are used to communicate which days of the week the update pertains to. For example, if mon, tue and weds are set to "1", and the other days are set to "0", the restriction will only be updated for Mondays, Tuesdays and Wednesdays.
If one is sent they must all be sent.

LengthsOfStay

0..1

Optional. Used to update minimum and maximum stays.

LengthsOfStay / LengthOfStay

1..2

Mandatory if LengthsOfStay present. One LengthOfStay can be included for each of "SetMinLOS" and "SetMaxLOS".

@MinMaxMessageType

1

Mandatory if LengthsOfStay present. Possible values are "SetMinLOS" or "SetMaxLOS".

@Time

1

Mandatory if LengthsOfStay present. Sets the minimum or maximum number of days allowed for a stay. Time must be a value above 0.

Set Time to 1 to indicate that there is no MinStay requirement, or 999 to indicate no MaxStay requirement.

AvailStatusMessage / RestrictionStatus

0..1

Defines restrictions like Stop Sell, Close To Arrival (CTA), Close To Departure (CTD)

@Status

1

"Open" OR "Close"

@Restriction

0..1

"Arrival" OR "Departure". If not present the Stop Sell value if updated

OTA_HotelAvailNotifRS

This message is returned to the PMS in response to the OTA_HotelAvailNotifRQ message. It notifies whether the OTA_HotelAvailNotifRQ message has been processed successfully.

Example of Success Response
Example of Error Response

OTA_HotelAvailNotifRS Specification

Element

Number

Description

Element

Number

Description

OTA_HotelAvailNotifRQ

1

Root element

@EchoToken

1

Return the EchoToken from the request message.

@Version

1

Current version is 1.0

@TimeStamp

1

Time of the transaction.

OTA_HotelAvailNotifRQ / Success

0..1

Will only be present if the request processed successfully. The Errors node will not be present if the Success node is present

OTA_HotelAvailNotifRQ / Errors

0..1

Contains a list of errors if the request failed to process.

Errors / Error

1..n

Will be at least one node if there is an Errors Node.

@Type

1

Mandatory if Error present.
Any type from the OTA code table for 'Error Warning Type (EWT)' can be used. In particular, the following types are used

3: Biz rule (The business rules for the request message were not met)
4: Authentication error (If username and password are not authenticated)
6: Authorisation error (If authenticated username is not authorized to alter hotel data)
10: Required field missing (If xml does not meet the schema, i.e missing request fields or invalid data types.)

@Code

0..1