The supplier sends this message to request the availability about saved structures. The query type(type) is set to getavail.

Below you can see the fields you can find in the message body and their meanings.

Request
  • roomtype

    Room type. It collects all data relating to a room type.

  • roomcode

    Room type. Collects all data for a type of room.

    • SGL single room
    • The availabilities of the TSU (twin for sole use room) are inherited from the TWN.
    • TWN twin room
    • DBL double room
    • TRP triple room
    • QUD quadruple room
    • STR big accommodations
  • startdate

    requested effective date

  • days

    requested number of days of availability. (You can add this number to the start date to get the end date. If these two dates correspond you must set this value to 0)

Let’s see an example of message the client could send.

<?xml version="1.0" encoding="UTF-8"?>
<envelope>
       <header>
        <actor>...</actor>
        <user>...</user>
        <password>...</password>
          <version>0.1b</version>
          <timestamp>20210427</timestamp>
          <transaction>160125</transaction>
      </header>
  <query type="getavail" product="hotel" agrement="1299">
        <roomtype roomcode="SGL">
          <startdate>2018-12-01</startdate>
          <days>60</days>
        </roomtype>
        <roomtype roomcode="DBL">
          <startdate>2022-12-01</startdate>
          <days>60</days>
        </roomtype>
        <roomtype roomcode="TRP">
          <startdate>2022-12-01</startdate>
          <days>60</days>
        </roomtype>
    </query>
</envelope>
Response

The reply message contains, within tag response, a XML text with the structure you can see below.

roomtype

Room type. It collects all data relating to a room type.

  • roomcode

    Parameter that identifies the room type

    • SGL single room
    • TWN twin room
    • DBL double room
    • TRP triple room
    • QUD quadruple room
    • STR big accommodations
  • date

    • value

    effective date

    • days

    number of days (You can add this number to the start date to get the end date. If these two dates correspond this value has to be set to 0).

    • avail

    number of available rooms

    • release

    number of release hour

    • maxrelease

    maximum number of release hour

Let’s see an example of message the client could receive.

<?xml version="1.0" encoding="UTF-8"?>
<envelope>
    <header>
        <actor>...</actor>
        <user>...</user>
        <version>0.1b</version>
        <timestamp>20210219163902</timestamp>
        <transaction>160125</transaction>
    </header>
    <response type="getavail"/>
    <roomtype roomcode="TRP">
        <date value="2022-12-03">
            <days>1</days>
            <avail>4</avail>
            <release>7</release>
            <maxrelease>9</maxrelease>
            <generic>F</generic>
        </date>
    </roomtype>
    <roomtype roomcode="SGL">
        <date value="2022-12-03">
            <days>1</days>
            <avail>0</avail>
            <release>7</release>
            <maxrelease>9</maxrelease>
            <generic>F</generic>
        </date>
    </roomtype>
    <roomtype roomcode="DBL">
        <date value="2022-12-03">
            <days>1</days>
            <avail>4</avail>
            <release>7</release>
            <maxrelease>9</maxrelease>
            <generic>F</generic>
        </date>
    </roomtype>
</envelope>

In case of error the reply message contains, within tag response, the string "error code XX (description)", where XX represents an error code.