Partner path · step 7 of 10
Send availability and rates(rooms free and prices, night by night)
Your has room types and rate plans. Now it needs numbers for each night: how many rooms are free, what a night costs, and the rules of a stay. In this step you send all three, for three nights.
Before you start
- Your , and the id of your test hotel. In the example the id is
9001. - The of one . In the example:
rt-deluxe, the Deluxe Room. - The ref of one . In the example:
rp-bb, Bed and breakfast.
A ref is your own name for a room type or a rate plan. You chose these two yourself: the first in step 4, the second in step 6. So you do not need to read anything back first.
The three updates
Hotel people call them : availability, rates and restrictions. Each one is its own request.
- Availability
- How many rooms of one room type are free on a night. See . It names the room type, with
roomTypeRef. - Rates
- The price of one night of one rate plan. See . It names the rate plan, with
ratePlanRef. - Restrictions
- The rules of a stay for one rate plan, like a stay of 2 nights or more. See . It names the rate plan, with
ratePlanRef.
The three requests have the same form.
- The is a list named
updates. Each item names one room type or one rate plan, and one range of nights. dateFromis the first night anddateTois the last night. Both are included. From the 24th to the 26th is three nights.- A date is written as year-month-day. It is a date on the hotel's own calendar. It must be today or later.
- Each request names the hotel in the .
1. Send availability
The Lantern House has 3 Deluxe Rooms free on 24, 25 and 26 December 2026. This is the body. Save it as update-availability.json.
{
"updates": [
{
"roomTypeRef": "rt-deluxe",
"dateFrom": "2026-12-24",
"dateTo": "2026-12-26",
"available": 3
}
]
}You can try it here first, with no code. Then send it from your own computer. Put your own key in place of zsk_test_YOUR_KEY, and the id of your test hotel in place of YOUR_PROPERTY_ID. The box below names the room type by ZimmerStack's id. The answer is the same.
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.
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.
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"What comes back
The is 202. It means: accepted. ZimmerStack saved your numbers.
{
"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. One update is called a . Save the id: you need it in part 4.
- requestedCells
- How many nights you sent. One night of one room type is one . Here: 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.
2. Send rates
At Christmas, Bed and breakfast costs 5,500 a night. This is the body. Save it as update-rates.json.
{
"updates": [
{
"ratePlanRef": "rp-bb",
"dateFrom": "2026-12-24",
"dateTo": "2026-12-26",
"rate": 5500,
"currency": "INR"
}
]
}- rate
- The price of one night, as a guest reads it. 5500 means 5,500 rupees. Do not multiply by 100.
- currency
- Needed. It must be the of the hotel. The answer that created your hotel named it.
Save the example above as update-rates.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/rates" -H "Authorization: Bearer zsk_test_YOUR_KEY" -H "X-ZS-Property: YOUR_PROPERTY_ID" -H "Content-Type: application/json" -d "@update-rates.json"The answer has the same form: status code 202, and a batchId of its own.
3. Send restrictions
At Christmas, The Lantern House wants stays of 2 nights or more. That rule is a . This is the body. Save it as update-restrictions.json.
{
"updates": [
{
"ratePlanRef": "rp-bb",
"dateFrom": "2026-12-24",
"dateTo": "2026-12-26",
"minStayArrival": 2
}
]
}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"The answer is again 202, with a batchId. A hotel with no such rules does not send this request at all.
4. Check that an update arrived
202 means saved. On a real hotel it does not yet mean that the have your numbers. Sending them on takes a few seconds, sometimes a few minutes. So you ask, with the batchId.
The request is GET /batches/, then the batchId. Put your own batchId in place of the one in the example.
Open a terminal and run this. On Windows PowerShell, type curl.exe instead of curl.
curl "https://api.zimmerstack.com/api/v1/connect-api/v1/batches/7f1d2c4e-5a6b-4c8d-9e0f-112233445566" -H "Authorization: Bearer zsk_test_YOUR_KEY" -H "X-ZS-Property: YOUR_PROPERTY_ID"{
"statuscode": 200,
"message": "OK",
"data": {
"batchId": "7f1d2c4e-5a6b-4c8d-9e0f-112233445566",
"resource": "availability",
"createdAt": "2026-12-01T09:14:03.201Z",
"requestedCells": 3,
"acceptedCells": 3,
"noopCells": 0,
"rejected": [],
"status": "landed",
"pendingCells": 0,
"parkedCells": 0,
"lastError": null
}
}- status: pending
- Still on its way. Wait 15 seconds and ask again.
- status: landed
- Done. There is nothing more to do.
- status: failed
- Some nights were not taken. lastError says why. Correct the value and send those nights again.
- On a test hotel
- No OTA is behind your . The update is saved and stops there. It still reads landed, within a minute.
- Do not ask too often
- Once every 15 seconds is enough. Each time you ask counts as one request.
- More
- After you send an update says what can happen after a 202, and how you are told.
By your ref, or by ZimmerStack's id
The three bodies above name things by your ref. ZimmerStack also gives each room type and each rate plan an id of its own. It is a whole number, and it works in the same place.
- A room type
- Send
roomTypeRefwith your ref, orroomTypeIdwith ZimmerStack's id. - A rate plan
- Send
ratePlanRefwith your ref, orratePlanIdwith ZimmerStack's id. - One way in each item
- Send the ref or the id, never both. One request may hold both kinds: one item by ref, the next item by id.
- The answer
- It is the same for both ways. ZimmerStack turns your ref into its id first. Every answer names ZimmerStack's ids.
This is the availability update of part 1 again, by id. In the example, the Deluxe Room has the id 412.
{
"updates": [
{
"roomTypeId": 412,
"dateFrom": "2026-12-24",
"dateTo": "2026-12-26",
"available": 3
}
]
}What you should see
- Each update
- Status code 202, with a batchId.
- Check an update
- status: landed, within a minute.
- Your numbers
- Read them back with Get availability and Get rates. The three nights show 3 rooms and 5,500.
Each request has its own page, with every field: Update availability, Update rates, Update restrictions and Check an update.
If it does not work
- 400 PROPERTY_REQUIRED
- The request did not say which hotel. Add the X-ZS-Property header with the id of your test hotel.
- 400 UNKNOWN_ROOM_TYPE
- No room type of this hotel has this ref, or this id. Send the ref exactly as you wrote it when you created the room type.
- 400 UNKNOWN_RATE_PLAN
- No rate plan of this hotel has this ref, or this id. Send the ref exactly as you wrote it when you created the rate plan.
- 400 CURRENCY_MISMATCH
- The currency you sent is not the currency of the hotel. Send the hotel's own, like INR.
- 400 RANGE_INVALID
- dateTo is before dateFrom. Swap them.
- 400 HORIZON
- A date is in the past, or too far ahead. Use today or a later day.
- 400 VALIDATION
- A value has the wrong type or is missing. The message names it. Send a number without quotes. An item with both a ref and an id is refused too.
- 404 BATCH_NOT_FOUND
- This hotel has no update with this id. Check the batchId, and check that you named the right hotel.
Words on this page
- Test hotel
- A hotel in your sandbox. It works like a real hotel, but no OTA can see it and nothing is billed.
- Test key
- A key that starts with zsk_test_. It works only on a sandbox, so it can never change a real hotel.
- Ref
- Your own name or id for a room type or a rate plan. You choose it, and ZimmerStack remembers it.
- 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.
- ARI
- The hotel industry's short name (availability, rates and inventory) for what a hotel sends to the OTAs. In this API: availability, rates and restrictions. Learn more
- Availability
- How many rooms of one room type are free to sell on one night. Learn more
- Rates
- The price of a room for one night. Learn more
- Restrictions
- Stay rules for a night, like a minimum stay of 2 nights, or no arrival on that day. Learn more
- Body
- The data you send inside a request, written in JSON.
- 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.
- 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.
- Currency
- The money a hotel sells in, like INR for rupees or USD for dollars.
- Minimum stay
- The smallest number of nights a guest must book. With a minimum stay of 2, a one-night booking is not possible.
- OTA
- Online travel agency: a website that sells hotel rooms, like Booking.com, MakeMyTrip or Agoda. Learn more
- Sandbox
- Your test hotel. It works like a real hotel, but no OTA can see it and it costs nothing.
Routes, samples, limits and codes on this page come from the API's public contract, read live, Sat, 05 Dec 2026 01:08:01 UTC.