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.
roomtype roomcode
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>
The reply message contains within tag response various fields describing the contract.
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>