API action
Create a booking
Put a booking from your own website into ZimmerStack. It lands in the PMS like a booking made at the front desk.
About this action
- What it does
- Creates one in the ZimmerStack : the guest, the rooms and the nights. The rooms come off sale on every within seconds.
- When to use it
- When a guest books on the hotel's website and your own sold the stay. Send one request for each booking.
- Who can use it
- A , for a hotel that runs the ZimmerStack PMS. The key needs the
bookings:write. - Address
POSThttps://api.zimmerstack.com/api/v1/connect-api/v1/bookings- Before this
- The hotel must run the ZimmerStack PMS. You need the
roomTypeId, and theratePlanIdif the guest chose a rate plan. Get them with Get room types and rate plans.
What you send
You send the stay, the guest and a list named rooms. Each item in the list is one room. You also send the price you charged: ZimmerStack does not work out a price.
- externalReference
- Text, up to 64 letters and digits. Required. Your own id of the booking. If you send the same value again, you get the same booking back and nothing is created twice.
- checkIn
- Text, like
2026-12-24(year-month-day). Required. The day the guest arrives, on the hotel's own calendar. - checkOut
- Text, like
2026-12-26. Required. The day the guest leaves. It is not a night of the stay. - currency
- Text, 3 letters, like
INR. Required. It must be the hotel's own . - guest.name
- Text. Required. The guest's full name.
- guest.phone
- Text. Required. 7 to 15 digits, with a
+at the start if you like. - guest.email
- Text. Optional. The guest's email.
- guest.notes
- Text. Optional. What the guest asked for, like a late arrival. The sees it.
- rooms[].roomTypeId
- Number. Required. The id of the .
- rooms[].ratePlanId
- Number. Optional. The id of the the guest booked. It decides the . Without it: room only.
- rooms[].adults
- Whole number, 1 or more. Required. Adults in this room.
- rooms[].children
- Whole number. Optional. Children in this room. Without it: 0.
- rooms[].nightlyRate
- Number, or text like
"4500.00". Required. The price of one night of this room, as you charged it. - payment
- Optional. What you already collected: an
amountand amethod(ONLINE,CARD,UPI,NETBANKINGorCASH). Leave it out when the guest pays at the hotel. A payment needs the scopebookings:payments. - nightlyRateIncludesTaxes
- Optional. Only for a hotel outside India that has set its taxes in ZimmerStack. Leave it out: the price is then read as the guest paid it.
- notes
- Text. Optional. A note about the booking for the front desk.
{
"externalReference": "WEB-2026-000123",
"checkIn": "2026-12-24",
"checkOut": "2026-12-26",
"currency": "INR",
"guest": {
"name": "Asha Rao",
"phone": "+919876543210"
},
"rooms": [
{
"roomTypeId": 412,
"ratePlanId": 901,
"adults": 2,
"nightlyRate": "4500.00"
}
]
}Things to know
- The same externalReference gives the same booking. If your request got no answer, send it again with the same value. The answer is then 200 with
replay: true, and no second booking is made. - You set the price. ZimmerStack saves the
nightlyRateyou send. The total is the price of all rooms for all nights. - The day of leaving is not a night. From the 24th to the 26th is two nights: 24 and 25. A stay is 1 to 90 nights. The day of arrival is today or later, at most 500 days from today.
- The guest hears from your website. ZimmerStack sends the guest no message, unless the hotel's owner switched that on.
The request, in your language
Put your key in place of zsk_live_YOUR_KEY.
Save the example above as create-a-booking.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/bookings" -H "Authorization: Bearer zsk_live_YOUR_KEY" -H "Content-Type: application/json" -d "@create-a-booking.json"What comes back
The is 201. It means: created. The booking is in the PMS now. The example answer here is for a larger booking: two rooms for three nights, with a payment.
{
"statuscode": 201,
"message": "Booking created",
"data": {
"bookingId": 48213,
"reference": "SB-7KQ2MX9D",
"externalReference": "WEB-2026-000123",
"status": "UPCOMING",
"checkIn": "2026-12-20",
"checkOut": "2026-12-23",
"nights": 3,
"currency": "INR",
"totalAmount": "27000.00",
"totalPaid": "9000.00",
"balanceDue": "18000.00",
"guest": {
"name": "Asha Verma",
"phone": "+919876543210",
"email": "asha@example.com"
},
"rooms": [
{
"bookingRoomId": 90001,
"roomTypeId": 412,
"ratePlanId": 901,
"mealPlan": "CP",
"adults": 2,
"children": 1,
"nightlyRate": "4500.00",
"status": "UPCOMING"
},
{
"bookingRoomId": 90002,
"roomTypeId": 412,
"ratePlanId": 901,
"mealPlan": "CP",
"adults": 2,
"children": 0,
"nightlyRate": "4500.00",
"status": "UPCOMING"
}
],
"inventory": {
"eventRecorded": true,
"channelManager": true,
"pushedBy": "inventory-drain"
},
"replay": false,
"createdAt": "2026-12-10T09:14:03.201Z",
"cancelledAt": null
}
}- bookingId
- ZimmerStack's id of the booking. Save it: you need it to read or cancel the booking.
- reference
- ZimmerStack's own code for the booking.
- externalReference
- Your own id, as you sent it.
- status
- For a new booking:
UPCOMING. Later it can beINHOUSE,COMPLETED,CANCELLEDorNOSHOW. - totalAmount
- The price of the whole stay.
- totalPaid
- What was collected so far.
- balanceDue
- What the guest still pays at the hotel.
- inventory.channelManager
- With
true, the OTAs are told the new number of free rooms. Withfalse, the hotel has no , so nothing is sent. - replay
- For a new booking:
false. It istruewhen thisexternalReferencewas sent before and you got the same booking back.
Then save the id
Save bookingId with the booking in your own software. The front desk now sees the booking. If the guest cancels on your website, use Cancel your booking. To change the dates or the rooms, cancel the booking and create it again with a new externalReference.
Common mistakes
- 400 VALIDATION
- A field is missing, has the wrong type, or is not known. The message names it.
- 400 CURRENCY_MISMATCH
- The
currencyis not the hotel's own currency. Check your key shows the hotel's currency. - 400 STAY_INVALID
- The dates are wrong. The day of arrival is in the past or too far ahead, or the stay is longer than 90 nights.
- 400 UNKNOWN_ROOM_TYPE
- A
roomTypeIdis not a room type of this hotel. The codeUNKNOWN_RATE_PLANsays the same about aratePlanId. Read the ids again. - 400 UNKNOWN_ROOM_TYPE_FOR_PLAN
- The rate plan belongs to another room type than the one you sent.
- 400 OCCUPANCY_EXCEEDED
- The room has more adults or children than this room type takes.
- 400 PAYMENT_EXCEEDS_TOTAL
- The payment is more than the price of the stay.
- 402 MODULE_NOT_ENTITLED
- The hotel's plan with ZimmerStack does not include the PMS.
- 403 PAYMENT_NOT_ALLOWED
- You sent a payment, but the key does not have the scope
bookings:payments. - 409 NO_AVAILABILITY
- No room of this room type is free on one of the nights. The message names the night. Nothing was saved.
- 409 EXTERNAL_REFERENCE_REUSED
- This
externalReferencebelongs to a booking you cancelled, or to a booking of another key. Send a new value. - 409 TAXES_NOT_CONFIGURED
- You sent
nightlyRateIncludesTaxesasfalse, but the hotel has no taxes set in ZimmerStack. Leave the field out. The codeTAXES_INSIDE_RATEShas the same fix. - 409 PMS_NOT_AVAILABLE
- The hotel does not run the ZimmerStack PMS, so there is no place to put a booking.
- 429 RATE_LIMITED
- Too many bookings. A key may create 20 in a minute. A hotel may get 40 in a minute and 500 in 24 hours.
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
bookings: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. - 400 UNKNOWN_RATE_PLAN
- A rate plan id does not belong to this hotel, or not to the room type you named. details names it. Read the ids again with GET /catalog.
- 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.
- 409 TAXES_INSIDE_RATES
- You sent a price before taxes, but this hotel's prices already include its taxes. Send nightlyRate as the guest pays it, and leave nightlyRateIncludesTaxes out. Use a new X-Idempotency-Key.
Try it
This page has no box to try the action. A has no PMS, so this action works on a real hotel only. Test it on the real hotel with a , from your own code or from Postman. Never type a live key into a web page.
Go deeper
Words on this page
- Booking
- A guest has reserved a room for some nights. Also called a reservation.
- PMS
- Property management system: the software a hotel uses at its front desk for bookings, guests and bills.
- OTA
- Online travel agency: a website that sells hotel rooms, like Booking.com, MakeMyTrip or Agoda. Learn more
- Booking engine
- The part of a hotel's own website where a guest books a room.
- 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.
- Scope
- One permission of a key. For example ari:write lets the key update availability, rates and restrictions.
- Currency
- The money a hotel sells in, like INR for rupees or USD for dollars.
- Front desk
- The reception of a hotel, where guests arrive and leave.
- 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.
- Meal plan
- Which meals the price includes: none (EP), breakfast (CP), breakfast and one meal (MAP), or all meals (AP).
- 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.
- Live key
- A key that starts with zsk_live_. It works on real hotels.
- Status code
- A number in every response. 200 to 299 means it worked. 400 and above means there is a problem.
- Channel manager
- Software that keeps a hotel's rooms and prices the same on every OTA. Learn more
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:54:33 UTC.