---
title: 'Get closures'
url: 'https://documentation.netstorming.net/channel-manager/channel-manager-protocol/get-closures'
markdown: 'https://documentation.netstorming.net/channel-manager/channel-manager-protocol/get-closures.md'
date: '2026-11-10'
description: 'The supplier sends this message about the closures which are applied by the structures. The query type (type) is set to getclousure. This call returns normal closures (stop sell) and closures on departure (checkoutonly). Closures on arrival (checkinonly) are not returned here, whether they were set…'
taxonomy:
  category:
    - docs
---

# Get closures

[](#)  [ Channel Manager ](https://documentation.netstorming.net/channel-manager)     [ Channel Manager Protocol ](https://documentation.netstorming.net/channel-manager/channel-manager-protocol)      Get closures    

The supplier sends this message about the closures which are applied by the structures. The query type (**type**) is set to **getclousure**.

This call returns normal closures (stop sell) and closures on departure (checkoutonly). Closures on arrival (checkinonly) are not returned here, whether they were set through the channel manager or through the extranet: they are returned only by [getclousuretoarrival](https://documentation.netstorming.net/channel-manager/channel-manager-protocol/get-closures-to-arrival).

Below you can see the fields you can find in the message body and their meanings.

##### Request

- **startdate**

    first day of the period requested
- **days**

    number of days. (You can add this number to the start date to get the end of the period. If these two dates correspond this value is set to 0).

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

```xml
<?xml version="1.0" encoding="UTF-8"?>
<envelope>
    <header>
        <actor>...</actor>
        <user>...</user>
        <password>....</password>
        <version>0.1b</version>
        <timestamp>20160427</timestamp>
        <transaction>160125</transaction>
    </header>
    <query type="getclousure" product="hotel" agrement="1299">
        <startdate>2022-08-01</startdate>
        <days>300</days>
    </query>
</envelope>
```

##### Response

The reply message contains, after tag **response**, one **date** element for each period of consecutive days with the same closure terms, limited to the period requested. When a normal closure and a closure on departure apply to the same day, they are returned as separate **date** elements.

**date**

- **startdate**

    first closing day
- **days**

    number of days. (You can add this number to the start date to get the end of the period. If these two dates correspond this value is set to 0)
- **roomtype**

    closure terms for each room type (**Y** closed, **N** open). Room types not enabled on the agreement are always returned as **N**
- - **SGL single room**
- - **TWN twin room**
- - The closures of the **TSU (twin for sole use room)** are inherited from the TWN.
- - **DBL double room**
- - **TRP triple room**
- - **QUD quadruple room**
- - **STR big accommodations**
- - **onrequest** Y: the closure will not remove the contract from availability but will change its status to "on request" thus allowing the hotel to consider confirming the reservation. Closures set through the channel manager are always N
- - **freesale** Y: the closure is applied only on allotments pushed via CM; N: the closure is applied on all allotments. The value depends on the closure configuration of the agreement
- - **checkinonly** always N in this call (closures on arrival are returned by getclousuretoarrival)
- - **checkoutonly** Y: closure on departure, applied only if the checkout day falls inside the startdate - enddate interval; N: normal closure, applied to any stay that overlaps the interval

**onrequest** and **freesale** are read-only: they are not accepted by [setclousure](https://documentation.netstorming.net/channel-manager/channel-manager-protocol/set-closures).

Let’s see an example of message the client could receive: on 2022-12-25 and 2022-12-26 the double room has a normal closure, and all room types have a closure on departure.

```xml
<?xml version="1.0" encoding="UTF-8"?>
<envelope>
    <header>
        <actor>...</actor>
        <user>...</user>
        <version>0.1b</version>
        <timestamp>20210219164156</timestamp>
        <transaction>160125</transaction>
    </header>
    <response type="getclousure"/>
    <date>
        <startdate>2022-12-25</startdate>
        <days>1</days>
        <roomtype>
            <SGL>N</SGL>
            <TWN>N</TWN>
            <DBL>Y</DBL>
            <TRP>N</TRP>
            <QUD>N</QUD>
            <STR>N</STR>
            <onrequest>N</onrequest>
            <freesale>Y</freesale>
            <checkinonly>N</checkinonly>
            <checkoutonly>N</checkoutonly>
        </roomtype>
    </date>
    <date>
        <startdate>2022-12-25</startdate>
        <days>1</days>
        <roomtype>
            <SGL>Y</SGL>
            <TWN>Y</TWN>
            <DBL>Y</DBL>
            <TRP>Y</TRP>
            <QUD>Y</QUD>
            <STR>Y</STR>
            <onrequest>N</onrequest>
            <freesale>Y</freesale>
            <checkinonly>N</checkinonly>
            <checkoutonly>Y</checkoutonly>
        </roomtype>
    </date>
</envelope>
```

In case of error the reply message contains, within tag **response**, the string "error code XX (description)", where XX represents an error code. The exceptions are described in the [exceptions](https://documentation.netstorming.net/channel-manager/exceptions) page.

 [ ](https://documentation.netstorming.net/channel-manager/channel-manager-protocol/get-tariffs) [](https://documentation.netstorming.net/channel-manager/channel-manager-protocol/get-deadlines)

---

## Navigation

- Parent: [Channel Manager Protocol](https://documentation.netstorming.net/channel-manager/channel-manager-protocol.md)
- Previous: [Get tariffs](https://documentation.netstorming.net/channel-manager/channel-manager-protocol/get-tariffs.md)
- Next: [Get deadlines](https://documentation.netstorming.net/channel-manager/channel-manager-protocol/get-deadlines.md)
