Skip to content

API action

Cancel your booking

Cancel a booking your key created. Its rooms go back on sale.

About this action

What it does
Cancels the whole . Its nights are free again in the , and every is told.
When to use it
When the guest cancels on your website. Also when the guest wants other dates or rooms: cancel, then create the booking again.
Who can use it
A , for a hotel that runs the ZimmerStack PMS. The key needs the bookings:write.
Address
POST https://api.zimmerstack.com/api/v1/connect-api/v1/bookings/{bookingId}/cancel
Before this
You need the bookingId, from the answer of Create a booking.

What you send

In the address:

bookingId
Number. ZimmerStack's id of the booking.

The body is optional. You can say why the booking is cancelled.

reason
Text, up to 500 letters. Optional. Why the booking is cancelled. It is kept in the booking's history in ZimmerStack.
example: cancel, and save the reason
{
  "reason": "Guest cancelled on the website"
}

Things to know

  1. It cancels the whole booking. You cannot cancel one room of several.
  2. You can send it twice. A booking that is already cancelled answers 200 with replay: true.
  3. After check-in it is too late. A booking whose guest has arrived () cannot be cancelled here. The answer is 409, and the hotel handles it at the .
  4. After a cancellation, use a new externalReference. The old value stays with the cancelled booking. If you send it again in a new booking, the answer is 409 EXTERNAL_REFERENCE_REUSED.

The request, in your language

Put your key in place of zsk_live_YOUR_KEY.

Save the example above as cancel-your-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/48213/cancel" -H "Authorization: Bearer zsk_live_YOUR_KEY" -H "Content-Type: application/json" -d "@cancel-your-booking.json"

What comes back

The is 200. The answer is the booking after the cancellation, with the same fields as in Get your booking.

response · status code 200
{
  "statuscode": 200,
  "message": "Booking cancelled",
  "data": {
    "bookingId": 48213,
    "reference": "SB-7KQ2MX9D",
    "externalReference": "WEB-2026-000123",
    "status": "CANCELLED",
    "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": "CANCELLED"
      },
      {
        "bookingRoomId": 90002,
        "roomTypeId": 412,
        "ratePlanId": 901,
        "mealPlan": "CP",
        "adults": 2,
        "children": 0,
        "nightlyRate": "4500.00",
        "status": "CANCELLED"
      }
    ],
    "inventory": {
      "eventRecorded": true,
      "channelManager": true,
      "pushedBy": "inventory-drain"
    },
    "replay": false,
    "createdAt": "2026-12-10T09:14:03.201Z",
    "cancelledAt": "2026-12-11T08:02:19.000Z"
  }
}
status
Now CANCELLED.
cancelledAt
When the booking was cancelled.
replay
With true, the booking was already cancelled before this request, and nothing changed.

Common mistakes

400 VALIDATION
The body is wrong: it has a field other than reason, or the reason is too long.
404 BOOKING_NOT_FOUND
This hotel has no booking with this id that your key created.
409 BOOKING_NOT_CANCELLABLE
The guest has already checked in. The hotel handles it at the front desk.
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-After header, then send again.
409 PMS_NOT_AVAILABLE
This is a booking request, and the hotel uses the channel manager only. It has no ZimmerStack PMS to put a booking in.
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.

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.

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
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.
Check-in
The day a guest arrives.
Front desk
The reception of a hotel, where guests arrive and leave.
Sandbox
Your test hotel. It works like a real hotel, but no OTA can see it and it costs nothing.
Status code
A number in every response. 200 to 299 means it worked. 400 and above means there is a problem.
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.

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, Sat, 05 Dec 2026 01:20:48 UTC.