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.

Request

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

    • SGL single room
    • TWN twin room
    • The closures of the TSU (twin for sole use room) are inherited from the TWN: do not send TSU, the request is rejected
    • DBL double room
    • TRP triple room
    • QUD quadruple room
    • STR big accommodations

    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:

    • Y: closure on arrival, valid only for stays starting between start and end date provided
    • N or not sent: the closure is not a closure on arrival
  • checkoutonly

    (optional) Boolean (Y/N) value:

    • Y: closure on departure, valid only for stays finishing between start and end date provided
    • N or not sent: the closure is not a closure on departure

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".

Closure types, updates and reopening
  • Normal closures, closures on arrival (checkinonly) and closures on departure (checkoutonly) are three independent closure types. Each day and room type can have one closure of each type at the same time, and setting one type never changes or removes the others, whatever the order of the requests.
  • A request updates the closure of the same type already present on the same day: the room types sent overwrite the stored values, the room types not sent keep their current value.
  • To reopen a room type, send it with N using the same closure type it was closed with: checkinonly Y for a closure on arrival, checkoutonly Y for a closure on departure, neither for a normal closure. A room type sent with N without flags does not reopen closures on arrival or on departure.
  • When all room types of a closure are reopened on a day, the closure is removed for that day.
  • When a closure of a type is created on a day where no closure of that type exists yet, the room types not sent are created closed: always send every room code explicitly with Y or N.
  • In the same request, two date elements of the same closure type that cover the same day with opposite values (Y and N) for the same room type are rejected (OverlappingItemsException).

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>
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). The exceptions are described in the exceptions page.