The supplier sends this message about the facilities availability. The query type (type) is set to setavail. Below you can see the fields you can find in the message body and their meanings.

Request
  • roomtype

    Room type. It collects all data about a room type

    • roomcode

      Parameter which identifies the room type

    • SGL single room
    • The availabilities of the TSU (twin for sole use room) can't be updated. They are inherited from the TWN.
    • TWN twin room
    • DBL double room
    • TRP triple room
    • QUD quadruple room
  • number

    Number of available rooms

  • release

    It indicates how many hours before the check-in you can't sell the contract any longer

  • maxrelease

    It indicates how many hours before check-in you can start selling the contract

  • generic

    indicates if the rooms can share the availability. At least two rooms have to share both the number of available allotments and the period (e.g. at least dbl and twn). The value of this parameter has to be set to “Y” (or "D" if the generic regards only twin and double rooms - and not all the rooms as when the value is "Y"). The default value is F (which means the “generic” is not active). If the channel manager set the number of available rooms with generic = "Y" or "D" and then wants to change it, either in a generic way or a not generic way, he has to specify the information of all the rooms (and not only of the rooms he wants to update) within the same xml request.

dates

A set of available dates for a given room type.

  • date
    • value

      effective date

    • operation

    indicates the operation type. The allowed values are insert and update: insert overwrites the number of available rooms, update sums it to the current number. Therefore, in order to zero the availability, you have to set the operation to “insert” and the number to “0”. Please remember that you can intervene only on the number of allotments (and not, e.g., on the dates).

  • days

    number of days for which there is availability. (You can add this number to the effective date to get the end of the period. 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>1.0.0</version>
        <timestamp>20210808162849</timestamp>
        <transaction>52791</transaction>
    </header>
    <query type="setavail" product="hotel" agrement="1299">
        <roomtype roomcode="TWN" number="7" generic="D" release="0">
            <dates>
                <date value="2022-02-12" operation="update">
                    <days>1</days>
                </date>
            </dates>
        </roomtype>
        <roomtype roomcode="DBL" number="7" generic="D" release="0">
            <dates>
                <date value="2022-02-12" operation="insert">
                    <days>1</days>
                </date>
            </dates>
        </roomtype>
        <roomtype roomcode="SGL" number="0" generic="D" release="0">
            <dates>
                <date value="2022-02-12" operation="insert">
                    <days>1</days>
                </date>
            </dates>
        </roomtype>
        <roomtype roomcode="TRP" number="5" generic="D" release="0">
            <dates>
                <date value="2022-02-12" operation="insert">
                    <days>1</days>
                </date>
            </dates>
        </roomtype>
        <roomtype roomcode="QUD" number="1" generic="D" release="0">
            <dates>
                <date value="2022-02-12" operation="insert">
                    <days>1</days>
                </date>
            </dates>
        </roomtype>
    </query>
</envelope>
Response

The reply message contains, within tag response, the string "OK" or in case of error the string "error code XX (description)". where XX represents an error code (error code list)