Skip to content

API action

Change a test booking(as the OTA would)

Change a test booking, as an OTA would. Your server gets the real webhook.

About this action

What it does
Changes a test on your : new dates, more or fewer nights or rooms, or a new guest name. Your gets the real channel.booking.modified .
When to use it
When you build the part of your software that handles a changed booking. On an , a guest can change the dates after booking.
Who can use it
A or a . A company key names the hotel with the . The key needs the ari:write.
Address
POST https://api.zimmerstack.com/api/v1/connect-api/v1/sandbox/bookings/{bookingId}/modify
Before this
You need a and the bookingId of a test booking. Get it from the answer of Make a test booking, or from List test bookings. With a company key, put the property id of your sandbox in the X-ZS-Property header.

What you send

In the address:

bookingId
The id of the test booking. A number, like 90311.

Send only what changes. Send at least one field.

checkIn
Text, like 2026-12-25 (year-month-day). The new arrival day. Today or later.
nights
Whole number, 1 to 30. The new number of nights.
rooms
Whole number, 1 to 5. The new number of rooms.
adults
Whole number, 1 to 6. The new number of adults in each room.
guestName
Text. The new name of the guest.
example: the guest now arrives on 25 December and stays 2 nights
{
  "checkIn": "2026-12-25",
  "nights": 2
}

Things to know

  1. The availability moves too. The old nights become free again, and the new nights are taken.
  2. The webhook says what changed. In the webhook, changes names the fields that moved. previous holds the booking as it was before.
  3. A website booking cannot be changed. For a , made with otaName: "Website", the answer is 409 BOOKING_NOT_MODIFIABLE. Cancel it and make a new one.

The request, in your language

Show the examples for

A sandbox's own key works for one hotel: choose "A hotel key" for it.

Put your key in place of zsk_test_YOUR_KEY, and your hotel's property id in place of YOUR_PROPERTY_ID.

Save the example above as change-a-test-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/sandbox/bookings/90311/modify" -H "Authorization: Bearer zsk_test_YOUR_KEY" -H "X-ZS-Property: YOUR_PROPERTY_ID" -H "Content-Type: application/json" -d "@change-a-test-booking.json"

Put your key in place of zsk_test_YOUR_KEY. A hotel key works for one hotel, so the request does not name the hotel.

Save the example above as change-a-test-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/sandbox/bookings/90311/modify" -H "Authorization: Bearer zsk_test_YOUR_KEY" -H "Content-Type: application/json" -d "@change-a-test-booking.json"

What comes back

The is 200. The answer is the booking after the change. The webhook is on its way to your server.

response · status code 200
{
  "statuscode": 200,
  "message": "OK",
  "data": {
    "bookingId": 90311,
    "reference": "SBX-9001-MXHI8W001F6D",
    "channelBookingId": "sbx-1f6d0c2e-7b53-4a0e-9c5a-2d8f3b1e4c70",
    "otaName": "Booking.com",
    "status": "UPCOMING",
    "guestName": "Asha Verma-Rao",
    "checkIn": "2026-12-24",
    "checkOut": "2026-12-27",
    "nights": 3,
    "rooms": 1,
    "roomTypeId": 412,
    "nightlyRate": 4966.67,
    "total": 14900,
    "currency": "INR",
    "paidByOta": false,
    "oversold": false,
    "createdAt": "2026-12-10T12:00:00.000Z",
    "webhook": {
      "eventType": "channel.booking.modified",
      "queued": true
    }
  }
}
checkIn
The arrival day after the change.
checkOut
The day the guest leaves after the change: checkIn plus nights.
total
The price of the stay after the change.
webhook.eventType
channel.booking.modified.
webhook.queued
true: the webhook is waiting to be sent. Your server gets it within seconds.

Common mistakes

403 SANDBOX_ONLY
You used a . This action works only with a test key, on a sandbox.
404 BOOKING_NOT_FOUND
No test booking on this sandbox has this id. Read the ids again with List test bookings.
409 BOOKING_NOT_MODIFIABLE
The booking is cancelled, or it is a website booking. Make a new test booking and change that one.
400 STAY_INVALID
checkIn is before today, or more than 365 days ahead. Dates are on the hotel's own calendar.
400 VALIDATION
No field was sent, or a value has the wrong type. The message names it.
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.
400 PROPERTY_REQUIRED
You hold a company key and did not name the hotel. Add the X-ZS-Property header.
404 PROPERTY_NOT_FOUND
The property id is not one of your hotels. Use an id from List your hotels.
403 SCOPE_MISSING
The key is not allowed to do this. It needs the scope ari: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.
401 API_KEY_REVOKED
The key was switched off, or it was replaced and its extra 24 hours are over. Ask the key's owner for the new key. Nothing else makes this key work.

Try it now

No code and no install. This box sends a real request to your . It works with a only, so it can never change a real hotel.

Try it here: change a test booking

It starts with zsk_test_. It is kept in this browser tab only. Never paste a live key into a web page.

Go deeper

  • Sandbox in depth: Test keys, test bookings and test failures.
  • Webhooks: Receive every booking, check that it is real, and never lose one.

Words on this page

Booking
A guest has reserved a room for some nights. Also called a reservation.
Sandbox
Your test hotel. It works like a real hotel, but no OTA can see it and it costs nothing.
Webhook endpoint
The address of your server where ZimmerStack sends webhooks.
Webhook
A message ZimmerStack sends to your server when something happens, like a new booking.
OTA
Online travel agency: a website that sells hotel rooms, like Booking.com, MakeMyTrip or Agoda. Learn more
Company key
The key of a software company. One key works for all the hotels of that company.
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.
X-ZS-Property
The header that tells ZimmerStack which hotel a request is for. Its value is the property id.
Header
A small piece of extra information sent with a request, like your key.
Scope
One permission of a key. For example ari:write lets the key update availability, rates and restrictions.
Test key
A key that starts with zsk_test_. It works only on a sandbox, so it can never change a real hotel.
Website booking
A booking a guest made on the hotel's own website, through the ZimmerStack booking engine.
Status code
A number in every response. 200 to 299 means it worked. 400 and above means there is a problem.
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, Fri, 04 Dec 2026 16:20:30 UTC.