The channel manager can use this method in order to retrieve information about the active contracts of a specific hotel.

Request

The query type (type) should be set to gethotelscontracts.

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>01b</version>
        <timestamp>20211004113909</timestamp>
        <transaction>12345</transaction>
    </header>
    <query type="gethotelscontracts" product="hotel" hotel="12466"/>
</envelope>

If you want to receive information about derived or connected contracts too, you can populate an optional attribute extended . See the example below

<?xml version="1.0" encoding="UTF-8"?>
<envelope>
    <header>
        <actor>...</actor>
        <user>...</user>
        <password>...</password>   
        <version>01b</version>
        <timestamp>20211004113909</timestamp>
        <transaction>12345</transaction>
    </header>
    <query type="gethotelscontracts" product="hotel" hotel="12466" extended="true"/>
</envelope>
Response

The reply message contains, within tag response, the various fields that show the active contracts specifying the room type.

  • code

    hotel contract

  • board

    this field will be filled with the room and meal treatment configured for the contract at the time of the request. This value will be composed by a combination of roombasis and mealsis separated by the "|" character.

  • commission

    this field may be filled with the markup of our systems. The channel managers always consider the net price, so the commission can be useful for them to obtain it (discount).

  • description

    room name

  • room

    room type

  • tsu

    This element indicates where the "single use" attribute is applied. its value will be either DBL (meaning that the room TSU describes a "double sole use") or TWN (meaning that the room TSU describes a "twin single use")

  • max_set_avail_date

    Optional. This element indicates the maximum date (YYYY-MM-DD format) configured in the contract for allotment updates. Updates sent over this date, may raise errors

  • max_set_rate_date

    Optional. This element indicates the maximum date (YYYY-MM-DD format) configured in the contract for rates updates. Updates sent over this date, may raise errors

  • update

    Optional element that will be returned if the request was performed with the extended attribute. Derived contracts will populate this element with value READ ONLY while contracts that share allotments will return with value RATES

  • operations_allowed

    Optional element that will be returned if the request was performed with the extended attribute. Will contain a boolean value (Y/N) for each operation. Y mean the operation is allowed on that contract while N means that the specific operation is not allowed and will, most likely, raise an error. Operations listed are: setavail, setrate, setclousure, setminimumstay, setmaximumstay

Below you can find an example of response the client could receive.

<?xml version="1.0" encoding="UTF-8"?>
<envelope>
    <header>
        <actor>...</actor>
        <user>...</user>
        <version>0.1b</version>
        <timestamp>20210216114736</timestamp>
        <transaction>87479</transaction>
    </header>
    <response type="gethotelscontracts"/>
    <agrements>
        <agrement>
            <code>801</code>
            <commission>None</commission>
            <description>STANDARD ROOM</description>
            <rooms>
                <room>TWN</room>
                <room>SGL</room>
                <room>DBL</room>
            </rooms>
            <tsu>DBL</tsu>
            <max_set_avail_date>2030-01-01</max_set_avail_date>
            <max_set_rate_date>2025-01-01</max_set_rate_date>
        </agrement>
        <agrement>
            <code>802</code>
            <board>RO|X</board>
            <description>SUPERIOR ROOM</description>
            <rooms>
                <room>TRP</room>
                <room>TWN</room>
                <room>SGL</room>
                <room>DBL</room>
                <room>QUD</room>
                <room>STR</room>
            </rooms>
            <tsu>TWN</tsu>
            <update>READ ONLY</update>
            <operations_allowed>
                <setavail>N</setavail>
                <setrate>N</setrate>
                <setclousure>N</setclousure>
                <setminimumstay>N</setminimumstay>
                <setmaximumstay>N</setmaximumstay>
            </operations_allowed>
        </agrement>
    </agrements>
</envelope>

From the response above, you can see the uploaded contracts (in this case 801, 802) for the required hotel and, for each contract, the available rooms:

  • STANDARD ROOM

    801: TWN, SGL, DBL

  • SUPERIOR ROOM

    802: TRP, TWN, SGL, DBL QUD, STR

This is the meaning of all the codes:

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