Skip to content

Partner path · step 4 of 10

Create a hotel(a property, in your sandbox)

Until now you looked at a hotel that was made for you. In this step you create your own, with one . It is a : no sees it, and nothing is billed.

Before you start

  • Your , from step 2. The box Also add and remove hotels was ticked when you made it.
  • Your first call worked. That is step 3.

What this request does

In ZimmerStack one hotel is one . You create it with the request POST /properties. The same request creates a real hotel later. The key decides which one you get.

With a test key
A test hotel in your . No OTA sees it. Nothing is billed.
With a live key
A real hotel. It is on your invoice from the next 1st. You do that in the last step.

The example on this page is The Lantern House. It has one , the Deluxe Room, with 10 rooms.

1. Write the body

The is what you send. It is written in . Save this example as create-hotel.json.

create-hotel.json
{
  "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
    }
  ]
}
name
Needed. The hotel's name, as its guests know it.
owner
Needed. The person who owns the hotel: name, email and phone.
address
Needed. The first line, the city and the country. The country is a code of two letters, like IN for India.
roomTypes
Needed. A list with one room type or more. The API asks for one in this request.
roomTypes → ref
Your own id for this room type. You choose it. It is called a . Send it now, and you can change this room type later by the same ref.
roomTypes → name
Needed. The name of the room type. Use each name one time.
roomTypes → roomCount
Needed. How many rooms of this room type the hotel has. A whole number.
roomTypes → defaultRate
Needed. The price of one night that new dates start with. Send it as a guest reads it: 4500 means 4500 rupees.
currency, timezone
You can leave both out. The hotel then gets the and the main of its country.

The action page Add a hotel lists every field, with the values each one takes.

2. Add the headers

This request needs three .

Authorization
The word Bearer, one space, then your test key.
Content-Type
application/json
X-Idempotency-Key
A code you choose: 10 to 64 letters, digits, - or _. This request must have it. It is called an .
X-ZS-Property
Not sent here. The header names a hotel, and this hotel does not exist yet.

Why the code? Sometimes the answer gets lost on the way. Then you send the same request again, with the same code. ZimmerStack sees the code and gives you the same hotel. No second hotel is made.

3. Send the request

Choose your language. Put your own key in place of zsk_test_YOUR_KEY, and a code of your own in place of YOUR-OWN-CODE-0001. The answer can take some seconds.

Save the example above as create-hotel.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/properties" -H "Authorization: Bearer zsk_test_YOUR_KEY" -H "X-Idempotency-Key: YOUR-OWN-CODE-0001" -H "Content-Type: application/json" -d "@create-hotel.json"

What comes back

The is 201. It means: the hotel was made.

response · status code 201
{
  "statuscode": 201,
  "message": "Created",
  "data": {
    "id": 9001,
    "name": "The Lantern House (sandbox)",
    "timezone": "Asia/Kolkata",
    "currency": "INR",
    "channelManager": true,
    "sandbox": true,
    "billing": {
      "state": "NOT_BILLED",
      "reason": null,
      "message": "A sandbox is never billed."
    },
    "replay": false
  }
}
id
The property id of your new hotel. It is a whole number. Keep it: every later request for this hotel needs it.
name
The name as it was saved. ZimmerStack adds (sandbox) to the name of a test hotel, so nobody takes it for a real hotel.
timezone, currency
The hotel's time zone and currency. Every date and every price you send for this hotel uses them.
sandbox
true means: this is a test hotel. No OTA can see it.
channelManager
true means: the hotel can take your updates. A test hotel says true from the start.
billing.state
NOT_BILLED means: this hotel is never on an invoice.
replay
false means: this request made the hotel. true means: you sent the same code before, and this is that same hotel.

What your new hotel already has

The hotel is not empty. ZimmerStack made three things for it.

Its first room type
The Deluxe Room you sent, with its 10 rooms and your ref.
One rate plan
Each room type you send here starts with one : room only, at the price in defaultRate. ZimmerStack names it for you. In the example its name is Deluxe EP (2 occ).
A year of nights
On every night of the next year, all 10 rooms are free, at the price in defaultRate.

So you can already send updates for this hotel. The next two steps add more room types and more rate plans.

What you should see

The answer
Status code 201, with sandbox: true and the id of your hotel.
List your hotels
Send List your hotels again. It now shows two hotels: the example hotel from sign-up, and The Lantern House (sandbox).
In the partner portal
Open Developers in the partner portal. The box Your sandboxes lists the new hotel, with its property id, 1 room type and 1 rate plan.

How many test hotels you can have

At one time
Up to 5 can exist together. The example hotel from sign-up is one of them. To create one more, remove one first. The API and the portal call each test hotel a sandbox.
In one hour
You can create up to 30. A hotel you removed again still counts. So you can create and remove a test hotel many times while you build. After that the answer is 429, and you wait.
To remove one
Send Remove a hotel with your test key. Or press Delete this sandbox in the portal. Its keys and its test bookings go with it.
To change one
Send Change a hotel with your test key. It changes the hotel's name and its address. It cannot change the country, the currency, the time zone or the owner. The next two steps change its room types and rate plans.

If it does not work

400 IDEMPOTENCY_KEY_INVALID
The X-Idempotency-Key header 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 one room type name two times.
403 SCOPE_MISSING
Your key may not add hotels. It was made without the box Also add and remove hotels. Make a new test key with the box ticked.
403 COMPANY_KEY_REQUIRED
You used the key of one test hotel. Only a creates a hotel. Use the test key from step 2.
409 SANDBOX_LIMIT
You already have the most test hotels you may have. Remove one first. Then send the request again, with a new code in X-Idempotency-Key.
409 IDEMPOTENCY_KEY_REUSED
You used this code before, with another body. Choose a new code for a new hotel.
429 RATE_LIMITED
You created too many test hotels in one hour. Wait the number of seconds in the header. Then send the same request again, with the same code.
503 PROPERTY_BUSY
Another hotel of yours is being made right now. Wait the seconds in the Retry-After header. Then send the same request again, with the same code.

Every code, with what to do: Errors.

Words on this page

Request
One message your software sends to the API.
Test hotel
A hotel in your sandbox. It works like a real hotel, but no OTA can see it and nothing is billed.
OTA
Online travel agency: a website that sells hotel rooms, like Booking.com, MakeMyTrip or Agoda. Learn more
Test key
A key that starts with zsk_test_. It works only on a sandbox, so it can never change a real hotel.
Property
One hotel in ZimmerStack. Each property has its own id, a number.
Sandbox
Your test hotel. It works like a real hotel, but no OTA can see it and it costs nothing.
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.
Body
The data you send inside a request, written in JSON.
JSON
A simple text format for data, made of names and values inside { }.
Ref
Your own name or id for a room type or a rate plan. You choose it, and ZimmerStack remembers it.
Currency
The money a hotel sells in, like INR for rupees or USD for dollars.
Time zone
The clock a place uses. A hotel's dates are always dates on its own clock.
Header
A small piece of extra information sent with a request, like your key.
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.
X-ZS-Property
The header that tells ZimmerStack which hotel a request is for. Its value is the property id.
Status code
A number in every response. 200 to 299 means it worked. 400 and above means there is a problem.
Rate plan
One way to sell a room type, with its own price. For example Room only, or With breakfast.
Company key
The key of a software company. One key works for all the hotels of that company.
Retry-After
A header in an answer. It says how many seconds to wait before you send again.

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