Availability and Restrictions
Effective Tours API will receive updates for availability and restrictions via the OTA_HotelAvailNotifRQ
message. Effective Tours API 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 the availability and restrictions for one room type for a single hotel. Specifically:
- Room availability
- Stop sell or ‘close out’ of a room
- Minimum / 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="2010-01-01" End="2010-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="2010-01-01" End="2010-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="2010-01-01" End="2010-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 Effective Tours API room types linked to the same InvTypeCode/RatePlanCode
combination and the update will be applied to all room types found with matching values.
Setting Availability
Setting the availability of a room type is achieved by including the AvailStatusMessage/BookingLimit
attribute. The value of BookingLimit
should be a positive integer value.
The Channel Manager expects ‘Availability’ to be set at a ‘Room Type/Category’ Level (InvTypeCode
Level). So for example, if you have a ‘Superior’ room category with ‘SUP’ as the InvTypeCode
, all ‘Room Rates’ connected to the ‘Superior’ category will have the same shared pool of ‘Availability’ and will be updatable on the ‘SUP’ InvTypeCode
.
Set Availability
<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 BookingLimit="10">
<StatusApplicationControl Start="2010-01-01" End="2010-01-14" InvTypeCode="SUP"/>
</AvailStatusMessage>
</AvailStatusMessages>
</OTA_HotelAvailNotifRQ>
NOTE: After a reservation is delivered over Effective Tours API into your integrated system (PMS, CRS etc), the integrated system MUST immediately return the new reduced ‘Availability’ value back via the Inventory API. Also, The Channel Manager will not process ‘Availability’ changes for ‘Cancel’ or ‘Modify’ status reservations. For modified or cancelled reservations, it is expected that the integrated PMS will pass back ‘Availability’ changes once the modification or cancellation message has been processed. More Information about ‘Modifications’ and ‘Cancellations’ can be found in the Reservation API documentation
Setting Stop Sells
Stop sell updates will be sent through using the RestrictionStatus node. Below is a set of scenarios on how to send restrictions.
Restriction Type | How it will be sent |
---|---|
Room is stop sold | <RestrictionStatus Status=”Close” /> |
Room is opened for sale | <RestrictionStatus Status=”Open” /> |
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
<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="2010-01-01" End="2010-01-14" InvTypeCode="SUP" RatePlanCode="GLD"/>
<LengthsOfStay>
<LengthOfStay MinMaxMessageType="SetMinLOS" Time="2"/>
</LengthsOfStay>
</AvailStatusMessage>
</AvailStatusMessages>
</OTA_HotelAvailNotifRQ>
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
<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="2010-01-01" End="2010-01-14" InvTypeCode="SUP" RatePlanCode="GLD"/>
<LengthsOfStay>
<LengthOfStay MinMaxMessageType="SetMaxLOS" Time="7"/>
</LengthsOfStay>
</AvailStatusMessage>
</AvailStatusMessages>
</OTA_HotelAvailNotifRQ>
Remove MaxLOS
<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="2010-01-01" End="2010-01-14" InvTypeCode="SUP" RatePlanCode="GLD"/>
<LengthsOfStay>
<LengthOfStay MinMaxMessageType="SetMaxLOS" Time="999"/>
</LengthsOfStay>
</AvailStatusMessage>
</AvailStatusMessages>
</OTA_HotelAvailNotifRQ>
OTA_HotelAvailNotifRQ Specification
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 |
@Version | 1 | Always 1 |
OTA_HotelAvailNotifRQ / POS / Source / RequestorID | 1 | This identifies the system which is sending the update for Availability/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 availability messages |
@HotelCode | 1 | The code for the property whose availability is being updated |
AvailStatusMessages / AvailStatusMessage | 1..n | Contains the availability messages. If there is more than one room type to update, there should be one AvailStatusMessage per room type. |
@BookingLimit | 0..1 | The number of rooms available. This value must account for number rooms already booked/reserved in your PMS. |
AvailStatusMessage / StatusApplicationControl | 1 | Contains specific info about the room availability |
@Start | 1 | The start date for which the availability update is being set |
@End | 1 | The end date for which the availability update is being set. The end date is inclusive. End date cannot be more than 750 days in the days in the future. |
@RatePlanCode | 0..1 | This is the rate plan whose availability is being updated. Must enter RatePlanCode and/or InvTypeCode to identify room |
@InvTypeCode | 0..1 | Identifies the room type for which the availability 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 availability 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. |
Restriction | 0..1 | Stop Sell value |
@Status | 1 | “Open” OR “Close” |
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
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://www.opentravel.org/OTA/2003/05">
<SOAP-ENV:Body>
<tns:OTA_HotelAvailNotifRS Version="1.0" TimeStamp="2005-08-01T09:30:47+0000" EchoToken="echo-abc123">
<tns:Success></tns:Success>
</tns:OTA_HotelAvailNotifRS>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example of Error Response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://www.opentravel.org/OTA/2003/05">
<SOAP-ENV:Body>
<tns:OTA_HotelAvailNotifRS Version="1.0" TimeStamp="2005-08-01T09:30:47+0000" EchoToken="echo-abc123">
<tns:Errors>
<tns:Error Type="3" Code="392">Cannot finder hotelier ABC</Error>
</tns:Errors>
</tns:OTA_HotelAvailNotifRS>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
OTA_HotelAvailNotifRS Specification
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: Authorization 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 | 1 | Mandatory if Error present. |
500: Can’t free enough rooms for setting availability |
—- —- —- —- —- —- —- — — — — —
Back to API Documentation