Skip to content

One-hotel path

Create bookings from your website

This page is for a hotel that runs the ZimmerStack and sells rooms on its own website or app. When a guest books there, your website sends the to ZimmerStack. It appears in the PMS like a booking made at the .

How it works

  1. Your website or app

    A guest books a room. Your own code takes the booking.

    one booking its reference
  2. ZimmerStack

    Saves the booking in the PMS. One room fewer is free.

    one room fewer
  3. The OTAs

    Show one room fewer within seconds.

Is this page for you?

Yes
The hotel runs the ZimmerStack PMS. Its website or app is your own code, and your code takes the booking.
No: ZimmerStack takes the bookings on the website
The website uses the ZimmerStack . Then ZimmerStack already has those bookings. You do not send them. You can read them: List website bookings.
No: the hotel keeps another PMS
Then there is no ZimmerStack PMS to put a booking in. The request below answers 409 PMS_NOT_AVAILABLE. Read Connect the hotel's own PMS.

What you need

  • A with two : bookings:write and bookings:read. Step 1 says how to get it.
  • One more scope, bookings:payments, only if your website takes the guest's money and you want the PMS to show it.
  • The ids of the hotel's and . Read them with your live key: Get room types and rate plans.

Create a booking

One request does it: Create a booking. Here is an example. Asha Verma books two rooms for three nights, from 20 to 23 December 2026. She paid 9,000 on the website.

create-a-booking.json
{
  "externalReference": "WEB-2026-000123",
  "checkIn": "2026-12-20",
  "checkOut": "2026-12-23",
  "currency": "INR",
  "guest": {
    "name": "Asha Verma",
    "phone": "+919876543210",
    "email": "asha@example.com",
    "notes": "Late arrival, after 22:00"
  },
  "rooms": [
    {
      "roomTypeId": 412,
      "ratePlanId": 901,
      "adults": 2,
      "children": 1,
      "nightlyRate": "4500.00"
    },
    {
      "roomTypeId": 412,
      "ratePlanId": 901,
      "adults": 2,
      "nightlyRate": "4500.00"
    }
  ],
  "payment": {
    "amount": "9000.00",
    "method": "ONLINE",
    "reference": "pay_QwErTy123"
  },
  "notes": "Promo WINTER10 applied on the website"
}

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.

terminal
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"

Put your own live key in place of zsk_live_YOUR_KEY. Put ids of your own hotel in place of the room type id and the rate plan id.

externalReference
Text. Required. Your own id for this booking. Send the same id again, and you get the same booking back. No second booking is made.
checkIn
Text, like 2026-12-20. Required. The day, on the hotel's own calendar.
checkOut
Text. Required. The day. It is not a night. From the 20th to the 23rd is three nights.
currency
Text. Required. It must be the hotel's own . Check your key shows it.
guest
Required. The guest's name and phone. The email and the notes are optional.
rooms
A list. Required. One item for each room. Two rooms of the same room type are two items.
rooms → roomTypeId
Number. Required. The id of the room type.
rooms → ratePlanId
Number. Optional. The rate plan the guest booked. It must belong to that room type. It decides the . Without it, the booking is room only.
rooms → adults
Whole number, 1 or more. Required. The adults in this room. children is optional.
rooms → nightlyRate
Required. The price of one night for this room, as you sold it. ZimmerStack saves your price and never changes it.
payment
Optional. The money you already took from the guest. It needs the scope bookings:payments. Leave it out when the guest pays at the hotel.
notes
Text. Optional. A note for the hotel's front desk, like a promo code.

The example has a payment part. Remove it if your key does not hold bookings:payments. If you keep it, the answer is 403 PAYMENT_NOT_ALLOWED.

What comes back

Before it saves, ZimmerStack checks that a room is free on every night. If one night is full, nothing is saved. The answer is then 409 NO_AVAILABILITY.

When all is well, the is 201. It means: the booking was made.

response · status code 201
{
  "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 for the booking. Save it next to your own booking id. You need it to read or cancel the booking.
reference
The booking's reference in the PMS. The hotel's staff see this one.
status
UPCOMING means the guest has not arrived yet.
totalAmount
The price of the whole stay. Here: 2 rooms, 3 nights, 4,500 a night.
totalPaid
The money recorded as paid.
balanceDue
What the guest still pays at the hotel.
replay
false means a new booking was made. true means you sent this externalReference before, and this is the same booking again.

What happens next

  • The booking is in the PMS the moment you get the answer. The staff see it like any front-desk booking.
  • If the hotel sells on , they show one room fewer within seconds. You send nothing more.
  • ZimmerStack sends the guest no message. Your website already did. The owner can change this in Admin, under Developers, on the tab Settings.
  • The owner sees every booking your key made in Admin, under Developers, on the tab API bookings.

A repeat is safe

Sometimes the internet fails while you wait for the answer. You do not know if the booking was made. Send the same request again, with the same externalReference.

The first request arrived
The answer is 200, with replay: true. It is the same booking. Nothing is made twice.
The first request did not arrive
The answer is 201. The booking is made now.

So always send your own booking id as the externalReference. Never make a new one for a retry.

Cancel a booking

Use Cancel your booking with the bookingId. The whole booking is cancelled. Its rooms go back on sale on the OTAs.

You send it twice
No harm. The second answer is the same booking, with replay: true.
The guest has checked in
The answer is 409 BOOKING_NOT_CANCELLABLE. The hotel's front desk handles it.
The guest wants other dates
No request changes a booking. Cancel it, then create a new one with a new externalReference.
You book again after a cancel
Use a new externalReference. The old one answers 409 EXTERNAL_REFERENCE_REUSED.

Read your bookings

List your bookings shows the bookings your key created. Get your booking reads one. Both need the scope bookings:read.

Your key sees only its own bookings. A front-desk booking or an OTA booking answers 404 BOOKING_NOT_FOUND.

Test with care

  1. 1

    Ask the owner for a second live key

    One key for your tests, one for your real website. A hotel can have up to five working keys.
  2. 2

    Tell the hotel's staff

    Your test bookings appear in their PMS. They should know which ones are yours.
  3. 3

    Use dates a few weeks ahead

    Then a test never touches tonight.
  4. 4

    Cancel each test booking at once

    A booking you create is real. Its room is not on sale any more, on the OTAs too. A cancel puts it back.

If it does not work

403 SCOPE_MISSING
Your key does not hold bookings:write. Ask the owner to add it.
409 PMS_NOT_AVAILABLE
The hotel does not run the ZimmerStack PMS. This request is not for this hotel.
402 MODULE_NOT_ENTITLED
The hotel's ZimmerStack plan does not include the PMS. Tell the owner.
409 NO_AVAILABILITY
No room of that room type is free on one of the nights. The message names the night. Nothing was saved. Tell the guest.
400 CURRENCY_MISMATCH
The currency you sent is not the hotel's own.
400 STAY_INVALID
The dates are wrong. The check-in day is in the past, or more than 500 days ahead, or the stay is longer than 90 nights.
400 UNKNOWN_ROOM_TYPE
A roomTypeId is not a room type of this hotel. Read the ids again.
400 UNKNOWN_ROOM_TYPE_FOR_PLAN
The rate plan belongs to another room type. Send a rate plan of the room type you named.
400 OCCUPANCY_EXCEEDED
Too many adults or children for this room type. The message says how many it takes.
400 PAYMENT_EXCEEDS_TOTAL
The payment is higher than the price of the stay.
429 RATE_LIMITED
Too many bookings in a short time. One key may create 20 bookings a minute. Wait the number of seconds in the Retry-After header.

Words on this page

PMS
Property management system: the software a hotel uses at its front desk for bookings, guests and bills.
Booking
A guest has reserved a room for some nights. Also called a reservation.
Front desk
The reception of a hotel, where guests arrive and leave.
Booking engine
The part of a hotel's own website where a guest books a room.
Live key
A key that starts with zsk_live_. It works on real hotels.
Scope
One permission of a key. For example ari:write lets the key update availability, rates and restrictions.
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.
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.
Check-in
The day a guest arrives.
Check-out
The day a guest leaves. It is not a night of the stay.
Currency
The money a hotel sells in, like INR for rupees or USD for dollars.
Meal plan
Which meals the price includes: none (EP), breakfast (CP), breakfast and one meal (MAP), or all meals (AP).
Status code
A number in every response. 200 to 299 means it worked. 400 and above means there is a problem.
OTA
Online travel agency: a website that sells hotel rooms, like Booking.com, MakeMyTrip or Agoda. Learn more

Routes, samples, limits and codes on this page come from the API's public contract, read live, Fri, 04 Dec 2026 22:24:21 UTC.