Basics · page 3 of 5
What is an API, and an API key?
Your software and ZimmerStack are two programs. They must talk to each other, with no person in between. This page shows how they talk, and how ZimmerStack knows it is you.
The problem
The Lantern House sells one Deluxe Room at its front desk. Now 8 rooms are free on 24 December, not 9.
ZimmerStack must know this, so it can tell every .
A person could open a screen and type the new number. But this happens many times a day, at many hotels. A person is slow, and a person makes mistakes.
It is better when your software tells ZimmerStack by itself. For this, ZimmerStack has an .
Two programs that talk
An API is a way for one program to talk to another program over the internet. The letters mean "application programming interface".
The talk always has the same two steps:
- Your software sends a . A request is one message. It asks for something, or it sends something.
- ZimmerStack sends back a . These pages also call it the answer.
Your software
It runs on your server.
1. a request 2. a responseThe ZimmerStack API
It checks the request, does the work, and answers.
Your software always starts. The API never sends a request to you. It only answers.
Sometimes ZimmerStack must tell you something first, like a new booking. For that it uses a . The next page explains it.
What is in a request
Here is one real request. It asks: "Which hotels can my key work for?"
GET https://api.zimmerstack.com/api/v1/connect-api/v1/properties
Authorization: Bearer zsk_test_YOUR_KEY- GET
- The . It says what the request does. GET reads something. PUT and POST send something. DELETE removes something.
- The address
- Where the request goes. It is a . One address of an API is called an . Each endpoint does one job. This one lists your hotels.
- Authorization
- A . A header is a small piece of extra information. This header carries your key.
A request that sends data has one more part, the . The body holds the data.
Every address of this API starts the same way:
https://api.zimmerstack.com/api/v1/connect-api/v1After that comes the part that changes, like /properties or /availability.
The address starts with https://. This is . It locks the data on its way, so nobody in between can read it.
JSON: how the data is written
Both programs must write data in the same way. This API uses .
JSON is plain text. It is made of names and values. Here is the body of one request:
{
"updates": [
{
"roomTypeId": 412,
"dateFrom": "2026-12-24",
"dateTo": "2026-12-24",
"available": 8
}
]
}It says: 8 Deluxe Rooms are free on the night of 24 December. This is how to read it:
- A name is in double quotes, like
"available". Its value comes after the colon. - A number has no quotes, like
8. Text has quotes, like"2026-12-24". - A date is written as text: the year, then the month, then the day.
- Curly brackets
{ }hold one thing. Square brackets[ ]hold a list of things.
Every programming language can read and write JSON. You do not build the text by hand.
What is in a response
The API answers every request. The answer has a , and a body written in JSON.
This is the answer to the request above, sent with the key of a test hotel:
{
"statuscode": 200,
"message": "OK",
"data": {
"keyKind": "property",
"properties": [
{
"id": 61,
"name": "The Lantern House",
"timezone": "Asia/Kolkata",
"currency": "INR",
"channelManager": true,
"sandbox": true
}
]
}
}- statuscode
- The status code. 200 means it worked.
- message
- A short text about the answer.
- data
- The answer itself. Here: the one hotel this key works for.
Every response of this API has these three parts.
The status code says what happened
The status code is a number with three digits. Look at the first digit.
- 200 to 299
- It worked. Code 200 means OK. Code 201 means something new was made. Code 202 means accepted: ZimmerStack saved your update and is sending it to the OTAs.
- 400 to 499
- The request has a problem, and you must fix it. Code 401 means the key is not right. Code 404 means ZimmerStack could not find what you named. Code 429 means too many requests, so wait a little.
- 500 to 599
- ZimmerStack had a problem. It is not your mistake. Wait a moment, then send the same request again.
When a request fails, the answer says why. Its data has a code that names the problem. This is the answer to a request with a wrong key:
{
"statuscode": 401,
"message": "Unauthorized",
"data": {
"code": "API_KEY_INVALID"
}
}The API key: how ZimmerStack knows it is you
Anyone on the internet can send a request to the API. ZimmerStack must know who is asking. Only you may change your hotels.
So every request carries an . A key is a long secret code. It works like a password for your software.
The key goes in the header named Authorization. First the word Bearer, then one space, then the key:
Authorization: Bearer zsk_test_YOUR_KEYA request with no key, or with a wrong key, gets the status code 401. ZimmerStack does nothing else with it.
Where a key is made:
- A software partner makes its keys in the partner portal, under Developers.
- For one hotel, the hotel's owner makes the key in Admin, under Developers.
A test key and a live key
There are two kinds of key. The first letters tell you which kind you hold.
- zsk_test_
- A . It works only on a , your test hotel. It can never change a real hotel.
- zsk_live_
- A . It works on real hotels. What you send with it reaches the OTAs.
Start with a test key. Use a live key only when your software works.
A key in the wrong place is refused. A test key does not work on a real hotel. A live key does not work on a sandbox.
Keep the key on a server
Anyone who has your key can act as you. So keep it secret, like a password.
Your web page or app
It has no key.
asks your serverYour server
The key is saved here, and only here.
a request with the key a responseThe ZimmerStack API
It checks the key, then answers.
- Save the key in your server's settings, not inside your code.
- Do not send the key in a chat or an email.
- Do not put the key in the address of a request. It belongs in the header.
- If someone else may have seen the key, switch it off and make a new one. You do this in the place where the key was made.
- The API answers only to a server. A request sent from a web page fails.
Send a real request
Do you have a test key? Then send your first request now, from this page. Paste the key and press the button.
This box takes a test key only. A test key works only on your sandbox. Never paste a live key into a web page.
Try it here: check your key
It starts with zsk_test_. It is kept in this browser tab only. Never paste a live key into a web page.
You should see "Status code 200" and the name of your test hotel. If you see 401, the key is not complete. Copy it again, all of it.
No key yet? You get one in the first steps of your path. A software company starts on the partner path. The developer of one hotel starts on the one-hotel path.
What to remember
- An API lets two programs talk over the internet.
- Your software sends a request. The API sends back a response.
- An endpoint is one address of the API. Each endpoint does one job.
- The data is written in JSON.
- The status code says what happened. 200 to 299: it worked. 400 to 499: fix your request. 500 to 599: our problem.
- The API key proves who you are. It goes in the Authorization header.
- A test key starts with
zsk_test_. A live key starts withzsk_live_. - Keep the key on your server. Never in a web page or an app.
Words on this page
- OTA
- Online travel agency: a website that sells hotel rooms, like Booking.com, MakeMyTrip or Agoda. Learn more
- API
- A way for one software to talk to another software over the internet.
- Request
- One message your software sends to the API.
- Response
- The answer the API sends back to one request.
- Method
- The first word of a request. It says what the request does: GET reads, PUT and POST send something, DELETE removes something. Learn more
- URL
- An address on the internet, like https://api.zimmerstack.com. Learn more
- Endpoint
- One address (URL) of the API. Each endpoint does one job.
- Header
- A small piece of extra information sent with a request, like your key.
- Body
- The data you send inside a request, written in JSON.
- HTTPS
- The safe way to send data over the internet. An address that uses it starts with https://. Learn more
- JSON
- A simple text format for data, made of names and values inside { }.
- Status code
- A number in every response. 200 to 299 means it worked. 400 and above means there is a problem.
- API key
- A long secret code that proves who is calling the API. Keep it safe like a password.
- Test key
- A key that starts with zsk_test_. It works only on a sandbox, so it can never change a real hotel.
- Live key
- A key that starts with zsk_live_. It works on real hotels.
- Sandbox
- Your test hotel. It works like a real hotel, but no OTA can see it and it costs nothing.
- Server
- A computer that runs your software all the time and can be reached over the internet.
- Webhook
- A message ZimmerStack sends to your server when something happens, like a new booking.
Routes, samples, limits and codes on this page come from the API's public contract, read live, Sat, 05 Dec 2026 01:08:06 UTC.