Retrieve Room & Rates code
PMS should send a OTA_HotelAvailRQ
to retrieve a list of available rooms and rates.
OTA_HotelAvailRQ
<OTA_HotelAvailRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2005-08-01T09:30:47+02:00" EchoToken="fb57388d">
<AvailRequestSegments>
<AvailRequestSegment AvailReqType="Room">
<HotelSearchCriteria>
<Criterion>
<HotelRef HotelCode="HOTEL1"/>
</Criterion>
</HotelSearchCriteria>
</AvailRequestSegment>
</AvailRequestSegments>
</OTA_HotelAvailRQ>
Specification OTA_HotelAvailRQ
Element | 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. |
@Version | 1 | Current Version 1 |
@TimeStamp | 1 | Time of the transaction in xml schema dateTime format |
OTA_HotelAvailRQ / AvailRequestSegments / AvailRequestSegment | 1..n | A request should only contain one AvailRequestSegment requesting room and rates for one single hotel at a time. |
@AvailReqType | 1 | Always “Room” |
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. |
OTA_HotelAvailRS
One room + rate combination per
RoomStay
.TheRoomDescription/Name
andRatePlanDescription/Name
will be used to identify the room + rate combination.
<tns:OTA_HotelAvailRS Version="1.0" TimeStamp="2005-08-01T09:30:47+0000" EchoToken="abc123">
<tns:Success></tns:Success>
<tns:RoomStays>
<tns:RoomStay>
<tns:RoomTypes>
<tns:RoomType RoomTypeCode="65300">
<tns:RoomDescription Name="Single Room"/>
</tns:RoomType>
</tns:RoomTypes>
<tns:RatePlans>
<tns:RatePlan RatePlanCode="RO">
<tns:RatePlanDescription Name="RO"/>
</tns:RatePlan>
</tns:RatePlans>
</tns:RoomStay>
<tns:RoomStay>
<tns:RoomTypes>
<tns:RoomType RoomTypeCode="65301">
<tns:RoomDescription Name="Single Room"/>
</tns:RoomType>
</tns:RoomTypes>
<tns:RatePlans>
<tns:RatePlan RatePlanCode="BB">
<tns:RatePlanDescription Name="BB"/>
</tns:RatePlan>
</tns:RatePlans>
</tns:RoomStay>
<tns:RoomStay>
<tns:RoomTypes>
<tns:RoomType RoomTypeCode="65302">
<tns:RoomDescription Name="Deluxe Double Room"/>
</tns:RoomType>
</tns:RoomTypes>
<tns:RatePlans>
<tns:RatePlan RatePlanCode="RO">
<tns:RatePlanDescription Name="RO"/>
</tns:RatePlan>
</tns:RatePlans>
</tns:RoomStay>
</tns:RoomStays>
</tns:OTA_HotelAvailRS>
Failure Response
<tns:OTA_HotelAvailRS Version="1.0" TimeStamp="2005-08-01T09:30:47+0000" EchoToken="abc123">
<tns:Errors>
<tns:Error Type="6" Code="392">Cannot find hotelier with code ABC</Error>
</tns:Errors>
</tns:OTA_HotelAvailRS>
Specification OTA_HotelAvailRS
Element | Number | Description |
---|---|---|
OTA_HotelAvailRS | 1 | Root element |
@EchoToken | 1 | Globally unique identifier for the request, this should be reflected as an EchoToken in the response. |
@Version | 1 | Always 1.0 |
@TimeStamp | 1 | Time of the transaction in xml schema dateTime format |
OTA_HotelAvailRS / Success | 0..1 | 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 / Errors | 0..1 | Contains a list of errors in the event of a failed request |
Errors / Error | 1..n | Mandatory if Errors present. |
@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 recommended |
@Code | 0..1 | Any code from the OTA code table for ‘Error Codes (ERR)’ can be used. |
OTA_HotelAvailRS / RoomStays | 0..1 | A collection of RoomStay elements |
RoomStays / RoomStay | 1..n | Room stay details |
RoomStay / RoomTypes /RoomType | 1 | Each RoomStay element should contain 1 RoomType |
@RoomTypeCode | 1 | The code identifying this room |
RoomType / RoomDescription | 1 | |
@Name | 1 | The room name |
RoomStay / RatePlans / RatePlan | 1 | Each RoomStay element should contain 1 RatePlan linked to the RoomType |
@RatePlanCode | 1 | The code identifying this rate |
RatePlan / RatePlanDescription | 1 | |
@Name | 1 | The name associated with this rate. |