Retrieve Room and Rate Codes

 

SiteConnect sends an OTA_HotelAvailRQ to retrieve a list of available rooms and rates.

The connected booking channel must return an OTA_HotelAvailRS with a list of RoomStays with all active room and rate combinations for the hotel.

If your channel does not support Rate Codes, refer to Retrieve Room Codes Only documentation.

 


OTA_HotelAvailRQ

SiteConnect sends an OTA_HotelAvailRQ to retrieve a list of available rooms and rates.

OTA_HotelAvailRQ Example

<OTA_HotelAvailRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2024-01-22T09:30:47+02:00" EchoToken="abc123" AvailRatesOnly="true"> <AvailRequestSegments> <AvailRequestSegment AvailReqType="Room"> <HotelSearchCriteria> <Criterion> <HotelRef HotelCode="HOTEL1"/> </Criterion> </HotelSearchCriteria> </AvailRequestSegment> </AvailRequestSegments> </OTA_HotelAvailRQ>

OTA_HotelAvailRQ Specification

  • Elements and attributes marked with Number 1 or more will always be sent.

  • Number 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

Attribute

Number

Description

Element

Attribute

Number

Description

OTA_HotelAvailRQ

 

1

Root element

 

@EchoToken

1

Globally unique identifier for the request, this will be reflected as an EchoToken in the response. See EchoTokens.

 

@Version

1

Always "1.0"

 

@TimeStamp

1

Time of the transaction in xml schema dateTime format.

Format like yyyy-MM-dd'T'HH:mm:ssZZ (without fraction of a second)
i.e '2022-08-01T09:30:47+02:00'

See TimeStamp.

 

@AvailRatesOnly

1

Always “true”

OTA_HotelAvailRQ / AvailRequestSegments / AvailRequestSegment

 

1..n

A SiteConnect request will only contain one AvailRequestSegment requesting rooms and rates for one single hotel at a time. 

 

@AvailReqType

1

Always “Room”

OTA_HotelAvailRQ / AvailRequestSegments / AvailRequestSegment / HotelSearchCriteria / Criterion / HotelRef

 

1

Identifies the hotel for which information is being requested.

 

@HotelCode

1

The hotel code for which the information is being requested. Hotel code is unique Identifier of the property which the information is being requested.


OTA_HotelAvailRS

The connected channel should return an OTA_HotelAvailRS with a list of RoomStays with all active room and rate combinations for the hotel.

OTA_HotelAvailRS Example

  • One room + rate combination per RoomStay.

  • RoomDescription @Name + RatePlanDescription @Name will be used to identify the room + rate combination. The room + rate combination must be unique for each room rate.

  • The OTA_HotelAvailRS MUST be returned in a SOAP envelope. However, the SOAP Header can be empty.

  • The EchoToken received in the request should be mirrored back in the response.

  • Ensure the 'Content-Type' of your OTA_HotelAvailRS is 'text/xml; charset=utf-8'

Basic Success Response

<OTA_HotelAvailRS xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2022-08-01T09:30:47+02:00" EchoToken="abc123"> <Success/> <RoomStays> <RoomStay> <RoomTypes> <RoomType RoomTypeCode="SGL"> <RoomDescription Name="Single Room"/> </RoomType> </RoomTypes> <RatePlans> <RatePlan RatePlanCode="BAR"> <RatePlanDescription Name="Best Available Rate"/> </RatePlan> </RatePlans> </RoomStay> <RoomStay> <RoomTypes> <RoomType RoomTypeCode="SGL"> <RoomDescription Name="Single Room"/> </RoomType> </RoomTypes> <RatePlans> <RatePlan RatePlanCode="LTS"> <RatePlanDescription Name="Long Term Stay"/> </RatePlan> </RatePlans> </RoomStay> <RoomStay> <RoomTypes> <RoomType RoomTypeCode="DBX"> <RoomDescription Name="Deluxe Double Room"/> </RoomType> </RoomTypes> <RatePlans> <RatePlan RatePlanCode="BAR"> <RatePlanDescription Name="Best Available Rate"/> </RatePlan> </RatePlans> </RoomStay> <RoomStay> <RoomTypes> <RoomType RoomTypeCode="DBL"> <RoomDescription Name="Standard Double Room"/> </RoomType> </RoomTypes> <RatePlans> <RatePlan RatePlanCode="BAR"> <RatePlanDescription Name="Best Available Rate"/> </RatePlan> </RatePlans> </RoomStay> </RoomStays> </OTA_HotelAvailRS>

Success Response with Additional Room Description

<OTA_HotelAvailRS xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2022-08-01T09:30:47+02:00" EchoToken="abc123"> <Success/> <RoomStays> <RoomStay> <RoomTypes> <RoomType RoomTypeCode="SGL"> <RoomDescription Name="Single Room"> <Text>Bedding is Queen sized bed. Continental breakfast for each guest.</Text> </RoomDescription> </RoomType> </RoomTypes> <RatePlans> <RatePlan RatePlanCode="BAR"> <RatePlanDescription Name="Best Available Rate"> <Text>Best available rate including breakfast.</Text> </RatePlanDescription> </RatePlan> </RatePlans> </RoomStay> <RoomStay> <RoomTypes> <RoomType RoomTypeCode="SGL"> <RoomDescription Name="Single Room"> <Text>Bedding is Queen sized bed. Continental breakfast for each guest.</Text> </RoomDescription> </RoomType> </RoomTypes> <RatePlans> <RatePlan RatePlanCode="LTS"> <RatePlanDescription Name="Long Term Stay"> <Text>Special offer for 3 nights stay, pay only for 2! Rates include breakfast.</Text> </RatePlanDescription> </RatePlan> </RatePlans> </RoomStay> <RoomStay> <RoomTypes> <RoomType RoomTypeCode="DBX"> <RoomDescription Name="Deluxe Double Room"> <Text>Bedding is 1 x King sized bed and 1 x Single bed. Continental breakfast for each guest.</Text> </RoomDescription> </RoomType> </RoomTypes> <RatePlans> <RatePlan RatePlanCode="BAR"> <RatePlanDescription Name="Best Available Rate"> <Text>Best available rate including breakfast.</Text> </RatePlanDescription> </RatePlan> </RatePlans> </RoomStay> <RoomStay> <RoomTypes> <RoomType RoomTypeCode="DBL"> <RoomDescription Name="Standard Double Room"> <Text>Bedding is 2 x Queen sized bed. Continental breakfast for each guest.</Text> </RoomDescription> </RoomType> </RoomTypes> <RatePlans> <RatePlan RatePlanCode="BAR"> <RatePlanDescription Name="Best Available Rate"> <Text>Best available rate including breakfast.</Text> </RatePlanDescription> </RatePlan> </RatePlans> </RoomStay> </RoomStays> </OTA_HotelAvailRS>

Success Response with Maximum Occupancy - OBP

Failure Response

OTA_HotelAvailRS Specification

Element

Attribute

Number

Description

Element

Attribute

Number

Description

OTA_HotelAvailRS

 

1

Root element.

 

@TimeStamp

1

Time of the transaction in xml schema dateTime format.

Format like yyyy-MM-dd'T'HH:mm:ssZZ (without fraction of a second)
i.e '2022-08-01T09:30:47+02:00'

See TimeStamp.

 

@Version

1

Always "1.0"

 

@EchoToken

1

Mirror the EchoToken in the OTA_HotelAvailRQ request that your system received. See EchoTokens.

OTA_HotelAvailRS / Success

 

0..1

Mandatory when success.
Should only be present if it was a successful response.
The Errors node should not be present if the Success node is present.

OTA_HotelAvailRS / RoomStays

 

0..1

A collection of RoomStay elements

OTA_HotelAvailRS / RoomStays / RoomStay

 

1..n

Room stay details. Each RoomStay should only contain one RoomType + RatePlan combination.

OTA_HotelAvailRS / RoomStays / RoomStay / RoomTypes / RoomType

 

1

Each RoomStay element should contain 1 RoomType.

 

@RoomTypeCode

1

The code identifying this room.

OTA_HotelAvailRS / RoomStays / RoomStay / RoomTypes / RoomType / RoomDescription

 

1

 

 

@Name

1

The room name. This name should be a unique description of the room. E.g. "Deluxe Double Room 1 King size bed". The hotel will use this value to identify the room.

OTA_HotelAvailRS / RoomStays / RoomStay / RoomTypes / RoomType / RoomDescription / Text

 

0..1

Additional text to describe the room.

OTA_HotelAvailRS / RoomStays / RoomStay / RoomTypes / RoomType / Occupancy

 

0..1

Mandatory if your channel is using Occupancy Based Pricing
This element must be included in the all OTA_HotelAvailRS messages for all RoomType or RoomType+RatePlan combination.

 

@AgeQualifyingCode

1

Mandatory if your channel is using Occupancy Based Pricing
This attribute must be included in all RoomType or RoomType+RatePlan combination.

Always “10” indicating the maximum adult occupancy of the room.

 

@MaxOccupancy

1

Mandatory if your channel is using Occupancy Based Pricing
This attribute indicates the max number of occupants for the RoomType or RoomType+RatePlan combination. This attribute must be included in all RoomType or RoomType+RatePlan combination.

Value Range: Min 1 - Max 50

OTA_HotelAvailRS / RoomStays / RoomStay / RatePlans / RatePlan

 

1

Each RoomStay element should contain 1 RatePlan linked to the RoomType.

 

@RatePlanCode

1

The code identifying this rate.

OTA_HotelAvailRS / RoomStays / RoomStay / RatePlans / RatePlan / RatePlanDescription

 

1

 

 

@Name

1

The name associated with this rate. This name should uniquely describe the rate plan. E.g "Best Available Rate". The hotel will use this value to identify the rateplan.

OTA_HotelAvailRS / RoomStays / RoomStay / RatePlans / RatePlan / RatePlanDescription / Text

 

0..1

Additional text to describe the rate plan.

OTA_HotelAvailRS / Errors

 

0..1

Contains a list of errors in the event of a failed request.

OTA_HotelAvailRS / Errors / Error

 

1..n

Mandatory if Errors present.

 

@Type

1

Mandatory if Errors present.
Any type from the OTA Error Warning Types (EWT) table can be used. In particular, the following types are recommended:

1: Unknown
12: Processing exception

The use of the following types under their respective conditions is mandatory:

4: Authentication (If username and password are not authenticated)
The text must be “Invalid Username and/or Password” in English language.

6: Authorisation (If authenticated username is not authorised to alter hotel data)
The text must be “Hotel not found for HotelCode=XXXXXX” in English language, replacing XXXXXX with HotelCode received in the OTA_HotelAvailRQ.

 

@Code

0..1

Any code from the OTA Error Codes (ERR) table can be used. If @Code is present, the use of the following codes under their respective conditions is mandatory:

448: System error
392: Invalid hotel code