The supplier sends this message about the contract types that are used in structures. The message query type(type) is set to getcontracts. Below you can see the fields you can find in the message body and their meanings.

Request
  • roomtype roomcode

    • room type
    • SGL single room
    • TSU twin for sole use room
    • TWN twin room
    • DBL double room
    • TRP triple room
    • QUD quadruple room
    • STR big accommodations
  • startdate

    interval effective date

  • days

    number of days interval

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

<?xml version="1.0" encoding="UTF-8"?>
<envelope>
    <header>
    <actor>test</actor>
        <user>test</user>
        <password>test</password>
        <version>0.1b</version>
        <timestamp>20210423170100</timestamp>
        <transaction>12345</transaction>
    </header>
    <query type="getcontract" product="hotel" agrement="5629">
    <roomtype roomcode="DBL">
        <startdate>2022-05-01</startdate>
        <days>15</days>
    </roomtype>
    </query>
</envelope>
Response

The reply message contains within tag response various fields describing the contract.

  • roomtype -> roomcode (room requested)
  • tariff
    • date -> value (first day of the tariff)
    • days (duration of the tariff in days)
    • weekend
      • firstday: first day of the week end set for this contract. Values may be: MON = Monday, TUE = Tuesday, WED = Wednesday, THU = Thursday, FRI =Friday, SAT = Saturday, SUN = Sunday)
      • endday: last day of the weekend for this contract (same values as firstday)
    • max_value (NO max if supplier is allowed to set any amount for room tariff, otherwise the value here cannot be surpassed by any rate set for this room type in setrate call)
    • type_value (Indicates period of appliance of the tariff. Values may be Both (all days), Weekend (days between weekend), weekday (days outside weekend), Numbers from 0 to 6 meaning the days of the week of appliance (0 = Monday, 1 = Tuesday etc..)

For each room is returned to the starting date of the range and number of days interval and if there is the maximum rate. The returned interval could be wider than the requested one.

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

<envelope>
    <header>
        <actor>...</actor>
        <user>...</user>
        <version>0.1b</version>
        <timestamp>20211207</timestamp>
        <transaction>12345</transaction>
    </header>
    <response type="getcontract"/>
    <roomtype roomcode="DBL">
        <tarif>
            <date value="2021-09-27">
                <days>110</days>
                <weekend>
                    <firstday>MON</firstday>
                    <endday>MON</endday>
                </weekend>
                <max_value>2000.0</max_value>
                <type_value>Both</type_value>
            </date>
            <date value="2021-01-16">
                <days>349</days>
                <weekend>
                    <firstday>MON</firstday>
                    <endday>MON</endday>
                </weekend>
                <max_value>2050.0</max_value>
                <type_value>Weekend</type_value>
            </date>
            <date value="2021-01-16">
                <days>349</days>
                <weekend>
                    <firstday>MON</firstday>
                    <endday>MON</endday>
                </weekend>
                <max_value>2020.0</max_value>
                <type_value>weekday</type_value>
            </date>
        </tarif>
    </roomtype>
[...]
</envelope>