Skip to content

API action

Update availability(how many rooms are free)

Tell ZimmerStack how many rooms are free. ZimmerStack then tells every OTA the hotel sells on.

About this action

What it does
Sets the number of free rooms of one , for one night or for many nights. Every then shows this number.
When to use it
Each time the number changes in your software: a new , a cancelled booking, a room closed for repair. Also once at the start, for all nights you sell.
Who can use it
A or a . A company key names the hotel with the . The key needs the ari:write.
Address
PUT https://api.zimmerstack.com/api/v1/connect-api/v1/availability
Before this
You need a way to name the room type: your own for it, or its roomTypeId. Get room types and rate plans shows both.

What you send

You send a list named updates. Each item in the list is one room type and one range of nights.

roomTypeId
Number. ZimmerStack's id of the room type. Send this or roomTypeRef, never both.
roomTypeRef
Text. Your own for the room type: the one you gave it when you created it. Send this or roomTypeId, never both. A room type that the hotel's owner made has no ref of yours.
dateFrom
Text, like 2026-12-24 (year-month-day). Required. The first night.
dateTo
Text, like 2026-12-26. Required. The last night. To set one night only, send the same date in both.
available
Whole number, 0 or more. Required. How many rooms of this room type are free on each of these nights.
dryRun
true or false. Optional. With true, nothing is saved: the answer only says what the request would do. See Test an update before you send it.
example: 3 Deluxe rooms free on 24, 25 and 26 December
{
  "updates": [
    {
      "roomTypeId": 412,
      "dateFrom": "2026-12-24",
      "dateTo": "2026-12-26",
      "available": 3
    }
  ]
}

Things to know

  1. Name the room type by your ref or by ZimmerStack's id. Each item names its room type one way: roomTypeRef or roomTypeId. One request may hold both kinds. The answer is the same for both, and it names ZimmerStack's ids.
  2. Send the full number, not the change. 3 means "3 rooms are free". It does not mean "3 more" or "3 fewer". If 3 rooms were free and one is booked, send 2.
  3. Both dates are included. From the 24th to the 26th is three nights: 24, 25 and 26.
  4. Dates are on the hotel's own calendar. A hotel in India uses Indian dates, even if your server is in another country.

The request, in your language

Show the examples for

A sandbox's own key works for one hotel: choose "A hotel key" for it.

Put your key in place of zsk_test_YOUR_KEY, and your hotel's property id in place of YOUR_PROPERTY_ID.

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

terminal
curl -X PUT "https://api.zimmerstack.com/api/v1/connect-api/v1/availability" -H "Authorization: Bearer zsk_test_YOUR_KEY" -H "X-ZS-Property: YOUR_PROPERTY_ID" -H "Content-Type: application/json" -d "@update-availability.json"

Put your key in place of zsk_test_YOUR_KEY. A hotel key works for one hotel, so the request does not name the hotel.

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

terminal
curl -X PUT "https://api.zimmerstack.com/api/v1/connect-api/v1/availability" -H "Authorization: Bearer zsk_test_YOUR_KEY" -H "Content-Type: application/json" -d "@update-availability.json"

What comes back

The is 202. It means: accepted. ZimmerStack saved your numbers and is now sending them to the OTAs.

response · status code 202
{
  "statuscode": 202,
  "message": "Accepted",
  "data": {
    "batchId": "7f1d2c4e-5a6b-4c8d-9e0f-112233445566",
    "resource": "availability",
    "requestedCells": 3,
    "acceptedCells": 3,
    "noopCells": 0,
    "rejected": [],
    "pushedBy": "inventory-drain",
    "poll": "/api/v1/connect-api/v1/batches/7f1d2c4e-5a6b-4c8d-9e0f-112233445566"
  }
}
batchId
The id of this update. An update is called a . Save the id if you want to check the update later.
requestedCells
How many nights you sent. One night of one room type is one . Here: 3 nights of 1 room type = 3.
acceptedCells
How many of them changed and were saved.
noopCells
How many already had this number. Nothing was done for these.
rejected
The items that could not be saved, each with a reason. An empty list means none.
poll
The address to ask if this update has reached the OTAs.

Then check that it reached the OTAs

202 means saved. It does not yet mean the OTAs have it. Sending to the OTAs takes a few seconds, sometimes a few minutes. To check, use Check an update with the batchId.

status: pending
Still on its way. Wait 15 seconds and ask again.
status: landed
Done. Our has your numbers for the OTAs.
status: failed
Some nights were not taken. The answer says which, and why.

Common mistakes

400 VALIDATION
A value has the wrong type or is missing. The message names it. Send available as a number, without quotes. An item with both roomTypeId and roomTypeRef, or with neither, is refused too.
400 UNKNOWN_ROOM_TYPE
No room type of this hotel has this roomTypeId or this roomTypeRef. Nothing was saved. Read them again with Get room types and rate plans.
409 CATALOG_CONFLICT
Two room types of this hotel have the ref you sent, so it names no single one. Nothing was saved. Name the room type by its roomTypeId.
400 RANGE_INVALID
dateTo is before dateFrom. Swap them.
400 HORIZON
A date is too far ahead. You can send dates up to 500 days from today.
400 TOO_MANY_UPDATES
One request can hold up to 1,000 items in updates. Split a big calendar into several requests.
400 TOO_MANY_CELLS
The request names more than 5,000 cells. Split a big calendar into several requests.
Other errors this request can give
401 API_KEY_INVALID
The key is not right. Copy it again, all of it, with no space before or after.
400 PROPERTY_REQUIRED
You hold a company key and did not name the hotel. Add the X-ZS-Property header.
404 PROPERTY_NOT_FOUND
The property id is not one of your hotels. Use an id from List your hotels.
403 SCOPE_MISSING
The key is not allowed to do this. It needs the scope ari:write.
403 IP_NOT_ALLOWED
The key only works from the addresses its owner allowed.
429 RATE_LIMITED
Too many requests in a short time. Wait the number of seconds in the Retry-After header, then send again.
401 API_KEY_REVOKED
The key was switched off, or it was replaced and its extra 24 hours are over. Ask the key's owner for the new key. Nothing else makes this key work.
403 WRITES_SUSPENDED
ZimmerStack has suspended the updates of this integration. details.reason says why. Stop sending and write to ZimmerStack support. Reading and bookings still work.
409 ARI_NOT_AUTHORITATIVE
The hotel is not live yet: your software is not its source of truth, so nothing was saved. GET /readiness says what is missing, and POST /go-live makes the switch. To send rates before that, add the header X-ZS-Before-Go-Live: true. It is the same for a company key and for a hotel's own key: a hotel key with ari:read or ari:write can be made before its hotel is live.
409 CHANNEL_MANAGER_DISABLED
The hotel's channel manager is off, so nothing would be sent to an OTA. details.reason says why. not_on_channel_manager: the hotel was never put on it. With a company key, send its room types and rate plans (PUT /catalog/room-types, then PUT /catalog/rate-plans), or press Finish setup in the Channels app. Either puts it there. switched_off: the hotel's owner switched it off. Only the owner can switch it back on.
409 PROPERTY_UNAVAILABLE
The hotel is deleted or is a demo. Or a test key was used on a real hotel, or a live key on a sandbox. Check which key you send. If the key is right, contact the hotel's owner.
422 NOTHING_ACCEPTED
Every part of the request was refused, and details.rejected says why. The reason can be a price rule of the hotel. It can be a value our connectivity partner refused before and still holds. Or, before the hotel is live, it can be availability that raises what is on sale. Send availability again right after going live. Fix what the message names. The same request is refused again.
422 RATE_OUT_OF_BAND
A price is far from the rate plan's standing price, so nothing was saved. Send prices as the guest pays them (4500, not 450000). If you want that price, change the rate plan's defaultRate first.
503 SHIELD_UNAVAILABLE
A problem on our side: the update could not be checked against the hotel's limits, so nothing was saved. Wait the seconds in Retry-After and send again.
503 WRITES_FROZEN
ZimmerStack has paused the updates of every integration for now, never yours alone. Wait the seconds in Retry-After and send again. Reading and bookings still work.

Try it now

No code and no install. This box sends a real request to your . It works with a only, so it can never change a real hotel.

Try it here: update availability on your sandbox

It starts with zsk_test_. It is kept in this browser tab only. Never paste a live key into a web page.

Go deeper

Words on this page

Availability
How many rooms of one room type are free to sell on one night. Learn more
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.
OTA
Online travel agency: a website that sells hotel rooms, like Booking.com, MakeMyTrip or Agoda. Learn more
Booking
A guest has reserved a room for some nights. Also called a reservation.
Ref
Your own name or id for a room type or a rate plan. You choose it, and ZimmerStack remembers it.
Company key
The key of a software company. One key works for all the hotels of that company.
Hotel key
A key that works for one hotel only. The hotel's owner makes it, or a partner makes it for a hotel it added.
X-ZS-Property
The header that tells ZimmerStack which hotel a request is for. Its value is the property id.
Header
A small piece of extra information sent with a request, like your key.
Scope
One permission of a key. For example ari:write lets the key update availability, rates and restrictions.
Status code
A number in every response. 200 to 299 means it worked. 400 and above means there is a problem.
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.
Sandbox
Your test hotel. It works like a real hotel, but no OTA can see it and it costs nothing.
Test key
A key that starts with zsk_test_. It works only on a sandbox, so it can never change a real hotel.

New here? Start with the partner path or the one-hotel path.

Routes, samples, limits and codes on this page come from the API's public contract, read live, Fri, 04 Dec 2026 18:26:01 UTC.