Skip to content

Guide

Close and reopen a room type

One stops selling one on the nights you name, on every . It stays closed. A second request undoes exactly that close. You do not need to know the hotel's rate plans.

The idea

There are two ways to stop selling a room. Each one has a gap.

Availability 0
0 closes the room everywhere. But a cancellation at an OTA puts one room back, and the room sells again.
A stop sell
A stays, whatever the availability does. But it stops one only.
Close a room type
It does both at once. Availability goes to 0, and stop sell is switched on for every rate plan of the room type. Together the room is closed, and it stays closed.

Here is one example. A water pipe breaks at the hotel. The Deluxe Garden Rooms cannot be used from 24 to 26 December. One request closes them on every OTA. When the pipe is fixed, one request opens them again.

Close
Close a room type closes one room type on a range of nights, everywhere, in one request. The of each rate plan take the stop sell from it.
Reopen
Reopen a room type undoes exactly that close, and nothing else.
Who can use them
A key with the ari:write.

An example: close

The front desk presses "close this room type" in your software. Your software sends this:

example: the data you send
{
  "roomTypeId": 412,
  "dateFrom": "2026-12-24",
  "dateTo": "2026-12-26"
}
roomTypeId
The id of the room type.
dateFrom and dateTo
The first night and the last night. Both are included.
days
Optional. The days of the week, when you want only some of them.
dryRun
Optional. With true, the answer says what the request would do, and nothing is saved.
Another field
A field ZimmerStack does not know gets 400 VALIDATION.

Save the example above as close-a-room-type.json. Open a terminal in the same folder and run this. On Windows PowerShell, type curl.exe instead of curl.

terminal
curl -X POST "https://api.zimmerstack.com/api/v1/connect-api/v1/availability/close" -H "Authorization: Bearer zsk_test_YOUR_KEY" -H "Content-Type: application/json" -d "@close-a-room-type.json"

Also send the header X-Idempotency-Key, with a value you choose, such as close-412-2026-12-24. Then a close whose answer was lost can be sent again. It is never done twice.

With the Node package, a close and a reopen look like this:

close, read what was not reached, reopen
// One call: the room type's count goes to 0 AND stop-sell is switched on for every one of its rate plans.
const closed = await zs().availability.close({ roomTypeId, dateFrom, dateTo });
console.log(closed.count.changedNights, "nights closed,", closed.ratePlans.length, "rate plans stopped");

// Read what the close could not reach: a close that reads done can still leave something selling.
for (const gap of closed.notReached) console.log(gap.what, gap.reason, gap.message);

// Later: undo exactly that close. Only your software knows how many rooms are free now, so say it.
const reopened = await zs().availability.reopen({ roomTypeId, dateFrom, dateTo, available: roomsFreeNow });
console.log(reopened.count.changedNights, "nights reopened,", reopened.skippedNights, "were not closed by a close");
what comes back: status code 202, the data part
{
  "action": "close",
  "dryRun": false,
  "roomTypeId": 412,
  "dateFrom": "2026-12-24",
  "dateTo": "2026-12-26",
  "nights": 3,
  "count": {
    "changedNights": 3,
    "unchangedNights": 0
  },
  "ratePlans": [
    {
      "ratePlanId": 901,
      "name": "Bed and breakfast",
      "changedNights": 3,
      "unchangedNights": 0,
      "perOtaPlans": 1
    },
    {
      "ratePlanId": 904,
      "name": "Room only",
      "changedNights": 2,
      "unchangedNights": 1,
      "perOtaPlans": 0
    }
  ],
  "notReached": [
    {
      "what": "ota-linked-rates",
      "reason": "not-ours",
      "message": "A rate an OTA links on its own side is not a rate plan here and takes no stop-sell from us. It is closed by the count alone, and an OTA cancellation puts one room back on the count: if this hotel has such a rate (its channels: BookingCom, Goibibo), send availability 0 again after a cancellation on these nights."
    }
  ],
  "skippedNights": 0,
  "batches": [
    {
      "resource": "availability",
      "batchId": "3c2b1a09-8f7e-4d6c-b5a4-938271605f4e",
      "poll": "/api/v1/connect-api/v1/batches/3c2b1a09-8f7e-4d6c-b5a4-938271605f4e"
    },
    {
      "resource": "restrictions",
      "batchId": "9e8d7c6b-5a49-4382-a716-0f1e2d3c4b5a",
      "poll": "/api/v1/connect-api/v1/batches/9e8d7c6b-5a49-4382-a716-0f1e2d3c4b5a"
    }
  ]
}

Availability went to 0 on 3 of the 3 nights. Stop sell was switched on for each of the room type's 2 rate plans. "Room only" already had a stop sell on 1 of them. So only 2 of its nights changed.

count
How many nights got availability 0 now, and how many already had it.
ratePlans
Each rate plan of the room type, with the nights that changed and the nights that were already stopped.
notReached
What the close could not switch off. Read this part. The next section explains it.
skippedNights
On a reopen: the nights the close had not closed.
batches
One for availability and one for restrictions. Use Check an update to see each one arrive.

Read notReached: what the close could not reach

The answer says what was closed, and what was already closed. It also has the list notReached. It names every rate plan that is not linked, or that no OTA sells. And it names the one thing no stop sell can reach: an . Only availability 0 closes that.

  • reasonnot-ours
    What it meansAn OTA-linked rate. It is not a rate plan in ZimmerStack, so no stop sell reaches it. Only availability 0 closes it.
  • reasonnot-linked
    What it meansA room type or rate plan that has no link to our connectivity partner. Nothing sent for it reaches an OTA.
  • reasonnot-mapped
    What it meansA rate plan that no connected OTA sells. Stopping it changes nothing a guest sees.
  • reasonnot-source-of-truth
    What it meansThe hotel is not live. ZimmerStack's record is not what its OTAs are sent.
  • reasonrefused
    What it meansSomething ZimmerStack's own record refused.
  • reasonchanged-since
    What it meansOn a reopen: the night's availability was changed after the close. So it was left as it is.
  • reasonno-count-before
    What it meansOn a reopen: the night had no availability before the close. So there is none to put back.

In this table, is the company between ZimmerStack and the OTAs. The API's own messages call it "the channel manager".

Reopen

Reopen takes the same data as close. It can take one more field, available.

Save the example above as reopen-a-room-type.json. Open a terminal in the same folder and run this. On Windows PowerShell, type curl.exe instead of curl.

terminal
curl -X POST "https://api.zimmerstack.com/api/v1/connect-api/v1/availability/reopen" -H "Authorization: Bearer zsk_test_YOUR_KEY" -H "Content-Type: application/json" -d "@reopen-a-room-type.json"
It undoes that close, and nothing else
It switches the stop sell off on the rate plans the close switched on. A rate plan that already had a stop sell before the close keeps it.
The availability
Each night gets back the number it had before the close. That happens only where the 0 of the close is still there.
Or you say the number
Send available, and that number is saved on every closed night. Only your software knows how many rooms are free now.
A night that changed after the close
It is left as it is. It is named in notReached, with the reason changed-since.
A night the close had not closed
It is skipped. It is never opened. skippedNights counts these nights.

The rules

Normal updates underneath
Both requests are normal updates inside. The status code is 202, with one batch for availability and one for restrictions. The status code is 200 when nothing had to change, and on a dry run.
What it costs
For every night, it counts the room type's availability and each of its rate plans against the limit of . So one night of a room type with 2 rate plans is 3 cells. More than 5,000 cells in one request gets 400 TOO_MANY_CELLS.
A close passes when you are paused
A close only closes rooms. So it is accepted when your is paused or over a limit. This is the , and the answer has lane: true.
A reopen waits
A reopen opens rooms. So when you are paused, it waits like any other update that opens rooms. The answer is 429 RATE_LIMITED, and data.scope says shield-pause.
Send it again safely
Send an in the header X-Idempotency-Key, as on every update.
See it first
Both take dryRun: true. Then they answer what they would do, with no batches. Test an update before you send it explains it.
What can go wrong
400 VALIDATION, RANGE_INVALID, HORIZON, TOO_MANY_CELLS or UNKNOWN_ROOM_TYPE. Also the 403, 429 and 503 answers of any update. Errors says what each one means.

The two requests

Each request has its own page, with every field and a box to try it.

Close a room type
POST https://api.zimmerstack.com/api/v1/connect-api/v1/availability/close Scope ari:write. Open its page.
Reopen a room type
POST https://api.zimmerstack.com/api/v1/connect-api/v1/availability/reopen Scope ari:write. Open its page.

Words on this page

Request
One message your software sends to the API.
Room type
A kind of room the hotel sells, like Deluxe Room or Family Suite. A hotel can have 12 rooms of one room type.
Rate plan
One way to sell a room type, with its own price. For example Room only, or With breakfast.
OTA
Online travel agency: a website that sells hotel rooms, like Booking.com, MakeMyTrip or Agoda. Learn more
Availability
How many rooms of one room type are free to sell on one night. Learn more
Stop sell
A switch on a rate plan for one night. When it is on, that rate plan is not sold on that night.
Per-OTA plan
A child of a rate plan, made for one OTA only. It takes its restrictions from its parent rate plan, and often its price too.
OTA-linked rate
A rate a hotel sets up inside an OTA's own extranet, so that it follows another rate there. ZimmerStack does not hold it.
Connectivity partner
The company that carries ZimmerStack's numbers to each OTA and brings the bookings back. You never call it. Where an API name says channel manager, it means this last step. Learn more
Scope
One permission of a key. For example ari:write lets the key update availability, rates and restrictions.
Batch
One update you sent. It gets an id (batchId), so you can ask later if it reached the OTAs.
Cell
One night of one room type or rate plan. An update for 3 nights of 1 room type is 3 cells.
Integration
Your software, once it is connected to ZimmerStack through the API.
Safety lane
A rule that lets an update that only closes rooms pass, even when your limit is used up or your integration is paused.
Idempotency key
A code you choose and send with an update. If the same update is sent twice by mistake, it is done only once.

Routes, samples, limits and codes on this page come from the API's public contract, read live, Sat, 05 Dec 2026 01:08:27 UTC.