The supplier sends this message to set closure dates and terms. The query type (type) is set to setclousure . Below you can see the fields you can find in the message body and their meanings.
date
closing period (one or more date elements can be sent in the same request)
startdate
first closing day
enddate
last closing day
roomcode
room types to close (Y) or to reopen (N). Only the room types sent are changed: the others keep their current value
Only room codes are accepted inside roomcode. The fields onrequest and freesale returned by getclousure are read-only and must not be sent.
checkinonly
(optional) Boolean (Y/N) value:
checkoutonly
(optional) Boolean (Y/N) value:
When neither checkinonly nor checkoutonly is Y, the closure is a normal closure (stop sell): it is valid for any stay that overlaps start and end date provided.
A closure can not be both checkinonly and checkoutonly an error (ClosureTypeException) is raised if the request is set like this.
This call doesn't manage the parameter "generic".
Closures on arrival are returned by getclousuretoarrival, normal closures and closures on departure by getclousure.
Let’s see an example of message the client could send: a closure on arrival for all room types.
<?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="setclousure" product="hotel" agrement="5629">
<date>
<startdate>2022-01-01</startdate>
<enddate>2022-01-01</enddate>
<checkinonly>Y</checkinonly>
<checkoutonly>N</checkoutonly>
<roomcode>
<SGL>Y</SGL>
<TWN>Y</TWN>
<DBL>Y</DBL>
<TRP>Y</TRP>
<QUD>Y</QUD>
<STR>Y</STR>
</roomcode>
</date>
</query>
</envelope>
The following message reopens the double room of that closure on arrival; the other room types stay closed on arrival, and normal closures or closures on departure of the same day are not changed.
<?xml version="1.0" encoding="UTF-8"?>
<envelope>
<header>
<actor>test</actor>
<user>test</user>
<password>test</password>
<version>0.1b</version>
<timestamp>20210423170200</timestamp>
<transaction>12346</transaction>
</header>
<query type="setclousure" product="hotel" agrement="5629">
<date>
<startdate>2022-01-01</startdate>
<enddate>2022-01-01</enddate>
<checkinonly>Y</checkinonly>
<roomcode>
<DBL>N</DBL>
</roomcode>
</date>
</query>
</envelope>
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). The exceptions are described in the exceptions page.