Skip to content

Guide

Test an update before you send it(dry run)

A is a test of an update. You add one field to your update. ZimmerStack checks it and says what it would do. Nothing is saved, and nothing is sent to an .

The idea

When you send an update, the answer has the 202. That means your values are saved. It does not say that they do what you wanted.

A dry run is the same with dryRun: true in its . It is checked exactly like the real update, by the same code. It stops just before anything is saved.

Here is one example. A person at the hotel wants to stop selling one on 31 December. Before your screen saves it, your software asks: "What would this do?" The answer says: the room would still be on sale, through another rate plan. Your screen can show that before the person presses Save.

You can also use it before a job sends a large change.

How to do it

  1. 1

    Take the update you want to send

    The same address, the same data.
  2. 2

    Add one field

    Put "dryRun": true in the body, next to updates.
  3. 3

    Send it

    It is checked exactly like the real update.
  4. 4

    Read the answer

    The status code is 200, not 202. The answer is a preview: what would change, what is already held, and what would be refused.
  5. 5

    Send the real update

    Send the same data again, without dryRun.
Also here
Close a room type and Reopen a room type take dryRun too.

An example

The hotel sells its Deluxe Garden Room through two rate plans: "Bed and breakfast" (id 901) and "Room only" (id 904). A person wants to stop selling "Bed and breakfast" on 31 December. That is a . Your software tests it first.

example: the data you send
{
  "dryRun": true,
  "updates": [
    {
      "ratePlanId": 901,
      "dateFrom": "2026-12-31",
      "dateTo": "2026-12-31",
      "stopSell": true
    }
  ]
}

Save the example above as test-a-stop-sell.json. Open a terminal in the same folder and run this. On Windows PowerShell, type curl.exe instead of curl.

terminal
curl -X PUT "https://api.zimmerstack.com/api/v1/connect-api/v1/restrictions" -H "Authorization: Bearer zsk_test_YOUR_KEY" -H "Content-Type: application/json" -d "@test-a-stop-sell.json"

With the Node package, the same step looks like this:

ask first, with the Node package
// The same updates the real write takes. The answer is a preview: dryRun is true and nothing was written.
const [preview] = await zs().restrictions.dryRun([{ ratePlanId, dateFrom: night, dateTo: night, stopSell: true }]);
if (!preview) return false;
console.log(preview.verdict, preview.wouldChangeCells, "would change,", preview.unchangedCells, "already held");

// The notices say what the write would NOT do. Show them to the person before they press Save.
for (const notice of noticesOf(preview)) console.log(notice.level, notice.code, notice.message);
what comes back: status code 200, the data part. A preview, not a saved update
{
  "dryRun": true,
  "resource": "restrictions",
  "verdict": "would-write",
  "refusal": null,
  "requestedCells": 1,
  "wouldChangeCells": 1,
  "unchangedCells": 0,
  "heldCells": 0,
  "wouldRejectCells": 0,
  "lane": false,
  "wouldChange": [
    {
      "ratePlanIds": [
        901
      ],
      "dateFrom": "2026-12-31",
      "dateTo": "2026-12-31",
      "days": null,
      "cells": 1,
      "stopSell": true
    }
  ],
  "unchanged": [],
  "held": [],
  "wouldReject": [],
  "notices": [
    {
      "code": "ROOM_STILL_ON_SALE",
      "level": "warning",
      "message": "You sent a stop-sell for rate plan 901: a switch on that plan, not on the room. Room type 412 is still on sale on 1 night through its other plan 904.",
      "action": "To close the room on every plan and every channel, use POST /availability/close for room type 412, or send availability 0 for it (PUT /availability).",
      "roomTypeId": 412,
      "ratePlanIds": [
        901
      ],
      "otherRatePlanIds": [
        904
      ],
      "dateFrom": "2026-12-31",
      "dateTo": "2026-12-31",
      "nights": 1
    }
  ],
  "spent": {
    "cells": 1
  },
  "wouldSpend": {
    "changedCells": 1
  },
  "note": "Nothing was written, queued or sent, and no idempotency key was stored. Send the same body without dryRun to do it. Our record can move between the two: the real answer is the truth."
}
verdict
would-write. So the real update would be accepted.
wouldChangeCells
1. One night of one rate plan would change.
notices
One . It says what the update would not do: the room would still be on sale through the other rate plan, 904. Notices lists every code.
note
A reminder in plain words: nothing was saved.

What the answer holds

The most important field is verdict. It says what a real update would do now.

  • verdictwould-write
    A real update wouldBe accepted, with status code 202. It would change as many cells as wouldChangeCells says.
  • verdictnothing-to-write
    A real update wouldBe accepted, with status code 202, and change nothing. ZimmerStack and our connectivity partner already hold every value.
  • verdictwould-refuse
    A real update wouldBe refused. The field refusal has the status code, the error code, the limit and the wait it would get now.

A is one night of one room type or rate plan. Our is the company between ZimmerStack and the OTAs. The answers call it "the channel manager".

wouldChange
The date ranges that would be saved, each with the value you sent.
unchanged
The date ranges that ZimmerStack and our connectivity partner already hold. A real update drops them.
held
The date ranges with a value that our connectivity partner refused before. Its own words are in reason. After you send an update explains values on hold.
wouldReject
What ZimmerStack would refuse, as far as it can know without saving. For example a price on a rate plan where the hotel does not allow it. A real update can still refuse a group for a reason that only shows when it is saved.
rounded
Prices that would not be kept exactly as you sent them. Money explains rounding.
notices
The same notices the real update would carry.
How long the lists are
Each list holds at most 50 date ranges. The fields wouldChangeOmitted, unchangedOmitted and heldOmitted say how many more were left out.
days
It is null, unless the date range skips some days of the week.
spent
What this dry run cost against the limit of cells for a minute.
wouldSpend
How many changed cells the real update would count against the limits for the hour and the day.
lane
It is true when the real update would pass on the . That is the case when you are paused or over a limit, and the update only closes rooms.

What it costs, and what it does not do

The limits of a minute
A dry run counts like the update it tests. It is one request and one write for the key and for the hotel. It counts the same cells against the hotel's cells limit. Rate limits has the numbers.
The limits of an hour and a day
A dry run is never counted there. Those limits count changed cells, and a dry run changes none.
Nothing is saved
No . Nothing waits to be sent. No is saved. So you can send the real update under the same idempotency key.
The real answer is the truth
ZimmerStack's record can change between your dry run and your real update. Trust the answer of the real update.
It is refused like the real update
Some things refuse a dry run with the same status code and error code as the real update, and with no preview. They are: data with a wrong shape, an id of another hotel, a night too far ahead, a missing , a suspended , or a used-up limit of a minute.
A typing mistake never saves anything
dryRun is a field of the body, and a field ZimmerStack does not know is refused. So dryrun, or "true" in quotes, gets 400 VALIDATION. It is never taken as a real update.

Words on this page

Dry run
A test of a request. ZimmerStack checks it and says what it would do, but saves nothing.
OTA
Online travel agency: a website that sells hotel rooms, like Booking.com, MakeMyTrip or Agoda. Learn more
Status code
A number in every response. 200 to 299 means it worked. 400 and above means there is a problem.
Request
One message your software sends to the API.
Body
The data you send inside a request, written in JSON.
Rate plan
One way to sell a room type, with its own price. For example Room only, or With breakfast.
Stop sell
A switch on a rate plan for one night. When it is on, that rate plan is not sold on that night.
Notice
A short message inside an answer. It tells you about something your request did not do.
Cell
One night of one room type or rate plan. An update for 3 nights of 1 room type is 3 cells.
Connectivity partner
The company that carries ZimmerStack's numbers to each OTA and brings the bookings back. You never call it. Where an API name says channel manager, it means this last step. Learn more
Safety lane
A rule that lets an update that only closes rooms pass, even when your limit is used up or your integration is paused.
Batch
One update you sent. It gets an id (batchId), so you can ask later if it reached the OTAs.
Idempotency key
A code you choose and send with an update. If the same update is sent twice by mistake, it is done only once.
Scope
One permission of a key. For example ari:write lets the key update availability, rates and restrictions.
Integration
Your software, once it is connected to ZimmerStack through the API.

Routes, samples, limits and codes on this page come from the API's public contract, read live, Sat, 05 Dec 2026 01:08:05 UTC.