Zenith API‎ > ‎1. Hotels‎ > ‎

1. Get Rooms

The first thing you need to do before starting to push your rates into the system is to get the rooms that are set up in Zenith and map them to your room codes.

Request

In order to get the rooms, you can use the following request:


<OTA_HotelAvailRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2015-11-11T11:11:11+00:00" EchoToken="12345678">
  <AvailRequestSegments>
    <AvailRequestSegment AvailReqType="Room">
      <HotelSearchCriteria>
        <Criterion>
          <HotelRef HotelCode="HOTEL1"/>
        </Criterion>
      </HotelSearchCriteria>
    </AvailRequestSegment>
  </AvailRequestSegments>
</OTA_HotelAvailRQ>


The "EchoToken" is used in case you work asynchronously, the content of this attribute will be returned in the response.
The "HotelCode" is the hotel code given to you by your account manager and that is set up on Zenith.

Response

The response will detail on the available rooms for the specified property:

<OTA_HotelAvailRS xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2015-11-11T11:11:12+00:00" EchoToken="12345678">
  <Success/>
  <RoomStays>
    <RoomStay>
      <RoomTypes>
        <RoomType RoomTypeCode="SGL">
          <RoomDescription Name="Single Room">
            <Text>Bedding is Queen sized bed. Continental breakfast for each guest.</Text>
          </RoomDescription>
        </RoomType>
      </RoomTypes>
      <RatePlans>
        <RatePlan RatePlanCode="BAR">
          <RatePlanDescription Name="Best Available Rate">
            <Text>Best available rate including breakfast.</Text>
          </RatePlanDescription>
        </RatePlan>
      </RatePlans>
    </RoomStay>
    <RoomStay>
      <RoomTypes>
        <RoomType RoomTypeCode="SGL">
          <RoomDescription Name="Single Room">
            <Text>Bedding is Queen sized bed. Continental breakfast for each guest.</Text>
          </RoomDescription>
        </RoomType>
      </RoomTypes>
      <RatePlans>
        <RatePlan RatePlanCode="LTS">
          <RatePlanDescription Name="Long Term Stay">
            <Text>Special offer for 3 nights stay, pay only for 2!  Rates include breakfast.</Text>
          </RatePlanDescription>
        </RatePlan>
      </RatePlans>
    </RoomStay>
    <RoomStay>
      <RoomTypes>
        <RoomType RoomTypeCode="DBX">
          <RoomDescription Name="Deluxe Double Room">
            <Text>Bedding is 1 x King sized bed and 1 x Single bed. Continental breakfast for each guest.</Text>
          </RoomDescription>
        </RoomType>
      </RoomTypes>
      <RatePlans>
        <RatePlan RatePlanCode="BAR">
          <RatePlanDescription Name="Best Available Rate">
            <Text>Best available rate including breakfast.</Text>
          </RatePlanDescription>
        </RatePlan>
      </RatePlans>
    </RoomStay>
    <RoomStay>
      <RoomTypes>
        <RoomType RoomTypeCode="DBL">
          <RoomDescription Name="Standard Double Room">
            <Text>Bedding is 2 x Queen sized bed. Continental breakfast for each guest.</Text>
          </RoomDescription>
        </RoomType>
      </RoomTypes>
      <RatePlans>
        <RatePlan RatePlanCode="BAR">
          <RatePlanDescription Name="Best Available Rate">
            <Text>Best available rate including breakfast.</Text>
          </RatePlanDescription>
        </RatePlan>
      </RatePlans>
    </RoomStay>
  </RoomStays>
</OTA_HotelAvailRS>

The response will consist of multiple rooms, each of them have:
RoomType @RoomTypeCode - a unique code for the specific room, the same code will be used to identify the room in the rates availability push and pull methods.
RoomDescription @Name - the name of the room
RoomDescription/Text - free text description of the room
RatePlan @RatePlanCode - a unique name for the relevant rateplan used for the room/rate combination
RatePlanDescription @Name - the name of the rateplan
RatePlanDescription/Text - a free text description of the rateplan

Errors

In case of errors, you will get the following response:
<OTA_HotelAvailRS xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2015-11-11T11:11:12+00:00" EchoToken="12345678">
  <Errors>
    <Error Type="6" Code="392">Cannot find hotelier with code HOTEL1</Error>
  </Errors>
</OTA_HotelAvailRS>


Comments