OTA_HotelResNotifRQ

When a Reservation is made, modified, or cancelled, Staylists will send an OTA_HotelResNotifRQ message to an endpoint of your choice. (This endpoint can be varied per hotel if necessary.)

These message are big. So let's first take a look at the structure:

Structure

Here's an abbreviated look at what you can expect to receive from Staylists.

Where elements are self-closing, we've left them as is.

<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>
  <soapenv:Header><!-- header authentication your side --></soapenv:Header>
  <soapenv:Body>
    <OTA_HotelResNotifRQ xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns='http://www.opentravel.org/OTA/2003/05' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' TimeStamp='2018-03-26T08:33:56Z' Version='1.0' ResStatus='Commit' EchoToken='6e8474e9-46df-4cd2-afff-d54ceb086506'>
      <POS><!-- source of the booking --></POS>
      <HotelReservations>
        <HotelReservation CreateDateTime='2018-03-26T08:33:22Z'>
          <UniqueID Type='14' ID='c8e6949a-c8d9-426e-ac2d-d667164079dc'/>
          <RoomStays>
            <RoomStay>
              <RoomTypes><!-- the room booked --></RoomTypes>
              <RatePlans><!-- the rate plan booked --></RatePlans>
              <RoomRates><!-- details of booking rates --></RoomRates>
              <GuestCounts><!-- no of guests --></GuestCounts>
              <TimeSpan Start='2018-07-04' End='2018-07-05'/>
              <Total AmountAfterTax='149.00' CurrencyCode='GBP'/>
              <BasicPropertyInfo HotelCode='90dd0e6d-438a-477e-aeb6-0292c1e780c3' HotelName='The Demo Hotel'/>
            </RoomStay>
          </RoomStays>
          <ResGuests><!-- guest details --></ResGuests>
          <ResGlobalInfo>
            <Comments><! -- additional booking notes --></Comments>
            <Total AmountAfterTax='149.00' CurrencyCode='GBP'/>
            <Guarantee><!-- payment card details --></Guarantee>
          </ResGlobalInfo>
        </HotelReservation>
      </HotelReservations>
    </OTA_HotelResNotifRQ>
  </soapenv:Body>
</soapenv:Envelope>

Commit / Modify / Cancel

The first thing to note is the ResStatus attribute in the root OTA_HotelResNotifRQ element.

ResStatus='Commit'
There are three possible values for this attribute:
  • Commit
  • Modify
  • Cancel
Commit is sent when the Reservation is first made. The other options are self-explanatory.

UniqueID Element

The attribute Type will always be value 14. This is the unique Staylists reference for this Reservation.

<UniqueID Type='14' ID='c8e6949a-c8d9-426e-ac2d-d667164079dc'/>

POS Element

The POS element details the source of the booking. As Staylists is a platform that operates many partner branded sites, we always send two sources. The primary will always be Staylists.

<POS>
  <Source>
    <BookingChannel Primary='true'>
      <CompanyName>Staylists</CompanyName>
    </BookingChannel>
  </Source>
  <Source>
    <BookingChannel>
      <CompanyName>Mail Travel</CompanyName>
    </BookingChannel>
  </Source>
</POS>

GuestCounts Element

An AgeQualifyingCode attribute with a value of 10 denotes an adult. And 8 denotes a child. We're sure in a galaxy far away this is perfectly obvious and logical.

<GuestCounts>
  <GuestCount AgeQualifyingCode='10' Count='2'/>
</GuestCounts>

TimeSpan Element

For the sake of clarity, the Start date is the arrival date and the End date is the departure date.

<TimeSpan Start='2018-07-04' End='2018-07-05'/>

Full Message

<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>
  <soapenv:Header>
    {header}
  </soapenv:Header>
  <soapenv:Body>
    <OTA_HotelResNotifRQ xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns='http://www.opentravel.org/OTA/2003/05' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' TimeStamp='2018-03-26T08:33:56Z' Version='1.0' ResStatus='Commit' EchoToken='6e8474e9-46df-4cd2-afff-d54ceb086506'>
      <POS>
        <Source>
          <BookingChannel Primary='true'>
            <CompanyName>Staylists</CompanyName>
          </BookingChannel>
        </Source>
        <Source>
          <BookingChannel>
            <CompanyName>Mail Travel</CompanyName>
          </BookingChannel>
        </Source>
      </POS>
      <HotelReservations>
        <HotelReservation CreateDateTime='2018-03-26T08:33:22Z'>
          <UniqueID Type='14' ID='c8e6949a-c8d9-426e-ac2d-d667164079dc'/>
          <RoomStays>
            <RoomStay>
              <RoomTypes>
                <RoomType RoomTypeCode='927df75b-a9fe-4d58-b3fd-2542a61f36ec'>
                  <RoomDescription Name='Cherry'>
                    <Text>A stunning room decorated with lots of Oriental furniture bought back from Macau.</Text>
                  </RoomDescription>
                </RoomType>
              </RoomTypes>
              <RatePlans>
                <RatePlan RatePlanCode='fb00e505-d228-490a-a7c6-29e4a7ffb538'>
                  <RatePlanDescription Name='Room only'>
                    <Text>Non-refundable.</Text>
                  </RatePlanDescription>
                </RatePlan>
              </RatePlans>
              <RoomRates>
                <RoomRate RoomTypeCode='927df75b-a9fe-4d58-b3fd-2542a61f36ec' RatePlanCode='fb00e505-d228-490a-a7c6-29e4a7ffb538' NumberOfUnits='1'>
                  <Rates>
                    <Rate RateTimeUnit='Day' UnitMultiplier='1' EffectiveDate='2018-07-04' ExpireDate='2018-07-05'>
                      <Base AmountAfterTax='149.00' CurrencyCode='GBP'/>
                      <Total AmountAfterTax='149.00' CurrencyCode='GBP'/>
                    </Rate>
                  </Rates>
                </RoomRate>
              </RoomRates>
              <GuestCounts>
                <GuestCount AgeQualifyingCode='10' Count='2'/>
              </GuestCounts>
              <TimeSpan Start='2018-07-04' End='2018-07-05'/>
              <Total AmountAfterTax='149.00' CurrencyCode='GBP'/>
              <BasicPropertyInfo HotelCode='90dd0e6d-438a-477e-aeb6-0292c1e780c3' HotelName='The Demo Hotel'/>
            </RoomStay>
          </RoomStays>
          <ResGuests>
            <ResGuest>
              <Profiles>
                <ProfileInfo>
                  <Profile ProfileType='1'>
                    <Customer>
                      <PersonName>
                        <NamePrefix>Mr</NamePrefix>
                        <GivenName>David</GivenName>
                        <Surname>Smith</Surname>
                      </PersonName>
                      <Telephone PhoneNumber='0845 544 4020'/>
                      <Email>david@staylists.com</Email>
                      <Address>
                        <AddressLine>F5, The Ross Building</AddressLine>
                        <AddressLine>Adastral Park</AddressLine>
                        <CityName>Martlesham</CityName>
                        <StateProv>Suffolk</StateProv>
                      </Address>
                    </Customer>
                  </Profile>
                </ProfileInfo>
              </Profiles>
            </ResGuest>
          </ResGuests>
          <ResGlobalInfo>
            <Comments>
              <Comment>
                <Text>My favourite part of staying in a hotel is the real-time API connection.</Text>
              </Comment>
            </Comments>
            <Total AmountAfterTax='149.00' CurrencyCode='GBP'/>
            <Guarantee>
              <GuaranteesAccepted>
                <GuaranteeAccepted>
                  <PaymentCard SeriesCode='***' CardNumber='************1234' CardCode='MC' ExpireDate='***'>
                    <CardHolderName>***</CardHolderName>
                  </PaymentCard>
                </GuaranteeAccepted>
              </GuaranteesAccepted>
            </Guarantee>
          </ResGlobalInfo>
        </HotelReservation>
      </HotelReservations>
    </OTA_HotelResNotifRQ>
  </soapenv:Body>
</soapenv:Envelope>