API action
Make a test booking(pretend an OTA sent one)
Make a pretend OTA booking on your sandbox. Your server gets the real webhook for it.
About this action
- What it does
- Makes a test on your , as if an had sent it. The of the goes down, and every of the sandbox gets the real .
- When to use it
- When you build the part of your software that receives bookings. You can test it at any time, and no real guest is needed.
- Who can use it
- A or a . A company key names the hotel with the . The key needs the
ari:write. - Address
POSThttps://api.zimmerstack.com/api/v1/connect-api/v1/sandbox/bookings- Before this
- You need a and a way to name a room type of your sandbox: your own for it, or its
roomTypeId. Get room types and rate plans shows both. To receive the webhook, your sandbox needs a webhook endpoint. The webhooks guide says how to add one.
What you send
You send the room type, the arrival day and the number of nights. The other fields are optional.
- roomTypeId
- Number. ZimmerStack's id of a room type of your sandbox. Send this or
roomTypeRef, never both. - roomTypeRef
- Text. Your own for that room type: the one you gave it when you created it. Send this or
roomTypeId, never both. - checkIn
- Text, like
2026-12-24(year-month-day). Required. The day the guest arrives (). Today or later, and not more than 365 days ahead. - nights
- Whole number, 1 to 30. Required. How many nights the guest stays.
- rooms
- Whole number, 1 to 5. Optional. How many rooms of this room type the guest books. If you leave it out, it is 1.
- adults
- Whole number, 1 to 6. Optional. How many adults stay in each room. If you leave it out, it is 2.
- guestName
- Text. Optional. The name of the guest. If you leave it out, the sandbox picks a made-up name.
- otaName
- Text. Optional. The OTA the booking pretends to come from:
Booking.com,Expedia,Agoda,Airbnb,MakeMyTriporGoibibo. If you leave it out, it isBooking.com.Websitemakes a . - paidByOta
trueorfalse. Optional.truemeans the OTA already took the guest's money. If you leave it out, it isfalse: the guest pays at the hotel.- arrivesCancelled
trueorfalse. Optional.truemakes a booking that is cancelled from the start. Your server then gets onlychannel.booking.cancelled, with nochannel.booking.createdbefore it.
{
"roomTypeId": 412,
"checkIn": "2026-12-24",
"nights": 3,
"guestName": "Asha Rao",
"otaName": "Booking.com"
}Things to know
- The webhook is real. It has the same fields and the same as the webhook of a real booking. Only
modesaystest, so your server can tell it from a real guest. - The name Website makes a website booking. With
otaName: "Website"the booking comes from the hotel's own website, not from an OTA. Your server then getsdirect.booking.created, if your webhook endpoint lists that event type. List website bookings shows the booking. - A full night does not stop the booking. If no room is free on a night, the booking is still made, with
oversold: true. A real OTA can do the same. This is an . - The availability changes a moment later. The answer comes first. If you read the availability at once, you can still see the old number. Wait about a second, and read again.
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 make-a-test-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/sandbox/bookings" -H "Authorization: Bearer zsk_test_YOUR_KEY" -H "X-ZS-Property: YOUR_PROPERTY_ID" -H "Content-Type: application/json" -d "@make-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 make-a-test-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/sandbox/bookings" -H "Authorization: Bearer zsk_test_YOUR_KEY" -H "Content-Type: application/json" -d "@make-a-test-booking.json"What comes back
The is 201. It means: created. The booking is on your sandbox, and the webhook is on its way to your server.
{
"statuscode": 201,
"message": "Simulated OTA booking created; the channel.booking.created webhook is queued.",
"data": {
"bookingId": 90311,
"reference": "SBX-9001-MXHI8W001F6D",
"channelBookingId": "sbx-1f6d0c2e-7b53-4a0e-9c5a-2d8f3b1e4c70",
"otaName": "Booking.com",
"status": "UPCOMING",
"guestName": "Asha Verma",
"checkIn": "2026-12-24",
"checkOut": "2026-12-26",
"nights": 2,
"rooms": 1,
"roomTypeId": 412,
"nightlyRate": 4850,
"total": 9700,
"currency": "INR",
"paidByOta": false,
"oversold": false,
"createdAt": "2026-12-10T12:00:00.000Z",
"webhook": {
"eventType": "channel.booking.created",
"queued": true
}
}
}- bookingId
- The id of the booking. The webhook carries the same id. You need it to change or cancel this test booking.
- reference
- The reference of the booking. It starts with
SBX-. - status
UPCOMING: the guest has not arrived yet. List OTA bookings shows the same booking withstatus: CONFIRMEDandstayStatus: UPCOMING.- checkOut
- The day the guest leaves ():
checkInplusnights. - nightlyRate
- The price of one room for one night. The sandbox reads it from its own , for the first of the room type. When the nights have different prices, it is their average.
- total
- The price of all nights, for all rooms.
- oversold
truewhen a night had no free room left.- webhook.eventType
- The type of the event that was sent.
- webhook.queued
true: the webhook is waiting to be sent. Your server gets it within seconds.
Then look at what your server received
Within seconds your webhook endpoint gets channel.booking.created. Check that your software saved the booking. Then try the next steps on the same booking.
- Change it
- Change a test booking sends
channel.booking.modified. - Cancel it
- Cancel a test booking sends
channel.booking.cancelled.
Common mistakes
- 403 SANDBOX_ONLY
- You used a . This action works only with a test key, on a sandbox.
- 400 UNKNOWN_ROOM_TYPE
- No room type of this sandbox has this
roomTypeIdor thisroomTypeRef. Read them again with Get room types and rate plans. - 409 CATALOG_CONFLICT
- Two room types of this sandbox have the ref you sent, so it names no single one. Name the room type by its
roomTypeId. - 400 STAY_INVALID
checkInis before today, or more than 365 days ahead. Dates are on the hotel's own calendar.- 400 VALIDATION
- A value is missing or has the wrong type. The message names it. A request with both
roomTypeIdandroomTypeRef, or with neither, is refused too. You also get this when you sendarrivesCancelled: truetogether withotaName: "Website".
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-Propertyheader. - 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-Afterheader, then send again.
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: make 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
- Receive a booking: Get an OTA booking sent to your server.
- Sandbox in depth: Test keys, test bookings and test failures.
- Webhooks: Receive every booking, check that it is real, and never lose one.
- Bookings from the hotel's own website: How a booking made on the hotel's website reaches your PMS.
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.
- OTA
- Online travel agency: a website that sells hotel rooms, like Booking.com, MakeMyTrip or Agoda. Learn more
- Availability
- How many rooms of one room type are free to sell on one night. Learn more
- 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.
- Ref
- Your own name or id for a room type or a rate plan. You choose it, and ZimmerStack remembers it.
- 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.
- 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.
- Check-in
- The day a guest arrives.
- Website booking
- A booking a guest made on the hotel's own website, through the ZimmerStack booking engine.
- Signature
- A code sent with each webhook. Your server checks it with the signing secret.
- Overbooking
- Selling the same room to two guests for the same night.
- 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.
- Check-out
- The day a guest leaves. It is not a night of the stay.
- Rates
- The price of a room for one night. Learn more
- Rate plan
- One way to sell a room type, with its own price. For example Room only, or With breakfast.
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:29 UTC.