API action
Add a hotel
Add one hotel to your company. The answer gives you the hotel's id.
About this action
- What it does
- Makes a new hotel in ZimmerStack, with its and an account for the hotel's owner. Your works for the hotel at once.
- When to use it
- When a hotel starts to use your software. Try it with a first: that makes a , and nothing is billed.
- Who can use it
- A only. The key needs the
properties:write. - Address
POSThttps://api.zimmerstack.com/api/v1/connect-api/v1/properties- Before this
- For a real hotel, finish your billing setup first. You do it on the Billing page of the . A sandbox needs no billing setup.
What you send
You send the hotel's name, its owner, its address and its room types. Add one more too, X-Idempotency-Key. The note below says why.
- name
- Text, up to 120 letters. Required. The hotel's name, as its guests know it.
- owner
- Required. The person who owns the hotel's account. It has three parts, all required:
name,emailandphone. ZimmerStack sends the sign-in details to this email, never to you. - address
- Required. It has
line1,cityandcountry, all required. It can also havestateandpostalCode. Thecountryis a 2-letter code, likeINfor India. - roomTypes
- A list of 1 to 20 room types. Required. Each item has the five fields below.
- roomTypes: name
- Text, up to 80 letters. Required. The name of the room type, like
Deluxe Room. Use each name once. - roomTypes: roomCount
- Whole number, 1 to 50. Required. How many rooms of this room type the hotel sells.
- roomTypes: defaultRate
- Number, like
4500, or text, like"4500.00". Required. The price of one night that new dates start with, in the hotel's . - roomTypes: adults
- Whole number, 1 to 10. Optional. The most adults one room takes. Left out: 2.
- roomTypes: ref
- Text. Optional. Your own id for this room type (). Send the same
reflater, and ZimmerStack changes this room type and makes no second one. - currency
- Text, 3 letters, like
INR. Optional. The currency the hotel sells in. Left out: the currency of the hotel's country. - timezone
- Text, like
Asia/Kolkata. Optional. The hotel's . Left out: the main time zone of the hotel's country. - taxId
- Text. Optional. For a hotel in India only: its , when it has one. Leave it out for a hotel in any other country.
{
"name": "The Lantern House",
"owner": {
"name": "Asha Rao",
"email": "asha@lanternhouse.example",
"phone": "+91 98765 43210"
},
"address": {
"line1": "14 Hill Road",
"city": "Shimla",
"country": "IN"
},
"roomTypes": [
{
"ref": "rt-deluxe",
"name": "Deluxe Room",
"roomCount": 10,
"defaultRate": 4500
}
]
}Things to know
- A test key makes a sandbox. With a test key the same request makes a sandbox, not a real hotel. No sees it. Up to 5 sandboxes can exist together. To make one more, remove one first.
- A live key makes a real hotel. It joins your monthly . With the public , hotels are counted on the 1st of each month. So the days before the next 1st are free.
- A hotel you add is live from its first day. Your software is its at once. It needs no Go live request.
- The answer can take more than a minute. ZimmerStack makes the owner's account while you wait. Wait up to 90 seconds. If no answer comes, send the same request again with the same
X-Idempotency-Key.
The request, in your language
Put your key in place of zsk_test_YOUR_KEY. Put a code of your own in place of YOUR-OWN-CODE-0001. Choose a new code for each new thing you make.
Save the example above as add-a-hotel.json. Open a terminal in the same folder and run this. On Windows PowerShell, type curl.exe instead of curl.
curl -X POST "https://api.zimmerstack.com/api/v1/connect-api/v1/properties" -H "Authorization: Bearer zsk_test_YOUR_KEY" -H "X-Idempotency-Key: YOUR-OWN-CODE-0001" -H "Content-Type: application/json" -d "@add-a-hotel.json"What comes back
The is 201. It means: the hotel was made. The example below shows another hotel, Ganga Guest House.
{
"statuscode": 201,
"message": "Created",
"data": {
"id": 63,
"name": "Ganga Guest House",
"timezone": "Asia/Kolkata",
"currency": "INR",
"channelManager": false,
"sandbox": false,
"billing": {
"state": "ACTIVE",
"reason": null,
"message": "This hotel's billing has started: it is on your next monthly invoice."
},
"replay": false
}
}- id
- The hotel's property id. Save it. Send it in the header of every later request for this hotel.
- name
- The name as it was saved. The name of a sandbox ends in
(sandbox). - channelManager
true: the hotel is set up at .false: not yet, so no OTA can get its numbers. A new real hotel is set up when its billing starts. For a sandbox: alwaystrue.- sandbox
- With a test key:
true. Nothing of a sandbox reaches an OTA, and nothing is billed. - billing.state
- The value
ACTIVEmeans: billing has started, and the hotel is on your next monthly invoice.WAITING: the hotel is live, but its billing has not started.NOT_BILLED: a sandbox. - billing.reason
- Why billing waits. With
SETUP, your billing setup is not finished. WithOVERDUE, one of your invoices is late. WithUNPAID_LIMIT, you added as many hotels as you may before your first paid invoice. WithREVIEW, ZimmerStack starts it. Empty (null) when billing does not wait. - billing.message
- The same in one sentence, with what to do next.
- replay
- The value
truemeans: an earlier request with the sameX-Idempotency-Keyalready made this hotel (). Nothing new was made.
Then send what the hotel sells
The hotel exists now. When its billing starts (at once, unless billing says it waits), ZimmerStack also sets it up at our connectivity partner, with its room types and their rate plans. No OTA has it yet. Do these steps in order. Put the hotel's id in the X-ZS-Property header of each request. The hotel's owner gets the sign-in details by email, unless you turned that email off in the partner portal's Settings: then you hand them over from the portal.
- 1. Room types
- Nothing to send, unless you want to change them. A call that answers
409 CHANNEL_MANAGER_DISABLEDmeans the hotel is not set up at our connectivity partner yet. Then send its room types again with Create or change room types, with the samerefor the same name. That sets it up, and makes no second room type. - 2. Rate plans
- Each room type already has one , room only. Add more with Create or change rate plans.
- 3. Availability and rates
- Send the and the with Update availability and Update rates.
- 4. OTAs
- First the hotel's own step at each OTA: except on Airbnb, the OTA must accept our connectivity partner. Then Make a connect link for that OTA.
Common mistakes
- 400 IDEMPOTENCY_KEY_INVALID
- The
X-Idempotency-Keyheader is missing, or its value has a wrong form. Send 10 to 64 letters, digits,-or_. - 400 VALIDATION
- A value is missing or wrong, and the message names it. For example a country code that does not exist, or the same room type name twice.
- 400 VALIDATION (held)
- The message says that ZimmerStack is holding the request. Do not send it again. Open a support ticket and give the
X-Idempotency-Keyyou used. - 403 COMPANY_KEY_REQUIRED
- You used a hotel key. This request works with a company key only.
- 403 WRITES_SUSPENDED
- ZimmerStack has stopped your company's writes for now. Open a support ticket: a ticket still works.
- 409 OWNER_HAS_ACCOUNT
- The owner's email already has a ZimmerStack account. Read
data.details.addedByYou. If it isfalse, ask the owner to enter your in ZimmerStack. If it istrue, you added a hotel for this owner before, and a second one cannot be added here. - 409 BILLING_SETUP_REQUIRED
- Your billing is not ready for a new hotel. The message says why: the setup is not finished, something is unpaid, or your is full. Fix it on the Billing page of the partner portal. Then send the request with a new
X-Idempotency-Key. - 409 SANDBOX_LIMIT
- Test key only. You already have the most sandboxes. Remove one with Remove a hotel. Then send the request with a new
X-Idempotency-Key. - 409 IDEMPOTENCY_KEY_REUSED
- You used this
X-Idempotency-Keybefore, with another body. Choose a new code for a new hotel. - 409 IDEMPOTENCY_IN_FLIGHT
- The first request with this code is still running. Wait a little, then send it again.
- 503 PROPERTY_BUSY
- A hotel of yours is still being added or removed. Wait the seconds in the header. Then send the same request with the same
X-Idempotency-Key. - 503 PRICE_UNAVAILABLE
- ZimmerStack could not work out the hotel's price just now. Wait the seconds in the Retry-After header. Then send the same request with the same
X-Idempotency-Key.
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.
- 403 SCOPE_MISSING
- The key is not allowed to do this. It needs the scope
properties: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_EXPIRED
- The key is past the end date its owner set. Ask the owner for a new key, or for a later end date.
- 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.
- 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: add a hotel
It starts with zsk_test_. It is kept in this browser tab only. Never paste a live key into a web page.
Go deeper
- Create a hotel: Create a hotel with one request. With your test key it is made in your sandbox, where no OTA sees it.
- Add your first hotel: Do the same steps for a real hotel, then connect its OTAs.
- Add and remove hotels: What each request does, and what it does to your invoice.
- Move a hotel to ZimmerStack: OTA by OTA, with no missed and no double booking.
- Connect an OTA: First the OTA accepts our connectivity partner. Then a link: the hotel's id, the mapping, Start selling.
Words on this page
- 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.
- Company key
- The key of a software company. One key works for all the hotels of that company.
- Test key
- A key that starts with zsk_test_. It works only on a sandbox, so it can never change a real hotel.
- Sandbox
- Your test hotel. It works like a real hotel, but no OTA can see it and it costs nothing.
- Partner portal
- The website where your company signs in to make keys, add hotels and pay invoices.
- Scope
- One permission of a key. For example ari:write lets the key update availability, rates and restrictions.
- Header
- A small piece of extra information sent with a request, like your key.
- Currency
- The money a hotel sells in, like INR for rupees or USD for dollars.
- Ref
- Your own name or id for a room type or a rate plan. You choose it, and ZimmerStack remembers it.
- Time zone
- The clock a place uses. A hotel's dates are always dates on its own clock.
- GSTIN
- The tax number of a business in India that is registered for GST, the sales tax of India.
- OTA
- Online travel agency: a website that sells hotel rooms, like Booking.com, MakeMyTrip or Agoda. Learn more
- Invoice
- A bill.
- Price list
- The list of what ZimmerStack charges a partner for one hotel a month. The price depends on the kind and the size of the hotel.
- Source of truth
- The one system whose numbers are the right ones. After go-live, that is your software.
- 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.
- Status code
- A number in every response. 200 to 299 means it worked. 400 and above means there is a problem.
- X-ZS-Property
- The header that tells ZimmerStack which hotel a request is for. Its value is the property id.
- 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
- Replay
- The first answer, given again for a request that was already done. Nothing is done a second time.
- Rate plan
- One way to sell a room type, with its own price. For example Room only, or With breakfast.
- 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
- Vendor code
- A short code of your company. A hotel that already uses ZimmerStack enters it to let your software in.
- Quota
- How many live hotels you may have right now.
- Retry-After
- A header in an answer. It says how many seconds to wait before you send again.
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 23:24:16 UTC.