Retrieving the room types and the rate plans based on OTA_HotelAvailRQ
Before the Hotel-Spider system can send inventories, rates and stay restrictions to an online booking system, we need to perform the room type mapping. If in addition, the online booking solution also works with rate plans, these also need to be provided.
The Hotel-Spider system will send the following request
<OTA_HotelAvailRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" Target="Production" TimeStamp="2015-11-24T16:00:00+02:00" EchoToken="123456789"> <POS> <Source> <RequestorID ID="MASTERUSERNAME" MessagePassword="MASTERPASSWORD" Type="13" /> </Source> </POS> <AvailRequestSegments> <AvailRequestSegment AvailReqType="Room"> <HotelSearchCriteria> <Criterion> <HotelRef HotelCode="HOTELCODE"/> </Criterion> </HotelSearchCriteria> </AvailRequestSegment> </AvailRequestSegments> </OTA_HotelAvailRQ>
Request structure
OTA_HotelAvailRQ
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), AvailRequestSegments
AvailRequestSegments
Parent: OTA_HotelAvailRQ
Mandatory: yes
Attributes: None
Child elements: AvailRequestSegment
AvailRequestSegment
Parent: AvailRequestSegments
Mandatory: yes
Attributes:
Name | Mandatory | Description |
---|---|---|
AvailReqType | Yes | The value will be "Room" |
Child elements: HotelSearchCriteria
HotelSearchCriteria
Parent: AvailRequestSegment
Mandatory: yes
Attributes: None
Child elements: Criterion
Criterion
Parent: HotelSearchCriteria
Mandatory: yes
Attributes:
Name | Mandatory | Description |
---|---|---|
HotelCode | Yes | The ID of the hotel on the online booking system |
Child elements: None
The online booking system must respond with the following format
<OTA_HotelAvailRS xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" Target="Production" TimeStamp="20015-11-24T16:00:30+02:00" EchoToken="123456789"> <Success/> <RoomStays> <RoomStay> <RoomTypes> <RoomType RoomTypeCode="A1B2C3D4"> <Occupancy MinOccupancy="1" MaxOccupancy="1" /> <RoomDescription Name="Single Room"/> </RoomType> </RoomTypes> <RatePlans> <RatePlan RatePlanCode="1231kjhgkj"> <RatePlanDescription Name="Standard Rate"/> </RatePlan> </RatePlans> </RoomStay> <RoomStay> <RoomTypes> <RoomType RoomTypeCode="A1B2C3D4"> <Occupancy MinOccupancy="1" MaxOccupancy="1" /> <RoomDescription Name="Single Room"/> </RoomType> </RoomTypes> <RatePlans> <RatePlan RatePlanCode="1231kjhgkj"> <RatePlanDescription Name="Non Refundable"/> </RatePlan> </RatePlans> </RoomStay> <RoomStay> <RoomTypes> <RoomType RoomTypeCode="4D3C2B1A"> <Occupancy MinOccupancy="1" MaxOccupancy="2" /> <RoomDescription Name="Double Room"/> </RoomType> </RoomTypes> <RatePlans> <RatePlan RatePlanCode="1231kjhgkj"> <RatePlanDescription Name="Standard Rate"/> </RatePlan> </RatePlans> </RoomStay> </RoomStays> </OTA_HotelAvailRS>
Response structure
OTA_HotelAvailRS
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, RoomStays
Success
Parent: OTA_HotelAvailRS
Mandatory: yes
Attributes: None
Child elements: None
RoomStays
Parent: OTA_HotelAvailRS
Mandatory: yes
Attributes: None
Child elements: RoomStay
RoomStay
Parent: RoomStays
Mandatory: yes
Attributes: None
Child elements: RoomTypes
RoomTypes
Parent: RoomStay
Mandatory: yes
Attributes: None
Child elements: RoomType
RoomType
Parent: RoomTypes
Mandatory: yes
Attributes:
Name | Mandatory | Description |
---|---|---|
RoomTypeCode | Yes | The ID of the room type on the online booking system |
Child elements: RoomDescription, Occupancy
Occupancy
Parent: RoomType
Mandatory: yes
Attributes:
Name | Mandatory | Description |
---|---|---|
MinOccupancy | Yes | The minimum number of occupants possible for this room type |
MaxOccupancy | Yes | The maximum number of occupants possible for this room type |
Child elements: None
RoomDescription
Parent: RoomType
Mandatory: yes
Attributes:
Name | Mandatory | Description |
---|---|---|
Name | Yes | The name of the room type on the online booking system |
Child elements: None
RatePlans
Parent: RoomStay
Mandatory: yes
Attributes: None
Child elements: RatePlan
RatePlan
Parent: RatePlans
Mandatory: yes
Attributes:
Name | Mandatory | Description |
---|---|---|
RatePlanCode | Yes | The ID of the rate plan on the online booking system |
Child elements: RatePlanDescription
RatePlanDescription
Parent: RatePlan
Mandatory: yes
Attributes:
Name | Mandatory | Description |
---|---|---|
Name | Yes | The name of the rate plan on the online booking system |
Child elements: None