API action
Update restrictions(stay rules)
Tell ZimmerStack the restrictions of each night, like a minimum stay of 2 nights. ZimmerStack then tells every OTA the hotel sells on.
About this action
- What it does
- Sets the of one , for one night or for many nights. A restriction is a rule for a stay, like a or a .
- When to use it
- Each time a restriction changes in your software. For example the hotel wants stays of 2 nights or more at New Year.
- Who can use it
- A or a . A company key names the hotel with the . The key needs the
ari:write. - Address
PUThttps://api.zimmerstack.com/api/v1/connect-api/v1/restrictions- Before this
- You need a way to name the rate plan: your own for it, or its
ratePlanId. Get room types and rate plans shows both.
What you send
You send a list named updates. Each item is one rate plan, one range of nights, and one restriction or more.
- ratePlanId
- Number. ZimmerStack's id of the rate plan. Send this or
ratePlanRef, never both. - ratePlanRef
- Text. Your own for the rate plan: the one you gave it when you created it. Send this or
ratePlanId, never both. A rate plan 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. - stopSell
trueorfalse. Withtrue, this rate plan is not sold on these nights.- minStayArrival
- Whole number, 1 to 365. The minimum stay for a guest who arrives on this night.
- minStayThrough
- Whole number, 1 to 365. The minimum stay for every stay that includes this night.
- maxStay
- Whole number, 0 to 365. The . With
0, there is no maximum. - closedToArrival
trueorfalse. Withtrue, a guest may not arrive on this day. This is called .- closedToDeparture
trueorfalse. Withtrue, a guest may not leave on this day. This is called .- days
- List, like
["fr", "sa"]. Optional. Only these days of the week get the restriction. - dryRun
trueorfalse. Optional. Withtrue, nothing is saved: the answer only says what the request would do. See Test an update before you send it.
{
"updates": [
{
"ratePlanId": 901,
"dateFrom": "2026-12-24",
"dateTo": "2026-12-26",
"minStayArrival": 2
}
]
}Things to know
- Name the rate plan by your ref or by ZimmerStack's id. Each item names its rate plan one way:
ratePlanReforratePlanId. One request may hold both kinds. The answer is the same for both, and it names ZimmerStack's ids. - Send only what you want to change. A restriction you leave out stays as it is. Each item needs one restriction or more.
- A maximum stay cannot be below a minimum stay. A request with
maxStay: 2andminStayArrival: 3is refused. - Both dates are included. From the 24th to the 26th is three nights: 24, 25 and 26.
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-restrictions.json. Open a terminal in the same folder and run this. On Windows PowerShell, type curl.exe instead of curl.
curl -X PUT "https://api.zimmerstack.com/api/v1/connect-api/v1/restrictions" -H "Authorization: Bearer zsk_test_YOUR_KEY" -H "X-ZS-Property: YOUR_PROPERTY_ID" -H "Content-Type: application/json" -d "@update-restrictions.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-restrictions.json. Open a terminal in the same folder and run this. On Windows PowerShell, type curl.exe instead of curl.
curl -X PUT "https://api.zimmerstack.com/api/v1/connect-api/v1/restrictions" -H "Authorization: Bearer zsk_test_YOUR_KEY" -H "Content-Type: application/json" -d "@update-restrictions.json"What comes back
The is 202. It means: accepted. ZimmerStack saved your restrictions and is now sending them to the OTAs.
{
"statuscode": 202,
"message": "Accepted",
"data": {
"batchId": "7f1d2c4e-5a6b-4c8d-9e0f-112233445566",
"resource": "restrictions",
"requestedCells": 3,
"acceptedCells": 3,
"noopCells": 0,
"rejected": [],
"pushedBy": "ari-projector",
"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 rate plan is one . Here: 3 nights of 1 rate plan = 3.
- acceptedCells
- How many of them changed and were saved.
- noopCells
- How many already had these restrictions. 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.
- heldUntilGoLive
- Only when the hotel is not yet. With
true, the restrictions are saved and go to the OTAs when the hotel goes live. - notices
- Only when there is something to tell you. Each notice says what the update did not do.
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 restrictions 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 an item has no restriction in it. The message names the problem. An item with both
ratePlanIdandratePlanRef, or with neither, is refused too. - 400 UNKNOWN_RATE_PLAN
- No rate plan of this hotel has this
ratePlanIdor thisratePlanRef. Nothing was saved. Read them again with Get room types and rate plans. - 409 CATALOG_CONFLICT
- Two rate plans of this hotel have the ref you sent, so it names no single one. Nothing was saved. Name the rate plan by its
ratePlanId. - 400 RANGE_INVALID
dateTois beforedateFrom. Swap them.- 400 HORIZON
- A date is in the past or too far ahead. You can send dates up to 500 days from today.
- 400 TOO_MANY_UPDATES
- The list has more than 1,000 items. Send several requests.
- 400 TOO_MANY_CELLS
- The request names more than 5,000 cells. Split a big calendar into several requests.
- 422 NOTHING_ACCEPTED
- Not one item could be saved. The message says why.
- 409 ARI_NOT_AUTHORITATIVE
- This hotel is not live yet. To send restrictions before Go live, add the header
X-ZS-Before-Go-Live: true.
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-Propertyheader. - 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-Afterheader, 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 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 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 restrictions
It starts with zsk_test_. It is kept in this browser tab only. Never paste a live key into a web page.
Go deeper
- Send availability and rates: Send the rooms free, the prices and the stay rules for each night.
- After you send an update: What can happen after ZimmerStack accepts an update, and how you are told.
- Notices: What an update did not do, said in its own answer.
- Close and reopen a room type: Stop selling a room type on every OTA, and undo it.
- Test an update before you send it: See what an update would do. Nothing is saved.
Words on this page
- Restrictions
- Stay rules for a night, like a minimum stay of 2 nights, or no arrival on that day. Learn more
- Rate plan
- One way to sell a room type, with its own price. For example Room only, or With breakfast.
- Minimum stay
- The smallest number of nights a guest must book. With a minimum stay of 2, a one-night booking is not possible.
- Stop sell
- A switch on a rate plan for one night. When it is on, that rate plan is not sold on that night.
- OTA
- Online travel agency: a website that sells hotel rooms, like Booking.com, MakeMyTrip or Agoda. Learn more
- 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.
- Maximum stay
- The largest number of nights a guest may book in one stay.
- Closed to arrival
- A guest may stay on this night, but may not arrive (check in) on it.
- Closed to departure
- A guest may stay on this night, but may not leave (check out) on it.
- Dry run
- A test of a request. ZimmerStack checks it and says what it would do, but saves nothing.
- Notice
- A short message inside an answer. It tells you about something your request did not do.
- 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.
- Go live
- The moment a real hotel starts to sell through your software.
- 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
- 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.