Realtime Push
Real-time push reservations provide your application with instant notifications of new/updated reservations as they are received by HotelRunner.
CREATE A CALLBACK URL
When we have new updates to send your server, we do a simple POST with a payload containing updates to a URL on your server. This callback URL must be HTTPS and support POST method.
https://yourdomain.com/callback
HotelRunner uses the OTA_HotelResNotifRQ to post reservations, modifications and cancellations to PMS's callback url. The state of the reservation is determined by the OTA_HotelResNotifRQ ResStatus attribute for which values Book, Modify and Cancel are used.
OTA_HotelResNotifRQ
HotelRunner posts reservation details to PMS's callback url by appending hotel's HR_ID and TOKEN.
For instance, the POST you will see coming will look like this:
https://yourdomain.com/callback?token={TOKEN}&hr_id={HR_ID}
Content Type: application/x-www-form-urlencoded
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <wsse:Security soap:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken> <wsse:Username>HR_ID</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">TOKEN</wsse:Password> </wsse:UsernameToken> </wsse:Security> </soap:Header> <soap:Body> <HotelReservation LastModifyDateTime="2015-12-27T21:27:39-12:00" CreateDateTime="2015-12-27T21:27:38-12:00" ResStatus="Book"> <POS> <Source> <RequestorID Type="22" ID="HotelRunner" /> <BookingChannel Primary="true" Type="7"> <CompanyName Code="admin" ChannelDisplay="Admin"> admin </CompanyName> </BookingChannel> </Source> </POS> <UniqueID Type="14" ID="R587232632" /> <UniqueID Type="16" ID="85d805bce5b34a6ada8ae3e1fcae1fb5" ID_Context="MESSAGE_UNIQUE_ID" /> <RoomStays> <RoomStay RoomStayStatus="Book"> <RoomTypes> <RoomType RoomType="Room YB" RoomTypeCode="HR:10243" /> </RoomTypes> <RatePlans> <RatePlan RatePlanCode="10271:HR:10243" RoomTypeCode="HR:10243" EffectiveDate="2015-12-28" ExpireDate="2015-12-29" /> </RatePlans> <RoomRates> <RoomRate RoomTypeCode="HR:10243" RatePlanCode="10271:HR:10243" NumberOfUnits="1"> <Rates> <Rate UnitMultiplier="1" RateTimeUnit="Day" EffectiveDate="2015-12-28" ExpireDate="2015-12-28"> <Total AmountAfterTax="33.0" CurrencyCode="AUD" /> </Rate> </Rates> </RoomRate> </RoomRates> <GuestCounts> <GuestCount AgeQualifyingCode="10" Count="2" /> </GuestCounts> <TimeSpan start="2015-12-28" end="2015-12-29" /> <Total AmountBeforeTax="30.0" AmountAfterTax="33.0" CurrencyCode="AUD" /> <ResGuestRPHs> <ResGuestRPH RPH="1" /> </ResGuestRPHs> <AdditionalDetails> <AdditionalDetail Type="1" NonRefundable="false" /> </AdditionalDetails> <AdditionalDetails> <AdditionalDetail Type="43"> <DetailDescription> <Text /> </DetailDescription> </AdditionalDetail> </AdditionalDetails> </RoomStay> </RoomStays> <ResGuests> <ResGuest ResGuestRPH="1"> <Profiles> <ProfileInfo> <Profile ProfileType="1"> <Customer> <PersonName> <GivenName>John</GivenName> <Surname>Doe</Surname> </PersonName> <Telephone PhoneNumber="+905333212932" /> <Email>john@example.net</Email> <Address> <AddressLine /> <AddressLine /> <CityName /> <StateProv></StateProv> <CountryName>Turkey</CountryName> </Address> </Customer> </Profile> </ProfileInfo> </Profiles> </ResGuest> </ResGuests> <Services></Services> <ResGlobalInfo> <Guarantee> <Comments> <Comment Name="PaymentGatewayName"> <Text>cash</Text> </Comment> </Comments> </Guarantee> <Fees> <Fee TaxInclusive="false" Type="Inclusive" Code="27" Amount="0.0"> <Description Name="Adjustments Total"> <Text>Adjustments Total</Text> </Description> </Fee> </Fees> <Total AmountAfterTax="33.0" CurrencyCode="AUD"> <Taxes Amount="3.0"> <TaxDescription> <Text>Tax</Text> </TaxDescription> </Taxes> </Total> <HotelReservationIDs> <HotelReservationID ResID_Type="14" ResID_Value="R587232632" /> </HotelReservationIDs> <Comments> <Comment> <Text /> </Comment> </Comments> </ResGlobalInfo> </HotelReservation> </soap:Body> </soap:Envelope>
OTA_HotelResNotifRS
Note:
* The presence of the element indicates successful processing.
* For fail states, reservation will be pushed at least 3 times, then it will be switched to e-mail.
<OTA_HotelResNotifRS xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2016-04-01T12:31:47+03:00" EchoToken="echo-1903"> <Success/> </OTA_HotelResNotifRS>