Step 1: Polling the reservations based on OTA_ReadRQ / OTA_ResRetrieveRS

Step 1: Polling the reservations based on OTA_ReadRQ / OTA_ResRetrieveRS

This is part one of the asynchronuous method. The Hotel-Spider will poll the online booking system every minute to check if a reservation / modification / cancellation was made / modified / cancelled on the online booking system. When a reservation is available, the entire reservation should be returned to the Hotel-Spider system 

Endpoints

Two distincts endpoints should be provided by the online booking system when starting the integration. One for the staging / testing and one for the production.

Example requests and response

Use case 1: Poll for unconfirmed reservations with stay dates in the future
<OTA_ReadRQ Target="Test" EchoToken="7571639933" TimeStamp="2015-11-12T18:05:39+01:00" Version="1.000"> <POS> <Source> <RequestorID ID="MASTERUSERNAME" MessagePassword="MASTERPASSWORD" Type="13" /> </Source> </POS> <ReadRequests> <HotelReadRequest> <SelectionCriteria SelectionType="Undelivered" /> </HotelReadRequest> </ReadRequests> </OTA_ReadRQ>
Use case 2: Poll for confirmed reservations with stay dates in the future
<OTA_ReadRQ Target="Test" EchoToken="7571639933" TimeStamp="2015-11-12T18:05:39+01:00" Version="1.000"> <POS> <Source> <RequestorID ID="MASTERUSERNAME" MessagePassword="MASTERPASSWORD" Type="13" /> </Source> </POS> <ReadRequests> <HotelReadRequest> <SelectionCriteria SelectionType="PreviouslyDelivered" /> </HotelReadRequest> </ReadRequests> </OTA_ReadRQ>
Use case 3: Poll for reservations with arrival date between Start and End
<OTA_ReadRQ Target="Test" EchoToken="7571639933" TimeStamp="2015-11-12T18:05:39+01:00" Version="1.000"> <POS> <Source> <RequestorID ID="MASTERUSERNAME" MessagePassword="MASTERPASSWORD" Type="13" /> </Source> </POS> <ReadRequests> <HotelReadRequest> <SelectionCriteria DateType="ArrivalDate" Start="2015-12-08T12:00:0+01:00" End="2015-12-15T12:00:00+01:00" SelectionType="All" /> </HotelReadRequest> </ReadRequests> </OTA_ReadRQ>
Use case 4: Poll for reservations with reservation date between Start and End
<OTA_ReadRQ Target="Test" EchoToken="7571639933" TimeStamp="2015-11-12T18:05:39+01:00" Version="1.000"> <POS> <Source> <RequestorID ID="MASTERUSERNAME" MessagePassword="MASTERPASSWORD" Type="13" /> </Source> </POS> <ReadRequests> <HotelReadRequest> <SelectionCriteria DateType="CreateDate" Start="2015-12-08T12:00:0+01:00" End="2015-12-15T12:00:00+01:00" SelectionType="All" /> </HotelReadRequest> </ReadRequests> </OTA_ReadRQ>
Use case 5: Poll for reservations with departure date between Start and End
<OTA_ReadRQ Target="Test" EchoToken="7571639933" TimeStamp="2015-11-12T18:05:39+01:00" Version="1.000"> <POS> <Source> <RequestorID ID="MASTERUSERNAME" MessagePassword="MASTERPASSWORD" Type="13" /> </Source> </POS> <ReadRequests> <HotelReadRequest> <SelectionCriteria DateType="DepartureDate" Start="2015-12-08T12:00:0+01:00" End="2015-12-15T12:00:00+01:00" SelectionType="All" /> </HotelReadRequest> </ReadRequests> </OTA_ReadRQ>
Use case 6: Poll for reservations with modification date between Start and End
<OTA_ReadRQ Target="Test" EchoToken="7571639933" TimeStamp="2015-11-12T18:05:39+01:00" Version="1.000"> <POS> <Source> <RequestorID ID="MASTERUSERNAME" MessagePassword="MASTERPASSWORD" Type="13" /> </Source> </POS> <ReadRequests> <HotelReadRequest> <SelectionCriteria DateType="LastUpdateDate" Start="2015-12-08T12:00:0+01:00" End="2015-12-15T12:00:00+01:00" SelectionType="All" /> </HotelReadRequest> </ReadRequests> </OTA_ReadRQ>
Use case 7: Poll for active reservations
<OTA_ReadRQ Target="Test" EchoToken="7571639933" TimeStamp="2015-11-12T18:05:39+01:00" Version="1.000"> <POS> <Source> <RequestorID ID="MASTERUSERNAME" MessagePassword="MASTERPASSWORD" Type="13" /> </Source> </POS> <ReadRequests> <HotelReadRequest> <SelectionCriteria ResStatus="Reserved" SelectionType="All" /> </HotelReadRequest> </ReadRequests> </OTA_ReadRQ>
Use case 8: Poll for cancelled reservations
<OTA_ReadRQ Target="Test" EchoToken="7571639933" TimeStamp="2015-11-12T18:05:39+01:00" Version="1.000"> <POS> <Source> <RequestorID ID="MASTERUSERNAME" MessagePassword="MASTERPASSWORD" Type="13" /> </Source> </POS> <ReadRequests> <HotelReadRequest> <SelectionCriteria ResStatus="Cancelled" SelectionType="All" /> </HotelReadRequest> </ReadRequests> </OTA_ReadRQ>
Use case 9: Poll for reservations for a specific hotel
<OTA_ReadRQ Target="Test" EchoToken="7571639933" TimeStamp="2015-11-12T18:05:39+01:00" Version="1.000"> <POS> <Source> <RequestorID ID="MASTERUSERNAME" MessagePassword="MASTERPASSWORD" Type="13" /> </Source> </POS> <ReadRequests> <HotelReadRequest HotelCode="HOTELCODE"> <SelectionCriteria SelectionType="Undelivered" /> </HotelReadRequest> </ReadRequests> </OTA_ReadRQ>
Use case 10: Poll for a specific reservations
<OTA_ReadRQ Target="Test" EchoToken="7571639933" TimeStamp="2015-11-12T18:05:39+01:00" Version="1.000"> <POS> <Source> <RequestorID ID="MASTERUSERNAME" MessagePassword="MASTERPASSWORD" Type="13" /> </Source> </POS> <UniqueID Type="14" ID="ABCD-668591" /> <UniqueID Type="14" ID="DCBA-195866" /> </OTA_ReadRQ>

Combination of all the parameters

All the parameter displayed accross the different use cases can be combined to form additional use cases.

OTA_ResRetrieveRS request
<OTA_ResRetrieveRS Target="Test" EchoToken="7571639933" TimeStamp="2015-11-12T18:05:39+01:00" Version="1.000"> <ReservationsList> <HotelReservation ResStatus="Reserved" OriginalDeliveryMethodCode="11" RoomStayReservation="1" WalkInIndicator="0" CreateDateTime="2015-11-12T18:06:39+01:00" LastModifyDateTime="2015-11-12T18:06:40+01:00"> <POS> <Source> <RequestorID ID="ONLINEBOOKINGSYSTEMIDENTIFIER" Type="22" /> <BookingChannel Type="7"> <CompanyName>ONLINEBOOKINGSYSTEMNAME</CompanyName> </BookingChannel> </Source> </POS> <RoomStays> <RoomStay IndexNumber="1" RoomStayStatus="Reserved"> <RoomTypes> <RoomType RoomID="00L55bf507c63634" IsRoom="1"> <RoomDescription Name="Double Room with lake view"/> </RoomType> </RoomTypes> <RoomRates> <RoomRate EffectiveDate="2015-11-20" ExpireDate="2015-11-20" RatePlanID="00L55cdbe855ce0b"> <Rates> <Rate> <Base CurrencyCode="CHF" AmountBeforeTax="0.00" AmountAfterTax="162.00"/> <Total CurrencyCode="CHF" AmountBeforeTax="0.00" AmountAfterTax="162.00"/> </Rate> </Rates> <RoomRateDescription> <Text>Best Available Rate</Text> </RoomRateDescription> </RoomRate> <RoomRate EffectiveDate="2015-11-21" ExpireDate="2015-11-21" RatePlanID="00L55cdbe855ce0b"> <Rates> <Rate> <Base CurrencyCode="CHF" AmountBeforeTax="0.00" AmountAfterTax="162.00"/> <Total CurrencyCode="CHF" AmountBeforeTax="0.00" AmountAfterTax="162.00"/> </Rate> </Rates> <RoomRateDescription> <Text>Best Available Rate</Text> </RoomRateDescription> </RoomRate> </RoomRates> <GuestCounts> <GuestCount AgeQualifyingCode="10" Count="1"/> </GuestCounts> <TimeSpan Start="2015-11-20" End="2015-11-22" Duration="P2D"/> <CancelPenalties> <CancelPenalty> <Deadline AbsoluteDeadline="2015-11-18T00:00:00+01:00"/> <AmountPercent FeesInclusive="1" Amount="162.00" CurrencyCode="CHF"/> <PenaltyDescription Name="free cancellation 48 hours"/> </CancelPenalty> </CancelPenalties> <Total CurrencyCode="CHF" AmountBeforeTax="0.00" AmountAfterTax="324.00"/> <BasicPropertyInfo HotelCode="HOTELCODE" HotelName="HOTELNAME" CurrencyCode="CHF"/> <ResGuestRPHs>1</ResGuestRPHs> </RoomStay> <RoomStay IndexNumber="2" RoomStayStatus="Reserved"> <RoomTypes> <RoomType RoomID="00L55bf507c63634" IsRoom="1"> <RoomDescription Name="Double Room with lake view"/> </RoomType> </RoomTypes> <RoomRates> <RoomRate EffectiveDate="2015-11-20" ExpireDate="2015-11-20" RatePlanID="00L55cdbe855ce0b"> <Rates> <Rate> <Base CurrencyCode="CHF" AmountBeforeTax="0.00" AmountAfterTax="143.00"/> <Total CurrencyCode="CHF" AmountBeforeTax="0.00" AmountAfterTax="143.00"/> </Rate> </Rates> <RoomRateDescription> <Text>Best Available Rate</Text> </RoomRateDescription> </RoomRate> <RoomRate EffectiveDate="2015-11-21" ExpireDate="2015-11-21" RatePlanID="00L55cdbe855ce0b"> <Rates> <Rate> <Base CurrencyCode="CHF" AmountBeforeTax="0.00" AmountAfterTax="143.00"/> <Total CurrencyCode="CHF" AmountBeforeTax="0.00" AmountAfterTax="143.00"/> </Rate> </Rates> <RoomRateDescription> <Text>Best Available Rate</Text> </RoomRateDescription> </RoomRate> </RoomRates> <GuestCounts> <GuestCount AgeQualifyingCode="10" Count="1"/> </GuestCounts> <TimeSpan Start="2015-11-20" End="2015-11-22" Duration="P2D"/> <CancelPenalties> <CancelPenalty> <Deadline AbsoluteDeadline="2015-11-18T00:00:00+01:00"/> <AmountPercent FeesInclusive="1" Amount="162.00" CurrencyCode="CHF"/> <PenaltyDescription Name="free cancellation 48 hours"/> </CancelPenalty> </CancelPenalties> <Total CurrencyCode="CHF" AmountBeforeTax="0.00" AmountAfterTax="286.00"/> <BasicPropertyInfo HotelCode="HOTELCODE" HotelName="HOTELNAME" CurrencyCode="CHF"/> <ResGuestRPHs>2</ResGuestRPHs> </RoomStay> </RoomStays> <ResGuests> <ResGuest ResGuestRPH="1"> <Profiles> <ProfileInfo> <Profile ProfileType="1"> <Customer MaritalStatus="Unknown" Gender="Unknown"> <PersonName> <GivenName>James</GivenName> <Surname>Bond</Surname> </PersonName> <Email>jamesbond@secretmail.ch</Email> <Address> <StreetNmbr>2</StreetNmbr> <AddressLine>Bahnhofstrasse</AddressLine> <CityName>Zurich</CityName> <PostalCode>1000</PostalCode> <County>Zurich</County> <StateProv>Zurich</StateProv> <CountryName Code="CH">Switzerland</CountryName> </Address> </Customer> </Profile> </ProfileInfo> </Profiles> </ResGuest> <ResGuest ResGuestRPH="2"> <Profiles> <ProfileInfo> <Profile ProfileType="1"> <Customer MaritalStatus="Unknown" Gender="Unknown"> <PersonName> <GivenName>Money</GivenName> <Surname>Penny</Surname> </PersonName> <Email>moneypenny@secretmail.ch</Email> <Address> <StreetNmbr>2</StreetNmbr> <AddressLine>Bahnhofstrasse</AddressLine> <CityName>Zurich</CityName> <PostalCode>1000</PostalCode> <County>Zurich</County> <StateProv>Zurich</StateProv> <CountryName Code="CH">Switzerland</CountryName> </Address> </Customer> </Profile> </ProfileInfo> </Profiles> </ResGuest> </ResGuests> <ResGlobalInfo> <GuestCounts> <GuestCount AgeQualifyingCode="10" Count="2"/> </GuestCounts> <TimeSpan Start="2015-11-20" End="2015-11-22" Duration="P2D"/> <Comments> <Comment> <Text>They are on a secret mission</Text> </Comment> </Comments> <Guarantee GuaranteeType="CC/DC/Voucher"> <GuaranteesAccepted> <GuaranteeAccepted> <PaymentCard CardCode="MC" ExpireDate="0717"> <CardHolderName>Gareth Mallory</CardHolderName> <CardNumber Mask="xxxxxxxxxxxx1111">4111111111111111</CardNumber> </PaymentCard> </GuaranteeAccepted> </GuaranteesAccepted> </Guarantee> <Total CurrencyCode="CHF" AmountBeforeTax="0.00" AmountAfterTax="324.00"/> <HotelReservationIDs> <HotelReservationID ResID_Source="ONLINEBOOKINGSYSTEMID" ResID_SourceContext="ONLINEBOOKINGSYSTEMNAME" ResID_Type="14" ResID_Value="ABCD-668591"/> </HotelReservationIDs> <Profiles> <ProfileInfo> <Profile ProfileType="1"> <Customer MaritalStatus="Unknown" Gender="Unknown"> <PersonName> <GivenName>Gareth</GivenName> <Surname>Mallory</Surname> </PersonName> <Email>garethmallory@secretmail.ch</Email> <Address> <StreetNmbr>2</StreetNmbr> <AddressLine>Bahnhofplatz</AddressLine> <CityName>Winterthur</CityName> <PostalCode>4104</PostalCode> <County>Winterthur</County> <StateProv>Winterthur</StateProv> <CountryName Code="CH">Switzerland</CountryName> </Address> </Customer> </Profile> </ProfileInfo> <ProfileInfo> <Profile ProfileType="4"> <CompanyInfo> <CompanyName>Her Majesty's secret services</CompanyName> <Email>quartermaster@secretmail.ch</Email> <AddressInfo> <StreetNmbr>2</StreetNmbr> <AddressLine>Bahnhofplatz</AddressLine> <CityName>Winterthur</CityName> <PostalCode>4104</PostalCode> <County>Winterthur</County> <StateProv>Winterthur</StateProv> <CountryName Code="CH">Switzerland</CountryName> </AddressInfo> </CompanyInfo> </Profile> </ProfileInfo> </Profiles> <BasicPropertyInfo HotelCode="00L55bf2f4e6c708" HotelName="Hôtel du Port" CurrencyCode="CHF"/> </ResGlobalInfo> </HotelReservation> </ReservationsList> </OTA_ResRetrieveRS>

 

Request structure

OTA_ReadRQ

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

The value will be returned in the OTA_HotelResNotifRS response

Child elements: POSHotelReservations

 

UniqueID

Parent: OTA_ReadRQ

Mandatory: No

Attributes:

Name

Mandatory

Description

Type

Yes

Possible values are:

  • 14 (Reservation)

  • 15 (Cancellation) 

ID

Yes

The reservation number as assigned by the online booking system and communicated to the end customer/guest 

Child elements: None

 

ReadRequests

Parent: OTA_ReadRQ

Mandatory: no

Attributes: None

Child elements: HotelReadRequest

 

HotelReadRequest

Parent: ReadRequests

Mandatory: yes (when ReadRequests is used)

Attributes:

Name

Mandatory

Description

HotelCode

No

The ID of the hotel as defined on the online booking system

Child elements: SelectionCriteria

 

SelectionCriteria

Parent: HotelReadRequest

Mandatory: yes (when ReadRequests is used)

Attributes:

Name

Mandatory

Description

DateType

No

 

Possible values are:

 

  • ArrivalDate

  • CreateDate

  • DepartureDate

  • LastUpdateDate
     

ResStatus

No

Possible values are:

 

  • Reserved

  • Cancelled

SelectionType

No

Possible values are:

 

  • All

  • PreviouslyDelivered

  • Undelivered

Start

No

The format will respect the ISO 8601 2015-11-16T22:23:48+00:00

End

No

The format will respect the ISO 8601 2015-11-16T22:23:48+00:00

Child elements: None

 

Response structure

OTA_ResRetrieveRS

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

The value from the OTA_ReadRQ should be returned

Child elements: POSReservationsList

 

ReservationsList

Parent: OTA_ResRetrieveRS

Mandatory: yes

Attributes: None

Child elements: HotelReservation

 

HotelReservation

Parent: ReservationsList

Mandatory: yes

Attributes:

Name

Mandatory

Description

ResStatus

Yes

Possible values are:

  • Reserved

  • Modify

  • Cancelled

OriginalDeliveryMethodCode

No

The default value should be "11" for

.

RoomStayReservation

No

The default value should be "1.000"

WalkInIndicator

No

The value will be returned in the OTA_HotelResNotifRS response

CreateDateTime

Yes

The format should respect the ISO 8601 2015-11-16T22:23:48+00:00

LastModifyDateTime

Yes

The format should respect the ISO 8601 2015-11-16T22:23:48+00:00

Child elements: RoomStays, ResGuests, Services, ResGlobalInfo

 

RoomStays

Parent: HotelReservation

Mandatory: yes

Attributes: None

Child elements: RoomStay

 

RoomStay

Parent: RoomStays

Mandatory: yes

Attributes:

Name

Mandatory

Description

IndexNumber

Yes

Unique identifier of this specific room stay.

RoomStayStatus

Yes

Possible values are:

  • Reserved 

  • Cancelled

Child elements: RoomTypes, RoomRates, GuestCounts, TimeSpan, CancelPenalties, Total, BasicPropertyInfo, ResGuestRPHs, ServiceRPHs

One RoomStay per booked room

Each RoomStay should contain one room. Should the same room type have been booked multiple times, then there should be as many RoomStay elements as booked rooms.

 

RoomTypes

Parent: RoomStay

Mandatory: yes

Attributes: None

Child elements: RoomType

 

RoomType

Parent: RoomTypes

Mandatory: yes

Attributes:

Name

Mandatory

Description

RoomID

Yes

The ID of the room as defined on the online booking system. This value should be retrievable via the methods described in Retrieving the room types and the rate plans

IsRoom

No

The default value should be "1"

Child elements: RoomDescription

 

RoomDescription

Parent: RoomType

Mandatory: yes

Attributes:

Name

Mandatory

Description

Name

Yes

The name of the room as defined on the online booking system. This value should be retrievable via the methods described in Retrieving the room types and the rate plans

Child elements: None

 

RoomRates

Parent: RoomStay

Mandatory: yes

Attributes: None

Child elements: RoomRate

 

RoomRate

Parent: RoomRate

Mandatory: yes

Attributes:

Name

Mandatory

Description

EffectiveDate

Yes

The day on which this rate plan was applied for a reservation. The format should respect the ISO 8601 2015-11-16

ExpireDate

No

The day on which this rate plan was applied for a reservation. The format should respect the ISO 8601 2015-11-16

ExpireDateExclusiveInd

No

In the case of a date span, should the ExpireDate be included (ExpireDateExclusiveInd="0") or excluded (ExpireDateExclusiveInd="1")

RatePlanID

Yes

The ID of the rate plan as defined on the online booking system.This value should be retrievable via the methods described in Retrieving the room types and the rate plans

Child elements: Rates, RoomRateDescription

Extracting the day rates

In order to avoid any confusion about the exact day rate and for which days they have been applied, the Hotel-Spider can work with the following three scenarios:

  • The values of the EffectiveDate and the ExpireDate attributes are equal. The day rate will apply only to the date specified

  • The values of the EffectiveDate and the ExpireDate attributes are different and the ExpireDateExclusiveInd attribute is not set. The day rate will apply to all the days covered from the EffectiveDate until and including the ExpireDate.

  • The values of the EffectiveDate and the ExpireDate attributes are different and the ExpireDateExclusiveInd attribute is set. The day rate will apply to all the days covered from the EffectiveDate until the day before the ExpireDate. Thus the ExpireDate is excluded from the day rates.

 

Rates

Parent: RoomRate

Mandatory: yes

Attributes: None

Child elements: Rate

 

Rate

Parent: Rates

Mandatory: yes

Attributes: None

Child elements: Base, Total

 

Base

Parent: Rate

Mandatory: yes

Attributes:

Name

Mandatory

Description

CurrencyCode

Yes

The day on which this rate plan was applied for a reservation. The format should respect the ISO 8601 2015-11-16

AmountBeforeTax / AmountAfterTax

Yes

The day rate for this specific product (room type + rate plan) without any additional services

Child elements: None

Provide a day rate

The price provided should be applicable per day and only for one room stay.

 

Total

Parent: Rate

Mandatory: yes

Attributes:

Name

Mandatory

Description

CurrencyCode

Yes

The day on which this rate plan was applied for a reservation. The format should respect the ISO 8601 2015-11-16

AmountBeforeTax / AmountAfterTax

Yes

The day rate for this specific product (room type + rate plan) with additional services

Child elements: None

Provide a day rate

The price provided should be applicable per day and only for one room stay.

 

RoomRateDescription

Parent: RoomRate

Mandatory: yes

Attributes: None

Child elements: Text

 

Text

Parent: RoomRateDescription

Mandatory: yes

Attributes: None

Child elements: None

The name of the rate plan

The Text element should contain the name of the rate plan as defined on the online booking system.This value should be retrievable via the methods described in Retrieving the room types and the rate plans

 

GuestCounts

Parent: RoomStay

Mandatory: yes

Attributes: None

Child elements: GuestCount

 

GuestCount

Parent: GuestCounts

Mandatory: yes

Attributes:

Name

Mandatory