@zimmerstack/connect 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +99 -0
- package/LICENSE +21 -0
- package/README.md +225 -2
- package/dist/cjs/client.d.ts +260 -0
- package/dist/cjs/client.js +562 -0
- package/dist/cjs/errors.d.ts +46 -0
- package/dist/cjs/errors.js +51 -0
- package/dist/cjs/generated.d.ts +1153 -0
- package/dist/cjs/generated.js +135 -0
- package/dist/cjs/grid.d.ts +105 -0
- package/dist/cjs/grid.js +135 -0
- package/dist/cjs/index.d.ts +16 -0
- package/dist/cjs/index.js +30 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/webhooks.d.ts +60 -0
- package/dist/cjs/webhooks.js +103 -0
- package/dist/esm/client.d.ts +260 -0
- package/dist/esm/client.js +558 -0
- package/dist/esm/errors.d.ts +46 -0
- package/dist/esm/errors.js +46 -0
- package/dist/esm/generated.d.ts +1153 -0
- package/dist/esm/generated.js +132 -0
- package/dist/esm/grid.d.ts +105 -0
- package/dist/esm/grid.js +127 -0
- package/dist/esm/index.d.ts +16 -0
- package/dist/esm/index.js +11 -0
- package/dist/esm/mcp/cli.d.ts +2 -0
- package/dist/esm/mcp/cli.js +86 -0
- package/dist/esm/mcp/key.d.ts +9 -0
- package/dist/esm/mcp/key.js +31 -0
- package/dist/esm/mcp/reference.d.ts +11 -0
- package/dist/esm/mcp/reference.generated.d.ts +33 -0
- package/dist/esm/mcp/reference.generated.js +2084 -0
- package/dist/esm/mcp/reference.js +137 -0
- package/dist/esm/mcp/server.d.ts +29 -0
- package/dist/esm/mcp/server.js +223 -0
- package/dist/esm/webhooks.d.ts +60 -0
- package/dist/esm/webhooks.js +98 -0
- package/package.json +61 -4
|
@@ -0,0 +1,2084 @@
|
|
|
1
|
+
// GENERATED by scripts/generate.mjs from the Connect API's public contract (ZimmerStack Connect API v1).
|
|
2
|
+
// Do not edit: change the contract, then run `pnpm --dir apps/connect-sdk run generate`.
|
|
3
|
+
// What the package's MCP server (src/mcp) answers lookups from. It is not part of the client's own exports.
|
|
4
|
+
/** The rules file this package ships (AGENTS.md), for the zimmerstack_rules tool. */
|
|
5
|
+
export const RULES = "# Building on @zimmerstack/connect: rules for coding agents\n\nYou are writing code that calls the ZimmerStack Connect API through its official package. A write\nthrough it changes a real hotel's prices and rooms on every booking site it sells on. The package\nenforces most of the API's rules for you; this file is the rest. Keep it in the repository (as\nAGENTS.md or CLAUDE.md) and follow it. The whole API reference, in one file an agent can read:\nhttps://docs.zimmerstack.com/llms-full.txt\n\n## The key\n\n- It lives in the environment variable `ZIMMERSTACK_CONNECT_KEY` on a server. Never write it into a\n file that is committed, a log line, an error message, a URL, a test fixture or anything a browser\n or a mobile app receives. Never print it. `new ZimmerStack()` reads it by itself.\n- The package refuses to start in a browser or in React Native. Do not work around that: the\n person's own frontend calls their own server, and the server calls ZimmerStack.\n- `zsk_test_…` is a sandbox: nothing reaches a channel. Build and test with it. `zsk_live_…` is a real\n hotel. The package refuses to WRITE with a live key under a test runner; never switch that off to\n make a test pass.\n- A software vendor's company key acts on one hotel at a time: `zs.forProperty(propertyId)`\n (`zs.properties.list()` names them).\n\n## Let the package pace; never work around it\n\n- It reads the `RateLimit` header and slows down before a budget runs out, sends writes one at a\n time, retries only what passes with time (429, 5xx, a network failure) under the same idempotency\n key, and gives up with a `ZimmerStackError` otherwise. Do not wrap its calls in your own retry\n loop, and never resend a 4xx other than 429: it is a verdict on the request. Fix the request.\n- Per minute: 120 requests and 30 writes per key; 300 and 60 for all of a hotel's keys together.\n A hotel also has budgets per hour and per day that count CHANGED cells (at least 10,000 an hour, 30,000\n a day). Hitting one is `error.code === \"RATE_LIMITED\"` with `error.retryAfterSeconds`: tell the\n person when to try again; do not sleep through an hour.\n- One instance per process (`new ZimmerStack()` once, in a module). Two instances do not share a pace.\n- Never write on a timer, in a loop over all nights, or \"to be safe\". Send what a person changed,\n when they changed it: `zs.grid.save(edits)` folds nights into ranges and splits a large save.\n- Do not poll faster than every 15 seconds (`zs.batches.wait` already does it right), and stop.\n\n## Money and dates\n\n- A price is SENT in major units (4500 = ₹4,500.00) with the hotel's own currency, and READ in minor\n units (`rateMinor`). `zs.grid.load` gives major units; `zs.grid.save` takes them.\n- A date is a plain `YYYY-MM-DD` calendar day in the hotel's timezone. Never build one with\n `new Date()` arithmetic in local time; use `eachDate(from, to)`.\n- To close a night send `stopSell: true`. Never a zero price, never zero rooms as a substitute.\n- Writes may reach 365 days ahead. A write is accepted (202) when it is in ZimmerStack's record; it\n reaches the channels in seconds to minutes. `zs.sync.get()` says how far along it is.\n\n## A channel's price modifier\n\n- `zs.channels.setModifier(channelId, steps)` moves EVERY price sent to that channel from then on.\n Call it only when a person saved that setting on a screen. Never from a loop, a timer, a seed\n script or a test against a live key. A hotel may change modifiers 6 times a day.\n- A modifier applies to prices sent to the channel after the change. Prices already on the channel stay as they are until those nights are sent again.\n Show that sentence where the person saves (`MODIFIER_TAKES_EFFECT`), and offer\n `zs.rates.resend()` as a separate, deliberate button (\"Apply to nights already on sale\"): 3 a day\n per hotel, never automatic.\n- Keep the grid on the price before any modifier; show a channel's price beside it with\n `channelPrice(rate, steps)`.\n\n## Errors\n\n```ts\nimport { ZimmerStack, ZimmerStackError } from \"@zimmerstack/connect\";\n\ntry {\n await zs.rates.set(updates);\n} catch (err) {\n if (err instanceof ZimmerStackError) {\n // err.code is stable (RATE_LIMITED, RATE_OUT_OF_BAND, SCOPE_MISSING, …); err.message is for people.\n // Show err.message to the person; branch on err.code; never retry unless err.retryable.\n }\n throw err;\n}\n```\n\n- `SCOPE_MISSING`: the key was not given that permission. Say which one is missing; the hotel's\n owner grants it (Admin → Developers → API keys). Do not look for another route.\n- `API_KEY_INVALID`, `API_KEY_REVOKED`, `API_KEY_EXPIRED`: stop. The client refuses every later call\n by itself; repeated bad calls get the server's address refused.\n- `RATE_OUT_OF_BAND`, `MODIFIER_OUT_OF_BAND`: the value is outside what the hotel allows. It is a\n guard against a typing slip; show the message, never split the change into smaller steps to pass.\n\n## The MCP server\n\nThe package carries an MCP server for you, the agent: `npx -y @zimmerstack/connect mcp`. If it is\nconnected, use it instead of guessing: `zimmerstack_reference` looks up any operation, type, limit\nor error code from the API's own contract, and `zimmerstack_sandbox_read` /\n`zimmerstack_sandbox_write` make one call on the sandbox so you can see real ids and try a body\nbefore you write the code that sends it. It works with a `zsk_test_` key only and refuses a live\none. It is for building; the application you write calls the API through the client, never through\nthese tools.\n\n## Before you call the work done\n\n- [ ] The key is read from the environment, on a server, and appears in no committed file or log.\n- [ ] Every screen that writes sends only what the person changed, once, on their action.\n- [ ] No retry loop, no timer and no polling faster than 15 seconds around a call of this package.\n- [ ] Errors show `err.message` to the person and branch on `err.code`.\n- [ ] Tests run against a `zsk_test_` key or a fake `fetch`; none needs a live key.\n- [ ] Where a modifier is saved, the screen says when it takes effect, and the re-send is its own button.\n";
|
|
6
|
+
export const REFERENCE = {
|
|
7
|
+
"api": "ZimmerStack Connect API v1",
|
|
8
|
+
"base": "https://api.zimmerstack.com/api/v1/connect-api/v1",
|
|
9
|
+
"operations": [
|
|
10
|
+
{
|
|
11
|
+
"key": "GET /properties",
|
|
12
|
+
"summary": "The properties this key may act on",
|
|
13
|
+
"description": "A company key: every hotel it may act on, with the id to name in the X-ZS-Property header; the one route a company key calls without that header. A hotel key: its own property, in the same shape. keyKind says which kind of key you hold.",
|
|
14
|
+
"scope": null,
|
|
15
|
+
"call": "zs.properties.list()",
|
|
16
|
+
"path": [],
|
|
17
|
+
"query": [],
|
|
18
|
+
"body": null,
|
|
19
|
+
"response": "Properties",
|
|
20
|
+
"answerStatus": [
|
|
21
|
+
200
|
|
22
|
+
],
|
|
23
|
+
"idempotent": false,
|
|
24
|
+
"request": null,
|
|
25
|
+
"answer": {
|
|
26
|
+
"keyKind": "company",
|
|
27
|
+
"properties": [
|
|
28
|
+
{
|
|
29
|
+
"id": 61,
|
|
30
|
+
"name": "The Lantern House",
|
|
31
|
+
"timezone": "Asia/Kolkata",
|
|
32
|
+
"currency": "INR",
|
|
33
|
+
"channelManager": true,
|
|
34
|
+
"sandbox": false
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": 62,
|
|
38
|
+
"name": "Hill View Retreat",
|
|
39
|
+
"timezone": "Asia/Kolkata",
|
|
40
|
+
"currency": "INR",
|
|
41
|
+
"channelManager": true,
|
|
42
|
+
"sandbox": false
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"refusals": [
|
|
47
|
+
{
|
|
48
|
+
"status": 401,
|
|
49
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"status": 403,
|
|
53
|
+
"description": "The key lacks the scope this route needs (SCOPE_MISSING, details.needed / details.held), or the request came from outside the key's address allowlist (IP_NOT_ALLOWED)"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"status": 404,
|
|
57
|
+
"description": "X-ZS-Property names a property this key may not act on (PROPERTY_NOT_FOUND): for a company key, one outside its hotels; for a hotel key, any other property. A company key without the header is 400 PROPERTY_REQUIRED"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"status": 409,
|
|
61
|
+
"description": "The property is deleted or demo (PROPERTY_UNAVAILABLE); on an ARI route its channel manager is off (CHANNEL_MANAGER_DISABLED), or, on a company key, its rates are not the source of truth (ARI_NOT_AUTHORITATIVE); on a booking route it has no PMS (PMS_NOT_AVAILABLE)"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"status": 429,
|
|
65
|
+
"description": "A budget was exhausted — data.scope names it (ip · ip-auth · requests · writes · property · property-writes · cells · company · global, or one of the long budgets of x-zimmerstack.shield); honour Retry-After and pace on the RateLimit header (x-zimmerstack.rateLimits)"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"key": "GET /property",
|
|
71
|
+
"summary": "The property this key is for",
|
|
72
|
+
"description": "",
|
|
73
|
+
"scope": null,
|
|
74
|
+
"call": "zs.property.get()",
|
|
75
|
+
"path": [],
|
|
76
|
+
"query": [],
|
|
77
|
+
"body": null,
|
|
78
|
+
"response": "Property",
|
|
79
|
+
"answerStatus": [
|
|
80
|
+
200
|
|
81
|
+
],
|
|
82
|
+
"idempotent": false,
|
|
83
|
+
"request": null,
|
|
84
|
+
"answer": {
|
|
85
|
+
"id": 61,
|
|
86
|
+
"name": "The Lantern House",
|
|
87
|
+
"timezone": "Asia/Kolkata",
|
|
88
|
+
"currency": "INR",
|
|
89
|
+
"inventoryScope": "PMS_CM",
|
|
90
|
+
"sandbox": false,
|
|
91
|
+
"horizonDays": 365,
|
|
92
|
+
"ariAuthoritative": true,
|
|
93
|
+
"scopes": [
|
|
94
|
+
"bookings:read",
|
|
95
|
+
"bookings:write"
|
|
96
|
+
],
|
|
97
|
+
"products": {
|
|
98
|
+
"channelManager": true,
|
|
99
|
+
"pms": true
|
|
100
|
+
},
|
|
101
|
+
"limits": {
|
|
102
|
+
"requestsPerMinute": 120,
|
|
103
|
+
"writesPerMinute": 30,
|
|
104
|
+
"maxUpdatesPerRequest": 1000,
|
|
105
|
+
"maxCellsPerRequest": 5000,
|
|
106
|
+
"bookingsPerMinute": 20,
|
|
107
|
+
"cellsPerHour": 10000,
|
|
108
|
+
"cellsPerDay": 30000,
|
|
109
|
+
"maxRoomTypes": 18,
|
|
110
|
+
"maxRatePlans": 180,
|
|
111
|
+
"ratePlansPerRoomType": null,
|
|
112
|
+
"newEntitiesPerMinute": 20
|
|
113
|
+
},
|
|
114
|
+
"usage": {
|
|
115
|
+
"cellsThisHour": 43,
|
|
116
|
+
"cellsLast24h": 1138
|
|
117
|
+
},
|
|
118
|
+
"shield": {
|
|
119
|
+
"level": "CLEAR",
|
|
120
|
+
"reason": null,
|
|
121
|
+
"until": null
|
|
122
|
+
},
|
|
123
|
+
"sync": {
|
|
124
|
+
"state": "IN_SYNC",
|
|
125
|
+
"pendingCells": 0
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"refusals": [
|
|
129
|
+
{
|
|
130
|
+
"status": 401,
|
|
131
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"status": 403,
|
|
135
|
+
"description": "The key lacks the scope this route needs (SCOPE_MISSING, details.needed / details.held), or the request came from outside the key's address allowlist (IP_NOT_ALLOWED)"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"status": 404,
|
|
139
|
+
"description": "X-ZS-Property names a property this key may not act on (PROPERTY_NOT_FOUND): for a company key, one outside its hotels; for a hotel key, any other property. A company key without the header is 400 PROPERTY_REQUIRED"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"status": 409,
|
|
143
|
+
"description": "The property is deleted or demo (PROPERTY_UNAVAILABLE); on an ARI route its channel manager is off (CHANNEL_MANAGER_DISABLED), or, on a company key, its rates are not the source of truth (ARI_NOT_AUTHORITATIVE); on a booking route it has no PMS (PMS_NOT_AVAILABLE)"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"status": 429,
|
|
147
|
+
"description": "A budget was exhausted — data.scope names it (ip · ip-auth · requests · writes · property · property-writes · cells · company · global, or one of the long budgets of x-zimmerstack.shield); honour Retry-After and pace on the RateLimit header (x-zimmerstack.rateLimits)"
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"key": "GET /catalog",
|
|
153
|
+
"summary": "Room types and rate plans with the numeric ids every write uses",
|
|
154
|
+
"description": "",
|
|
155
|
+
"scope": null,
|
|
156
|
+
"call": "zs.catalog.get()",
|
|
157
|
+
"path": [],
|
|
158
|
+
"query": [],
|
|
159
|
+
"body": null,
|
|
160
|
+
"response": "Catalog",
|
|
161
|
+
"answerStatus": [
|
|
162
|
+
200
|
|
163
|
+
],
|
|
164
|
+
"idempotent": false,
|
|
165
|
+
"request": null,
|
|
166
|
+
"answer": {
|
|
167
|
+
"currency": "INR",
|
|
168
|
+
"roomTypes": [
|
|
169
|
+
{
|
|
170
|
+
"id": 412,
|
|
171
|
+
"ref": "rt-deluxe",
|
|
172
|
+
"name": "Deluxe Garden Room",
|
|
173
|
+
"maxAdults": 2,
|
|
174
|
+
"maxChildren": 1,
|
|
175
|
+
"roomKind": "room",
|
|
176
|
+
"sync": "IN_SYNC"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"id": 413,
|
|
180
|
+
"ref": null,
|
|
181
|
+
"name": "Family Suite",
|
|
182
|
+
"maxAdults": 4,
|
|
183
|
+
"maxChildren": 2,
|
|
184
|
+
"roomKind": "room",
|
|
185
|
+
"sync": "IN_SYNC"
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"ratePlans": [
|
|
189
|
+
{
|
|
190
|
+
"id": 901,
|
|
191
|
+
"ref": "rp-bb",
|
|
192
|
+
"roomTypeId": 412,
|
|
193
|
+
"name": "Bed and breakfast",
|
|
194
|
+
"mealPlan": "CP",
|
|
195
|
+
"occupancy": 2,
|
|
196
|
+
"currency": "INR",
|
|
197
|
+
"refundable": true,
|
|
198
|
+
"sync": "IN_SYNC"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"id": 902,
|
|
202
|
+
"ref": null,
|
|
203
|
+
"roomTypeId": 413,
|
|
204
|
+
"name": "Room only, non-refundable",
|
|
205
|
+
"mealPlan": "EP",
|
|
206
|
+
"occupancy": 4,
|
|
207
|
+
"currency": "INR",
|
|
208
|
+
"refundable": false,
|
|
209
|
+
"sync": "PENDING"
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
"refusals": [
|
|
214
|
+
{
|
|
215
|
+
"status": 401,
|
|
216
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"status": 403,
|
|
220
|
+
"description": "The key lacks the scope this route needs (SCOPE_MISSING, details.needed / details.held), or the request came from outside the key's address allowlist (IP_NOT_ALLOWED)"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"status": 404,
|
|
224
|
+
"description": "X-ZS-Property names a property this key may not act on (PROPERTY_NOT_FOUND): for a company key, one outside its hotels; for a hotel key, any other property. A company key without the header is 400 PROPERTY_REQUIRED"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"status": 409,
|
|
228
|
+
"description": "The property is deleted or demo (PROPERTY_UNAVAILABLE); on an ARI route its channel manager is off (CHANNEL_MANAGER_DISABLED), or, on a company key, its rates are not the source of truth (ARI_NOT_AUTHORITATIVE); on a booking route it has no PMS (PMS_NOT_AVAILABLE)"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"status": 429,
|
|
232
|
+
"description": "A budget was exhausted — data.scope names it (ip · ip-auth · requests · writes · property · property-writes · cells · company · global, or one of the long budgets of x-zimmerstack.shield); honour Retry-After and pace on the RateLimit header (x-zimmerstack.rateLimits)"
|
|
233
|
+
}
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"key": "PUT /catalog/room-types",
|
|
238
|
+
"summary": "Create or change room types by your own ref",
|
|
239
|
+
"description": "Scope catalog:write. Up to 50 per request, each ref once. A ref seen before is updated where the fields differ; a new ref whose name the owner already used (with no ref) adopts that room type; anything else is created here and on the channel manager at once. roomCount is read at creation only. The answer lists our id, the action and the sync status per entity, and where the property's channel manager stands.",
|
|
240
|
+
"scope": "catalog:write",
|
|
241
|
+
"call": "zs.catalog.upsertRoomTypes(body)",
|
|
242
|
+
"path": [],
|
|
243
|
+
"query": [],
|
|
244
|
+
"body": "RoomTypesUpsert",
|
|
245
|
+
"response": "CatalogUpsertResult",
|
|
246
|
+
"answerStatus": [
|
|
247
|
+
200
|
|
248
|
+
],
|
|
249
|
+
"idempotent": true,
|
|
250
|
+
"request": {
|
|
251
|
+
"roomTypes": [
|
|
252
|
+
{
|
|
253
|
+
"ref": "rt-deluxe",
|
|
254
|
+
"name": "Deluxe Garden Room",
|
|
255
|
+
"roomCount": 8,
|
|
256
|
+
"adults": 2,
|
|
257
|
+
"children": 1
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"ref": "rt-penthouse",
|
|
261
|
+
"name": "Penthouse",
|
|
262
|
+
"roomCount": 1,
|
|
263
|
+
"adults": 3,
|
|
264
|
+
"children": 1
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
},
|
|
268
|
+
"answer": {
|
|
269
|
+
"items": [
|
|
270
|
+
{
|
|
271
|
+
"ref": "rt-deluxe",
|
|
272
|
+
"id": 412,
|
|
273
|
+
"action": "adopted",
|
|
274
|
+
"sync": "IN_SYNC",
|
|
275
|
+
"notice": null
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"ref": "rt-penthouse",
|
|
279
|
+
"id": 414,
|
|
280
|
+
"action": "created",
|
|
281
|
+
"sync": "IN_SYNC",
|
|
282
|
+
"notice": null
|
|
283
|
+
}
|
|
284
|
+
],
|
|
285
|
+
"channelManager": {
|
|
286
|
+
"enabled": true,
|
|
287
|
+
"reason": null
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"refusals": [
|
|
291
|
+
{
|
|
292
|
+
"status": 400,
|
|
293
|
+
"description": "data.code VALIDATION: a shape, a cap, a ref twice, guests below a plan's occupancy; or TOO_MANY_NEW_ENTITIES: more new room types than one request may create"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"status": 401,
|
|
297
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"status": 403,
|
|
301
|
+
"description": "The key lacks the scope this route needs (SCOPE_MISSING, details.needed / details.held), or the request came from outside the key's address allowlist (IP_NOT_ALLOWED)"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"status": 404,
|
|
305
|
+
"description": "X-ZS-Property names a property this key may not act on (PROPERTY_NOT_FOUND): for a company key, one outside its hotels; for a hotel key, any other property. A company key without the header is 400 PROPERTY_REQUIRED"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"status": 409,
|
|
309
|
+
"description": "CATALOG_CONFLICT: a name another room type holds; CATALOG_LIMIT_REACHED: the property holds as many room types as it may; or PROPERTY_UNAVAILABLE / CHANNEL_MANAGER_DISABLED as everywhere"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"status": 413,
|
|
313
|
+
"description": "Body larger than 1048576 bytes (x-zimmerstack.limits.maxBodyBytes); nothing was read"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"status": 429,
|
|
317
|
+
"description": "A per-minute budget, or one of structure's own: structure-creates (new entities this minute) · structure-creates-day · structure-edits-day · vendor-structure-creates-day · vendor-remote-properties-day, or shield-pause while the integration is paused. Honour Retry-After"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"status": 503,
|
|
321
|
+
"description": "ZimmerStack has paused every write to the channel manager (WRITES_FROZEN), or the write could not be checked against its budgets (SHIELD_UNAVAILABLE). Nothing was written; honour Retry-After"
|
|
322
|
+
}
|
|
323
|
+
]
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"key": "DELETE /catalog/room-types/{roomTypeId}",
|
|
327
|
+
"summary": "Delete a room type: the channel manager's copy first, then ours; its plans go with it",
|
|
328
|
+
"description": "Scope catalog:write. Refused while rooms are assigned to it on a PMS property, or while a channel still sells one of its plans. Nothing changes here when the channel manager refuses.",
|
|
329
|
+
"scope": "catalog:write",
|
|
330
|
+
"call": "zs.catalog.deleteRoomType(roomTypeId)",
|
|
331
|
+
"path": [
|
|
332
|
+
"roomTypeId"
|
|
333
|
+
],
|
|
334
|
+
"query": [],
|
|
335
|
+
"body": null,
|
|
336
|
+
"response": "CatalogDeleteResult",
|
|
337
|
+
"answerStatus": [
|
|
338
|
+
200
|
|
339
|
+
],
|
|
340
|
+
"idempotent": false,
|
|
341
|
+
"request": null,
|
|
342
|
+
"answer": {
|
|
343
|
+
"id": 414,
|
|
344
|
+
"deleted": true,
|
|
345
|
+
"channelManagerDeleted": true,
|
|
346
|
+
"deletedRatePlanIds": [
|
|
347
|
+
903
|
|
348
|
+
]
|
|
349
|
+
},
|
|
350
|
+
"refusals": [
|
|
351
|
+
{
|
|
352
|
+
"status": 401,
|
|
353
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"status": 403,
|
|
357
|
+
"description": "The key lacks the scope this route needs (SCOPE_MISSING, details.needed / details.held), or the request came from outside the key's address allowlist (IP_NOT_ALLOWED)"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"status": 404,
|
|
361
|
+
"description": "Not this property's, or already deleted; on a company key, PROPERTY_NOT_FOUND when X-ZS-Property names a property it may not act on"
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"status": 409,
|
|
365
|
+
"description": "Rooms still assigned, or a channel still sells one of its plans"
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"status": 429,
|
|
369
|
+
"description": "A per-minute budget, or structure-deletes-day: the property's deletions for the day, or shield-pause while the integration is paused. Honour Retry-After"
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"status": 502,
|
|
373
|
+
"description": "The channel manager refused the delete; nothing changed here"
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"status": 503,
|
|
377
|
+
"description": "ZimmerStack has paused every write to the channel manager (WRITES_FROZEN), or the write could not be checked against its budgets (SHIELD_UNAVAILABLE). Nothing was written; honour Retry-After"
|
|
378
|
+
}
|
|
379
|
+
]
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"key": "PUT /catalog/rate-plans",
|
|
383
|
+
"summary": "Create or change rate plans by your own ref",
|
|
384
|
+
"description": "Scope catalog:write. Up to 100 per request, each ref once; name the room type by our id (roomTypeId) or by the ref you gave it (roomTypeRef, in this request or an earlier one). A ref seen before is updated where the fields differ; a new ref whose name exists under the same room type (with no ref) adopts that plan; anything else is created here and on the channel manager at once, seeded at defaultRateMinor when given. A plan never moves between room types.",
|
|
385
|
+
"scope": "catalog:write",
|
|
386
|
+
"call": "zs.catalog.upsertRatePlans(body)",
|
|
387
|
+
"path": [],
|
|
388
|
+
"query": [],
|
|
389
|
+
"body": "RatePlansUpsert",
|
|
390
|
+
"response": "CatalogUpsertResult",
|
|
391
|
+
"answerStatus": [
|
|
392
|
+
200
|
|
393
|
+
],
|
|
394
|
+
"idempotent": true,
|
|
395
|
+
"request": {
|
|
396
|
+
"ratePlans": [
|
|
397
|
+
{
|
|
398
|
+
"ref": "rp-bb",
|
|
399
|
+
"roomTypeRef": "rt-deluxe",
|
|
400
|
+
"name": "Bed and breakfast",
|
|
401
|
+
"mealPlan": "CP",
|
|
402
|
+
"occupancy": 2,
|
|
403
|
+
"refundable": true,
|
|
404
|
+
"defaultRateMinor": 450000
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"ref": "rp-ph-ro",
|
|
408
|
+
"roomTypeRef": "rt-penthouse",
|
|
409
|
+
"name": "Room only",
|
|
410
|
+
"mealPlan": "EP",
|
|
411
|
+
"occupancy": 3,
|
|
412
|
+
"refundable": false,
|
|
413
|
+
"defaultRateMinor": 1200000
|
|
414
|
+
}
|
|
415
|
+
]
|
|
416
|
+
},
|
|
417
|
+
"answer": {
|
|
418
|
+
"items": [
|
|
419
|
+
{
|
|
420
|
+
"ref": "rt-deluxe",
|
|
421
|
+
"id": 412,
|
|
422
|
+
"action": "adopted",
|
|
423
|
+
"sync": "IN_SYNC",
|
|
424
|
+
"notice": null
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"ref": "rt-penthouse",
|
|
428
|
+
"id": 414,
|
|
429
|
+
"action": "created",
|
|
430
|
+
"sync": "IN_SYNC",
|
|
431
|
+
"notice": null
|
|
432
|
+
}
|
|
433
|
+
],
|
|
434
|
+
"channelManager": {
|
|
435
|
+
"enabled": true,
|
|
436
|
+
"reason": null
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
"refusals": [
|
|
440
|
+
{
|
|
441
|
+
"status": 400,
|
|
442
|
+
"description": "data.code is one of VALIDATION | UNKNOWN_ROOM_TYPE (the room type is not this property's, or its ref was never sent) | TOO_MANY_NEW_ENTITIES (more new plans than one request may create)"
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"status": 401,
|
|
446
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"status": 403,
|
|
450
|
+
"description": "The key lacks the scope this route needs (SCOPE_MISSING, details.needed / details.held), or the request came from outside the key's address allowlist (IP_NOT_ALLOWED)"
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"status": 404,
|
|
454
|
+
"description": "X-ZS-Property names a property this key may not act on (PROPERTY_NOT_FOUND): for a company key, one outside its hotels; for a hotel key, any other property. A company key without the header is 400 PROPERTY_REQUIRED"
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"status": 409,
|
|
458
|
+
"description": "CATALOG_CONFLICT: a plan sent under another room type than it has, or an occupancy above the room's adults; CATALOG_LIMIT_REACHED: the property holds as many rate plans as it may; or PROPERTY_UNAVAILABLE / CHANNEL_MANAGER_DISABLED as everywhere"
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"status": 413,
|
|
462
|
+
"description": "Body larger than 1048576 bytes (x-zimmerstack.limits.maxBodyBytes); nothing was read"
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"status": 429,
|
|
466
|
+
"description": "A per-minute budget, or one of structure's own: structure-creates (new entities this minute) · structure-creates-day · structure-edits-day · vendor-structure-creates-day · vendor-remote-properties-day, or shield-pause while the integration is paused. Honour Retry-After"
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"status": 503,
|
|
470
|
+
"description": "ZimmerStack has paused every write to the channel manager (WRITES_FROZEN), or the write could not be checked against its budgets (SHIELD_UNAVAILABLE). Nothing was written; honour Retry-After"
|
|
471
|
+
}
|
|
472
|
+
]
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"key": "DELETE /catalog/rate-plans/{ratePlanId}",
|
|
476
|
+
"summary": "Delete a rate plan: the channel manager's copy first, then ours",
|
|
477
|
+
"description": "Scope catalog:write. Refused while a channel still sells it (unmap it on the channel manager first). Nothing changes here when the channel manager refuses.",
|
|
478
|
+
"scope": "catalog:write",
|
|
479
|
+
"call": "zs.catalog.deleteRatePlan(ratePlanId)",
|
|
480
|
+
"path": [
|
|
481
|
+
"ratePlanId"
|
|
482
|
+
],
|
|
483
|
+
"query": [],
|
|
484
|
+
"body": null,
|
|
485
|
+
"response": "CatalogDeleteResult",
|
|
486
|
+
"answerStatus": [
|
|
487
|
+
200
|
|
488
|
+
],
|
|
489
|
+
"idempotent": false,
|
|
490
|
+
"request": null,
|
|
491
|
+
"answer": {
|
|
492
|
+
"id": 903,
|
|
493
|
+
"deleted": true,
|
|
494
|
+
"channelManagerDeleted": true,
|
|
495
|
+
"deletedRatePlanIds": []
|
|
496
|
+
},
|
|
497
|
+
"refusals": [
|
|
498
|
+
{
|
|
499
|
+
"status": 401,
|
|
500
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"status": 403,
|
|
504
|
+
"description": "The key lacks the scope this route needs (SCOPE_MISSING, details.needed / details.held), or the request came from outside the key's address allowlist (IP_NOT_ALLOWED)"
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"status": 404,
|
|
508
|
+
"description": "Not this property's, or already deleted; on a company key, PROPERTY_NOT_FOUND when X-ZS-Property names a property it may not act on"
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
"status": 409,
|
|
512
|
+
"description": "A channel still sells this plan"
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
"status": 429,
|
|
516
|
+
"description": "A per-minute budget, or structure-deletes-day: the property's deletions for the day, or shield-pause while the integration is paused. Honour Retry-After"
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"status": 502,
|
|
520
|
+
"description": "The channel manager refused the delete; nothing changed here"
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"status": 503,
|
|
524
|
+
"description": "ZimmerStack has paused every write to the channel manager (WRITES_FROZEN), or the write could not be checked against its budgets (SHIELD_UNAVAILABLE). Nothing was written; honour Retry-After"
|
|
525
|
+
}
|
|
526
|
+
]
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"key": "GET /availability",
|
|
530
|
+
"summary": "Availability as our record holds it",
|
|
531
|
+
"description": "Served from our record, never from the channel manager.",
|
|
532
|
+
"scope": "ari:read",
|
|
533
|
+
"call": "zs.availability.get({ from, to })",
|
|
534
|
+
"path": [],
|
|
535
|
+
"query": [
|
|
536
|
+
{
|
|
537
|
+
"name": "from",
|
|
538
|
+
"required": false,
|
|
539
|
+
"type": "string",
|
|
540
|
+
"description": "Default: today in the property's timezone"
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
"name": "to",
|
|
544
|
+
"required": false,
|
|
545
|
+
"type": "string",
|
|
546
|
+
"description": "Default: from + 30 days; at most 500 days after from"
|
|
547
|
+
}
|
|
548
|
+
],
|
|
549
|
+
"body": null,
|
|
550
|
+
"response": "AvailabilityRead",
|
|
551
|
+
"answerStatus": [
|
|
552
|
+
200
|
|
553
|
+
],
|
|
554
|
+
"idempotent": false,
|
|
555
|
+
"request": null,
|
|
556
|
+
"answer": null,
|
|
557
|
+
"refusals": [
|
|
558
|
+
{
|
|
559
|
+
"status": 400,
|
|
560
|
+
"description": "Bad range (data.code RANGE_INVALID)"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"status": 401,
|
|
564
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"status": 403,
|
|
568
|
+
"description": "The key lacks the scope this route needs (SCOPE_MISSING, details.needed / details.held), or the request came from outside the key's address allowlist (IP_NOT_ALLOWED)"
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"status": 404,
|
|
572
|
+
"description": "X-ZS-Property names a property this key may not act on (PROPERTY_NOT_FOUND): for a company key, one outside its hotels; for a hotel key, any other property. A company key without the header is 400 PROPERTY_REQUIRED"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"status": 409,
|
|
576
|
+
"description": "The property is deleted or demo (PROPERTY_UNAVAILABLE); on an ARI route its channel manager is off (CHANNEL_MANAGER_DISABLED), or, on a company key, its rates are not the source of truth (ARI_NOT_AUTHORITATIVE); on a booking route it has no PMS (PMS_NOT_AVAILABLE)"
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"status": 429,
|
|
580
|
+
"description": "A budget was exhausted — data.scope names it (ip · ip-auth · requests · writes · property · property-writes · cells · company · global, or one of the long budgets of x-zimmerstack.shield); honour Retry-After and pace on the RateLimit header (x-zimmerstack.rateLimits)"
|
|
581
|
+
}
|
|
582
|
+
]
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
"key": "PUT /availability",
|
|
586
|
+
"summary": "Set absolute availability",
|
|
587
|
+
"description": "Each update sets the ABSOLUTE number of rooms for sale for one room type over a date range. Lands in our record and rides the inventory drain to the channels.",
|
|
588
|
+
"scope": "ari:write",
|
|
589
|
+
"call": "zs.availability.set(updates)",
|
|
590
|
+
"path": [],
|
|
591
|
+
"query": [],
|
|
592
|
+
"body": "AvailabilityWrite",
|
|
593
|
+
"response": "WriteAccepted",
|
|
594
|
+
"answerStatus": [
|
|
595
|
+
202
|
|
596
|
+
],
|
|
597
|
+
"idempotent": true,
|
|
598
|
+
"request": {
|
|
599
|
+
"updates": [
|
|
600
|
+
{
|
|
601
|
+
"roomTypeId": 412,
|
|
602
|
+
"dateFrom": "2026-11-01",
|
|
603
|
+
"dateTo": "2026-11-30",
|
|
604
|
+
"available": 5
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"roomTypeId": 412,
|
|
608
|
+
"dateFrom": "2026-11-14",
|
|
609
|
+
"dateTo": "2026-11-14",
|
|
610
|
+
"available": 2
|
|
611
|
+
}
|
|
612
|
+
]
|
|
613
|
+
},
|
|
614
|
+
"answer": {
|
|
615
|
+
"batchId": "7f1d2c4e-5a6b-4c8d-9e0f-112233445566",
|
|
616
|
+
"resource": "rates",
|
|
617
|
+
"requestedCells": 151,
|
|
618
|
+
"acceptedCells": 43,
|
|
619
|
+
"noopCells": 108,
|
|
620
|
+
"rejected": [],
|
|
621
|
+
"pushedBy": "ari-projector",
|
|
622
|
+
"poll": "/api/v1/connect-api/v1/batches/7f1d2c4e-5a6b-4c8d-9e0f-112233445566"
|
|
623
|
+
},
|
|
624
|
+
"refusals": [
|
|
625
|
+
{
|
|
626
|
+
"status": 400,
|
|
627
|
+
"description": "data.code is one of VALIDATION | RANGE_INVALID | HORIZON | TOO_MANY_UPDATES | TOO_MANY_CELLS | UNKNOWN_ROOM_TYPE"
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
"status": 401,
|
|
631
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
"status": 403,
|
|
635
|
+
"description": "SCOPE_MISSING or IP_NOT_ALLOWED as everywhere; or WRITES_SUSPENDED: ZimmerStack has suspended this integration's writes (x-zimmerstack.shield.standing)"
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"status": 404,
|
|
639
|
+
"description": "X-ZS-Property names a property this key may not act on (PROPERTY_NOT_FOUND): for a company key, one outside its hotels; for a hotel key, any other property. A company key without the header is 400 PROPERTY_REQUIRED"
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
"status": 409,
|
|
643
|
+
"description": "The property is deleted or demo (PROPERTY_UNAVAILABLE); on an ARI route its channel manager is off (CHANNEL_MANAGER_DISABLED), or, on a company key, its rates are not the source of truth (ARI_NOT_AUTHORITATIVE); on a booking route it has no PMS (PMS_NOT_AVAILABLE)"
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
"status": 413,
|
|
647
|
+
"description": "Body larger than 1048576 bytes (x-zimmerstack.limits.maxBodyBytes); nothing was read"
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"status": 422,
|
|
651
|
+
"description": "NOTHING_ACCEPTED: every group was refused by the property's rate policy (data.details.rejected says why). On PUT /rates also RATE_OUT_OF_BAND: a price far outside its plan's standing price, nothing written (x-zimmerstack.shield.priceBand)"
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
"status": 429,
|
|
655
|
+
"description": "A budget was exhausted — data.scope names it: a per-minute budget (x-zimmerstack.rateLimits), or a long one (cells-hour · cells-day · vendor-cells-day), or shield-pause / shield-lane while the integration is paused (x-zimmerstack.shield). Honour Retry-After"
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
"status": 503,
|
|
659
|
+
"description": "ZimmerStack has paused every write to the channel manager (WRITES_FROZEN), or the write could not be checked against its budgets (SHIELD_UNAVAILABLE). Nothing was written; honour Retry-After"
|
|
660
|
+
}
|
|
661
|
+
]
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
"key": "GET /rates",
|
|
665
|
+
"summary": "Rates as our record holds them (minor units)",
|
|
666
|
+
"description": "Served from our record, never from the channel manager.",
|
|
667
|
+
"scope": "ari:read",
|
|
668
|
+
"call": "zs.rates.get({ from, to })",
|
|
669
|
+
"path": [],
|
|
670
|
+
"query": [
|
|
671
|
+
{
|
|
672
|
+
"name": "from",
|
|
673
|
+
"required": false,
|
|
674
|
+
"type": "string",
|
|
675
|
+
"description": "Default: today in the property's timezone"
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
"name": "to",
|
|
679
|
+
"required": false,
|
|
680
|
+
"type": "string",
|
|
681
|
+
"description": "Default: from + 30 days; at most 500 days after from"
|
|
682
|
+
}
|
|
683
|
+
],
|
|
684
|
+
"body": null,
|
|
685
|
+
"response": "RatesRead",
|
|
686
|
+
"answerStatus": [
|
|
687
|
+
200
|
|
688
|
+
],
|
|
689
|
+
"idempotent": false,
|
|
690
|
+
"request": null,
|
|
691
|
+
"answer": null,
|
|
692
|
+
"refusals": [
|
|
693
|
+
{
|
|
694
|
+
"status": 400,
|
|
695
|
+
"description": "Bad range (data.code RANGE_INVALID)"
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
"status": 401,
|
|
699
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"status": 403,
|
|
703
|
+
"description": "The key lacks the scope this route needs (SCOPE_MISSING, details.needed / details.held), or the request came from outside the key's address allowlist (IP_NOT_ALLOWED)"
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
"status": 404,
|
|
707
|
+
"description": "X-ZS-Property names a property this key may not act on (PROPERTY_NOT_FOUND): for a company key, one outside its hotels; for a hotel key, any other property. A company key without the header is 400 PROPERTY_REQUIRED"
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
"status": 409,
|
|
711
|
+
"description": "The property is deleted or demo (PROPERTY_UNAVAILABLE); on an ARI route its channel manager is off (CHANNEL_MANAGER_DISABLED), or, on a company key, its rates are not the source of truth (ARI_NOT_AUTHORITATIVE); on a booking route it has no PMS (PMS_NOT_AVAILABLE)"
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
"status": 429,
|
|
715
|
+
"description": "A budget was exhausted — data.scope names it (ip · ip-auth · requests · writes · property · property-writes · cells · company · global, or one of the long budgets of x-zimmerstack.shield); honour Retry-After and pace on the RateLimit header (x-zimmerstack.rateLimits)"
|
|
716
|
+
}
|
|
717
|
+
]
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
"key": "PUT /rates",
|
|
721
|
+
"summary": "Set nightly sell prices",
|
|
722
|
+
"description": "Each update sets the price of one rate plan over a date range, optionally masked to weekdays (`days`). `currency` must equal the property's. Lands in our record and rides the ARI projector to the channels.",
|
|
723
|
+
"scope": "ari:write",
|
|
724
|
+
"call": "zs.rates.set(updates)",
|
|
725
|
+
"path": [],
|
|
726
|
+
"query": [],
|
|
727
|
+
"body": "RatesWrite",
|
|
728
|
+
"response": "WriteAccepted",
|
|
729
|
+
"answerStatus": [
|
|
730
|
+
202
|
|
731
|
+
],
|
|
732
|
+
"idempotent": true,
|
|
733
|
+
"request": {
|
|
734
|
+
"updates": [
|
|
735
|
+
{
|
|
736
|
+
"ratePlanId": 901,
|
|
737
|
+
"dateFrom": "2026-11-01",
|
|
738
|
+
"dateTo": "2027-03-31",
|
|
739
|
+
"rate": "4500.00",
|
|
740
|
+
"currency": "INR"
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"ratePlanId": 901,
|
|
744
|
+
"dateFrom": "2026-11-01",
|
|
745
|
+
"dateTo": "2027-03-31",
|
|
746
|
+
"days": [
|
|
747
|
+
"fr",
|
|
748
|
+
"sa"
|
|
749
|
+
],
|
|
750
|
+
"rate": 5200,
|
|
751
|
+
"currency": "INR"
|
|
752
|
+
}
|
|
753
|
+
]
|
|
754
|
+
},
|
|
755
|
+
"answer": {
|
|
756
|
+
"batchId": "7f1d2c4e-5a6b-4c8d-9e0f-112233445566",
|
|
757
|
+
"resource": "rates",
|
|
758
|
+
"requestedCells": 151,
|
|
759
|
+
"acceptedCells": 43,
|
|
760
|
+
"noopCells": 108,
|
|
761
|
+
"rejected": [],
|
|
762
|
+
"pushedBy": "ari-projector",
|
|
763
|
+
"poll": "/api/v1/connect-api/v1/batches/7f1d2c4e-5a6b-4c8d-9e0f-112233445566"
|
|
764
|
+
},
|
|
765
|
+
"refusals": [
|
|
766
|
+
{
|
|
767
|
+
"status": 400,
|
|
768
|
+
"description": "data.code is one of VALIDATION | RANGE_INVALID | HORIZON | TOO_MANY_UPDATES | TOO_MANY_CELLS | UNKNOWN_RATE_PLAN | CURRENCY_MISMATCH"
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
"status": 401,
|
|
772
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
"status": 403,
|
|
776
|
+
"description": "SCOPE_MISSING or IP_NOT_ALLOWED as everywhere; or WRITES_SUSPENDED: ZimmerStack has suspended this integration's writes (x-zimmerstack.shield.standing)"
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
"status": 404,
|
|
780
|
+
"description": "X-ZS-Property names a property this key may not act on (PROPERTY_NOT_FOUND): for a company key, one outside its hotels; for a hotel key, any other property. A company key without the header is 400 PROPERTY_REQUIRED"
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
"status": 409,
|
|
784
|
+
"description": "The property is deleted or demo (PROPERTY_UNAVAILABLE); on an ARI route its channel manager is off (CHANNEL_MANAGER_DISABLED), or, on a company key, its rates are not the source of truth (ARI_NOT_AUTHORITATIVE); on a booking route it has no PMS (PMS_NOT_AVAILABLE)"
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
"status": 413,
|
|
788
|
+
"description": "Body larger than 1048576 bytes (x-zimmerstack.limits.maxBodyBytes); nothing was read"
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
"status": 422,
|
|
792
|
+
"description": "NOTHING_ACCEPTED: every group was refused by the property's rate policy (data.details.rejected says why). On PUT /rates also RATE_OUT_OF_BAND: a price far outside its plan's standing price, nothing written (x-zimmerstack.shield.priceBand)"
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
"status": 429,
|
|
796
|
+
"description": "A budget was exhausted — data.scope names it: a per-minute budget (x-zimmerstack.rateLimits), or a long one (cells-hour · cells-day · vendor-cells-day), or shield-pause / shield-lane while the integration is paused (x-zimmerstack.shield). Honour Retry-After"
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
"status": 503,
|
|
800
|
+
"description": "ZimmerStack has paused every write to the channel manager (WRITES_FROZEN), or the write could not be checked against its budgets (SHIELD_UNAVAILABLE). Nothing was written; honour Retry-After"
|
|
801
|
+
}
|
|
802
|
+
]
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
"key": "GET /restrictions",
|
|
806
|
+
"summary": "Restrictions as our record holds them",
|
|
807
|
+
"description": "null = we hold no opinion for that field on that night.",
|
|
808
|
+
"scope": "ari:read",
|
|
809
|
+
"call": "zs.restrictions.get({ from, to })",
|
|
810
|
+
"path": [],
|
|
811
|
+
"query": [
|
|
812
|
+
{
|
|
813
|
+
"name": "from",
|
|
814
|
+
"required": false,
|
|
815
|
+
"type": "string",
|
|
816
|
+
"description": "Default: today in the property's timezone"
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
"name": "to",
|
|
820
|
+
"required": false,
|
|
821
|
+
"type": "string",
|
|
822
|
+
"description": "Default: from + 30 days; at most 500 days after from"
|
|
823
|
+
}
|
|
824
|
+
],
|
|
825
|
+
"body": null,
|
|
826
|
+
"response": "RestrictionsRead",
|
|
827
|
+
"answerStatus": [
|
|
828
|
+
200
|
|
829
|
+
],
|
|
830
|
+
"idempotent": false,
|
|
831
|
+
"request": null,
|
|
832
|
+
"answer": null,
|
|
833
|
+
"refusals": [
|
|
834
|
+
{
|
|
835
|
+
"status": 400,
|
|
836
|
+
"description": "Bad range (data.code RANGE_INVALID)"
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
"status": 401,
|
|
840
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
"status": 403,
|
|
844
|
+
"description": "The key lacks the scope this route needs (SCOPE_MISSING, details.needed / details.held), or the request came from outside the key's address allowlist (IP_NOT_ALLOWED)"
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
"status": 404,
|
|
848
|
+
"description": "X-ZS-Property names a property this key may not act on (PROPERTY_NOT_FOUND): for a company key, one outside its hotels; for a hotel key, any other property. A company key without the header is 400 PROPERTY_REQUIRED"
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
"status": 409,
|
|
852
|
+
"description": "The property is deleted or demo (PROPERTY_UNAVAILABLE); on an ARI route its channel manager is off (CHANNEL_MANAGER_DISABLED), or, on a company key, its rates are not the source of truth (ARI_NOT_AUTHORITATIVE); on a booking route it has no PMS (PMS_NOT_AVAILABLE)"
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
"status": 429,
|
|
856
|
+
"description": "A budget was exhausted — data.scope names it (ip · ip-auth · requests · writes · property · property-writes · cells · company · global, or one of the long budgets of x-zimmerstack.shield); honour Retry-After and pace on the RateLimit header (x-zimmerstack.rateLimits)"
|
|
857
|
+
}
|
|
858
|
+
]
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
"key": "PUT /restrictions",
|
|
862
|
+
"summary": "Set stay restrictions",
|
|
863
|
+
"description": "Each update sets ANY subset of stopSell, closedToArrival, closedToDeparture, minStayArrival, minStayThrough, maxStay for one rate plan over a date range; fields you omit are left as they are.",
|
|
864
|
+
"scope": "ari:write",
|
|
865
|
+
"call": "zs.restrictions.set(updates)",
|
|
866
|
+
"path": [],
|
|
867
|
+
"query": [],
|
|
868
|
+
"body": "RestrictionsWrite",
|
|
869
|
+
"response": "WriteAccepted",
|
|
870
|
+
"answerStatus": [
|
|
871
|
+
202
|
|
872
|
+
],
|
|
873
|
+
"idempotent": true,
|
|
874
|
+
"request": {
|
|
875
|
+
"updates": [
|
|
876
|
+
{
|
|
877
|
+
"ratePlanId": 901,
|
|
878
|
+
"dateFrom": "2026-12-24",
|
|
879
|
+
"dateTo": "2026-12-26",
|
|
880
|
+
"minStayArrival": 2,
|
|
881
|
+
"closedToArrival": false
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
"ratePlanId": 901,
|
|
885
|
+
"dateFrom": "2026-12-31",
|
|
886
|
+
"dateTo": "2026-12-31",
|
|
887
|
+
"stopSell": true
|
|
888
|
+
}
|
|
889
|
+
]
|
|
890
|
+
},
|
|
891
|
+
"answer": {
|
|
892
|
+
"batchId": "7f1d2c4e-5a6b-4c8d-9e0f-112233445566",
|
|
893
|
+
"resource": "rates",
|
|
894
|
+
"requestedCells": 151,
|
|
895
|
+
"acceptedCells": 43,
|
|
896
|
+
"noopCells": 108,
|
|
897
|
+
"rejected": [],
|
|
898
|
+
"pushedBy": "ari-projector",
|
|
899
|
+
"poll": "/api/v1/connect-api/v1/batches/7f1d2c4e-5a6b-4c8d-9e0f-112233445566"
|
|
900
|
+
},
|
|
901
|
+
"refusals": [
|
|
902
|
+
{
|
|
903
|
+
"status": 400,
|
|
904
|
+
"description": "data.code is one of VALIDATION | RANGE_INVALID | HORIZON | TOO_MANY_UPDATES | TOO_MANY_CELLS | UNKNOWN_RATE_PLAN"
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
"status": 401,
|
|
908
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
"status": 403,
|
|
912
|
+
"description": "SCOPE_MISSING or IP_NOT_ALLOWED as everywhere; or WRITES_SUSPENDED: ZimmerStack has suspended this integration's writes (x-zimmerstack.shield.standing)"
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
"status": 404,
|
|
916
|
+
"description": "X-ZS-Property names a property this key may not act on (PROPERTY_NOT_FOUND): for a company key, one outside its hotels; for a hotel key, any other property. A company key without the header is 400 PROPERTY_REQUIRED"
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
"status": 409,
|
|
920
|
+
"description": "The property is deleted or demo (PROPERTY_UNAVAILABLE); on an ARI route its channel manager is off (CHANNEL_MANAGER_DISABLED), or, on a company key, its rates are not the source of truth (ARI_NOT_AUTHORITATIVE); on a booking route it has no PMS (PMS_NOT_AVAILABLE)"
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
"status": 413,
|
|
924
|
+
"description": "Body larger than 1048576 bytes (x-zimmerstack.limits.maxBodyBytes); nothing was read"
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
"status": 422,
|
|
928
|
+
"description": "NOTHING_ACCEPTED: every group was refused by the property's rate policy (data.details.rejected says why). On PUT /rates also RATE_OUT_OF_BAND: a price far outside its plan's standing price, nothing written (x-zimmerstack.shield.priceBand)"
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
"status": 429,
|
|
932
|
+
"description": "A budget was exhausted — data.scope names it: a per-minute budget (x-zimmerstack.rateLimits), or a long one (cells-hour · cells-day · vendor-cells-day), or shield-pause / shield-lane while the integration is paused (x-zimmerstack.shield). Honour Retry-After"
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
"status": 503,
|
|
936
|
+
"description": "ZimmerStack has paused every write to the channel manager (WRITES_FROZEN), or the write could not be checked against its budgets (SHIELD_UNAVAILABLE). Nothing was written; honour Retry-After"
|
|
937
|
+
}
|
|
938
|
+
]
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
"key": "GET /sync",
|
|
942
|
+
"summary": "Has what you sent reached the channels?",
|
|
943
|
+
"description": "Poll this instead of asking the channel manager: inventory pipe state, rate cells still queued, the projector's last outcome and the newest batch still pending.",
|
|
944
|
+
"scope": "ari:read",
|
|
945
|
+
"call": "zs.sync.get()",
|
|
946
|
+
"path": [],
|
|
947
|
+
"query": [],
|
|
948
|
+
"body": null,
|
|
949
|
+
"response": "SyncStatus",
|
|
950
|
+
"answerStatus": [
|
|
951
|
+
200
|
|
952
|
+
],
|
|
953
|
+
"idempotent": false,
|
|
954
|
+
"request": null,
|
|
955
|
+
"answer": null,
|
|
956
|
+
"refusals": [
|
|
957
|
+
{
|
|
958
|
+
"status": 401,
|
|
959
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
"status": 403,
|
|
963
|
+
"description": "The key lacks the scope this route needs (SCOPE_MISSING, details.needed / details.held), or the request came from outside the key's address allowlist (IP_NOT_ALLOWED)"
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
"status": 404,
|
|
967
|
+
"description": "X-ZS-Property names a property this key may not act on (PROPERTY_NOT_FOUND): for a company key, one outside its hotels; for a hotel key, any other property. A company key without the header is 400 PROPERTY_REQUIRED"
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"status": 409,
|
|
971
|
+
"description": "The property is deleted or demo (PROPERTY_UNAVAILABLE); on an ARI route its channel manager is off (CHANNEL_MANAGER_DISABLED), or, on a company key, its rates are not the source of truth (ARI_NOT_AUTHORITATIVE); on a booking route it has no PMS (PMS_NOT_AVAILABLE)"
|
|
972
|
+
},
|
|
973
|
+
{
|
|
974
|
+
"status": 429,
|
|
975
|
+
"description": "A budget was exhausted — data.scope names it (ip · ip-auth · requests · writes · property · property-writes · cells · company · global, or one of the long budgets of x-zimmerstack.shield); honour Retry-After and pace on the RateLimit header (x-zimmerstack.rateLimits)"
|
|
976
|
+
}
|
|
977
|
+
]
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
"key": "GET /bookings",
|
|
981
|
+
"summary": "Bookings the API created on this property, newest first",
|
|
982
|
+
"description": "Scope bookings:read. Only bookings a key of this property created; front-desk and OTA bookings are never listed.",
|
|
983
|
+
"scope": "bookings:read",
|
|
984
|
+
"call": "zs.bookings.list(query)",
|
|
985
|
+
"path": [],
|
|
986
|
+
"query": [
|
|
987
|
+
{
|
|
988
|
+
"name": "since",
|
|
989
|
+
"required": false,
|
|
990
|
+
"type": "string",
|
|
991
|
+
"description": "Created on or after this instant; default the last 7 days"
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
"name": "externalReference",
|
|
995
|
+
"required": false,
|
|
996
|
+
"type": "string",
|
|
997
|
+
"description": "Only the booking with your reservation id"
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
"name": "limit",
|
|
1001
|
+
"required": false,
|
|
1002
|
+
"type": "number",
|
|
1003
|
+
"description": "Default 50"
|
|
1004
|
+
}
|
|
1005
|
+
],
|
|
1006
|
+
"body": null,
|
|
1007
|
+
"response": "BookingsList",
|
|
1008
|
+
"answerStatus": [
|
|
1009
|
+
200
|
|
1010
|
+
],
|
|
1011
|
+
"idempotent": false,
|
|
1012
|
+
"request": null,
|
|
1013
|
+
"answer": null,
|
|
1014
|
+
"refusals": [
|
|
1015
|
+
{
|
|
1016
|
+
"status": 400,
|
|
1017
|
+
"description": "Bad query (data.code VALIDATION)"
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
"status": 401,
|
|
1021
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
1022
|
+
},
|
|
1023
|
+
{
|
|
1024
|
+
"status": 403,
|
|
1025
|
+
"description": "The key lacks the scope this route needs (SCOPE_MISSING, details.needed / details.held), or the request came from outside the key's address allowlist (IP_NOT_ALLOWED)"
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
"status": 404,
|
|
1029
|
+
"description": "X-ZS-Property names a property this key may not act on (PROPERTY_NOT_FOUND): for a company key, one outside its hotels; for a hotel key, any other property. A company key without the header is 400 PROPERTY_REQUIRED"
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
"status": 409,
|
|
1033
|
+
"description": "The property is deleted or demo (PROPERTY_UNAVAILABLE); on an ARI route its channel manager is off (CHANNEL_MANAGER_DISABLED), or, on a company key, its rates are not the source of truth (ARI_NOT_AUTHORITATIVE); on a booking route it has no PMS (PMS_NOT_AVAILABLE)"
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
"status": 429,
|
|
1037
|
+
"description": "A budget was exhausted — data.scope names it (ip · ip-auth · requests · writes · property · property-writes · cells · company · global, or one of the long budgets of x-zimmerstack.shield); honour Retry-After and pace on the RateLimit header (x-zimmerstack.rateLimits)"
|
|
1038
|
+
}
|
|
1039
|
+
]
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
"key": "POST /bookings",
|
|
1043
|
+
"summary": "Create a booking in the PMS from your own booking engine",
|
|
1044
|
+
"description": "Scope bookings:write (+ bookings:payments to record a payment). One entry in `rooms` per room. The stay is checked for availability under the property's inventory lock and written with its inventory event in one transaction; the channels update within seconds. A repeated externalReference answers 200 with the same booking (replay: true) while it is this key's and live; another key's reference, or one of your own cancelled bookings, is 409 EXTERNAL_REFERENCE_REUSED (send a new reference after a cancel). 1–90 nights, arrival from today to today + horizonDays, in the property's timezone.",
|
|
1045
|
+
"scope": "bookings:write",
|
|
1046
|
+
"call": "zs.bookings.create(body)",
|
|
1047
|
+
"path": [],
|
|
1048
|
+
"query": [],
|
|
1049
|
+
"body": "BookingCreate",
|
|
1050
|
+
"response": "Booking",
|
|
1051
|
+
"answerStatus": [
|
|
1052
|
+
200,
|
|
1053
|
+
201
|
|
1054
|
+
],
|
|
1055
|
+
"idempotent": true,
|
|
1056
|
+
"request": {
|
|
1057
|
+
"externalReference": "WEB-2026-000123",
|
|
1058
|
+
"checkIn": "2026-12-20",
|
|
1059
|
+
"checkOut": "2026-12-23",
|
|
1060
|
+
"currency": "INR",
|
|
1061
|
+
"guest": {
|
|
1062
|
+
"name": "Asha Verma",
|
|
1063
|
+
"phone": "+919876543210",
|
|
1064
|
+
"email": "asha@example.com",
|
|
1065
|
+
"notes": "Late arrival, after 22:00"
|
|
1066
|
+
},
|
|
1067
|
+
"rooms": [
|
|
1068
|
+
{
|
|
1069
|
+
"roomTypeId": 412,
|
|
1070
|
+
"ratePlanId": 901,
|
|
1071
|
+
"adults": 2,
|
|
1072
|
+
"children": 1,
|
|
1073
|
+
"nightlyRate": "4500.00"
|
|
1074
|
+
},
|
|
1075
|
+
{
|
|
1076
|
+
"roomTypeId": 412,
|
|
1077
|
+
"ratePlanId": 901,
|
|
1078
|
+
"adults": 2,
|
|
1079
|
+
"nightlyRate": "4500.00"
|
|
1080
|
+
}
|
|
1081
|
+
],
|
|
1082
|
+
"payment": {
|
|
1083
|
+
"amount": "9000.00",
|
|
1084
|
+
"method": "ONLINE",
|
|
1085
|
+
"reference": "pay_QwErTy123"
|
|
1086
|
+
},
|
|
1087
|
+
"notes": "Promo WINTER10 applied on the website"
|
|
1088
|
+
},
|
|
1089
|
+
"answer": {
|
|
1090
|
+
"bookingId": 48213,
|
|
1091
|
+
"reference": "SB-7KQ2MX9D",
|
|
1092
|
+
"externalReference": "WEB-2026-000123",
|
|
1093
|
+
"status": "UPCOMING",
|
|
1094
|
+
"checkIn": "2026-12-20",
|
|
1095
|
+
"checkOut": "2026-12-23",
|
|
1096
|
+
"nights": 3,
|
|
1097
|
+
"currency": "INR",
|
|
1098
|
+
"totalAmount": "27000.00",
|
|
1099
|
+
"totalPaid": "9000.00",
|
|
1100
|
+
"balanceDue": "18000.00",
|
|
1101
|
+
"guest": {
|
|
1102
|
+
"name": "Asha Verma",
|
|
1103
|
+
"phone": "+919876543210",
|
|
1104
|
+
"email": "asha@example.com"
|
|
1105
|
+
},
|
|
1106
|
+
"rooms": [
|
|
1107
|
+
{
|
|
1108
|
+
"bookingRoomId": 90001,
|
|
1109
|
+
"roomTypeId": 412,
|
|
1110
|
+
"ratePlanId": null,
|
|
1111
|
+
"mealPlan": "CP",
|
|
1112
|
+
"adults": 2,
|
|
1113
|
+
"children": 1,
|
|
1114
|
+
"nightlyRate": "4500.00",
|
|
1115
|
+
"status": "UPCOMING"
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
"bookingRoomId": 90002,
|
|
1119
|
+
"roomTypeId": 412,
|
|
1120
|
+
"ratePlanId": null,
|
|
1121
|
+
"mealPlan": "CP",
|
|
1122
|
+
"adults": 2,
|
|
1123
|
+
"children": 0,
|
|
1124
|
+
"nightlyRate": "4500.00",
|
|
1125
|
+
"status": "UPCOMING"
|
|
1126
|
+
}
|
|
1127
|
+
],
|
|
1128
|
+
"inventory": {
|
|
1129
|
+
"eventRecorded": true,
|
|
1130
|
+
"channelManager": true,
|
|
1131
|
+
"pushedBy": "inventory-drain"
|
|
1132
|
+
},
|
|
1133
|
+
"replay": false,
|
|
1134
|
+
"createdAt": "2026-10-20T09:14:03.201Z",
|
|
1135
|
+
"cancelledAt": null
|
|
1136
|
+
},
|
|
1137
|
+
"refusals": [
|
|
1138
|
+
{
|
|
1139
|
+
"status": 400,
|
|
1140
|
+
"description": "data.code is one of VALIDATION | CURRENCY_MISMATCH | STAY_INVALID | UNKNOWN_ROOM_TYPE | UNKNOWN_RATE_PLAN | UNKNOWN_ROOM_TYPE_FOR_PLAN | OCCUPANCY_EXCEEDED | PAYMENT_EXCEEDS_TOTAL"
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
"status": 401,
|
|
1144
|
+
"description": "Missing, malformed, unknown or revoked key"
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
"status": 402,
|
|
1148
|
+
"description": "The property's plan does not carry the PMS"
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
"status": 403,
|
|
1152
|
+
"description": "SCOPE_MISSING (no bookings:write), IP_NOT_ALLOWED, or PAYMENT_NOT_ALLOWED (a payment without bookings:payments)"
|
|
1153
|
+
},
|
|
1154
|
+
{
|
|
1155
|
+
"status": 409,
|
|
1156
|
+
"description": "NO_AVAILABILITY (the night and the count are in details; nothing was written), EXTERNAL_REFERENCE_REUSED (another key's reference on this property, or your own cancelled booking's: send a new reference), PROPERTY_UNAVAILABLE, PMS_NOT_AVAILABLE"
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1159
|
+
"status": 413,
|
|
1160
|
+
"description": "Body larger than 1048576 bytes (x-zimmerstack.limits.maxBodyBytes); nothing was read"
|
|
1161
|
+
},
|
|
1162
|
+
{
|
|
1163
|
+
"status": 429,
|
|
1164
|
+
"description": "data.scope is bookings · property-bookings · property-bookings-day (a rolling day) or one of the request budgets; honour Retry-After"
|
|
1165
|
+
}
|
|
1166
|
+
]
|
|
1167
|
+
},
|
|
1168
|
+
{
|
|
1169
|
+
"key": "GET /bookings/{bookingId}",
|
|
1170
|
+
"summary": "One booking the API created",
|
|
1171
|
+
"description": "",
|
|
1172
|
+
"scope": "bookings:read",
|
|
1173
|
+
"call": "zs.bookings.get(bookingId)",
|
|
1174
|
+
"path": [
|
|
1175
|
+
"bookingId"
|
|
1176
|
+
],
|
|
1177
|
+
"query": [],
|
|
1178
|
+
"body": null,
|
|
1179
|
+
"response": "Booking",
|
|
1180
|
+
"answerStatus": [
|
|
1181
|
+
200
|
|
1182
|
+
],
|
|
1183
|
+
"idempotent": false,
|
|
1184
|
+
"request": null,
|
|
1185
|
+
"answer": {
|
|
1186
|
+
"bookingId": 48213,
|
|
1187
|
+
"reference": "SB-7KQ2MX9D",
|
|
1188
|
+
"externalReference": "WEB-2026-000123",
|
|
1189
|
+
"status": "UPCOMING",
|
|
1190
|
+
"checkIn": "2026-12-20",
|
|
1191
|
+
"checkOut": "2026-12-23",
|
|
1192
|
+
"nights": 3,
|
|
1193
|
+
"currency": "INR",
|
|
1194
|
+
"totalAmount": "27000.00",
|
|
1195
|
+
"totalPaid": "9000.00",
|
|
1196
|
+
"balanceDue": "18000.00",
|
|
1197
|
+
"guest": {
|
|
1198
|
+
"name": "Asha Verma",
|
|
1199
|
+
"phone": "+919876543210",
|
|
1200
|
+
"email": "asha@example.com"
|
|
1201
|
+
},
|
|
1202
|
+
"rooms": [
|
|
1203
|
+
{
|
|
1204
|
+
"bookingRoomId": 90001,
|
|
1205
|
+
"roomTypeId": 412,
|
|
1206
|
+
"ratePlanId": null,
|
|
1207
|
+
"mealPlan": "CP",
|
|
1208
|
+
"adults": 2,
|
|
1209
|
+
"children": 1,
|
|
1210
|
+
"nightlyRate": "4500.00",
|
|
1211
|
+
"status": "UPCOMING"
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
"bookingRoomId": 90002,
|
|
1215
|
+
"roomTypeId": 412,
|
|
1216
|
+
"ratePlanId": null,
|
|
1217
|
+
"mealPlan": "CP",
|
|
1218
|
+
"adults": 2,
|
|
1219
|
+
"children": 0,
|
|
1220
|
+
"nightlyRate": "4500.00",
|
|
1221
|
+
"status": "UPCOMING"
|
|
1222
|
+
}
|
|
1223
|
+
],
|
|
1224
|
+
"inventory": {
|
|
1225
|
+
"eventRecorded": true,
|
|
1226
|
+
"channelManager": true,
|
|
1227
|
+
"pushedBy": "inventory-drain"
|
|
1228
|
+
},
|
|
1229
|
+
"replay": false,
|
|
1230
|
+
"createdAt": "2026-10-20T09:14:03.201Z",
|
|
1231
|
+
"cancelledAt": null
|
|
1232
|
+
},
|
|
1233
|
+
"refusals": [
|
|
1234
|
+
{
|
|
1235
|
+
"status": 401,
|
|
1236
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
"status": 403,
|
|
1240
|
+
"description": "The key lacks the scope this route needs (SCOPE_MISSING, details.needed / details.held), or the request came from outside the key's address allowlist (IP_NOT_ALLOWED)"
|
|
1241
|
+
},
|
|
1242
|
+
{
|
|
1243
|
+
"status": 404,
|
|
1244
|
+
"description": "No such booking on this property, or not one this key (or the key it was rotated from) created"
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
"status": 409,
|
|
1248
|
+
"description": "The property is deleted or demo (PROPERTY_UNAVAILABLE); on an ARI route its channel manager is off (CHANNEL_MANAGER_DISABLED), or, on a company key, its rates are not the source of truth (ARI_NOT_AUTHORITATIVE); on a booking route it has no PMS (PMS_NOT_AVAILABLE)"
|
|
1249
|
+
},
|
|
1250
|
+
{
|
|
1251
|
+
"status": 429,
|
|
1252
|
+
"description": "A budget was exhausted — data.scope names it (ip · ip-auth · requests · writes · property · property-writes · cells · company · global, or one of the long budgets of x-zimmerstack.shield); honour Retry-After and pace on the RateLimit header (x-zimmerstack.rateLimits)"
|
|
1253
|
+
}
|
|
1254
|
+
]
|
|
1255
|
+
},
|
|
1256
|
+
{
|
|
1257
|
+
"key": "POST /bookings/{bookingId}/cancel",
|
|
1258
|
+
"summary": "Cancel a booking the API created; its nights re-open on the channels",
|
|
1259
|
+
"description": "Scope bookings:write. Idempotent: an already-cancelled booking answers 200 with replay: true. A booking the desk has checked in is 409 BOOKING_NOT_CANCELLABLE.",
|
|
1260
|
+
"scope": "bookings:write",
|
|
1261
|
+
"call": "zs.bookings.cancel(bookingId, body)",
|
|
1262
|
+
"path": [
|
|
1263
|
+
"bookingId"
|
|
1264
|
+
],
|
|
1265
|
+
"query": [],
|
|
1266
|
+
"body": "BookingCancel",
|
|
1267
|
+
"response": "Booking",
|
|
1268
|
+
"answerStatus": [
|
|
1269
|
+
200
|
|
1270
|
+
],
|
|
1271
|
+
"idempotent": false,
|
|
1272
|
+
"request": {
|
|
1273
|
+
"reason": "Guest cancelled on the website"
|
|
1274
|
+
},
|
|
1275
|
+
"answer": null,
|
|
1276
|
+
"refusals": [
|
|
1277
|
+
{
|
|
1278
|
+
"status": 401,
|
|
1279
|
+
"description": "Missing, malformed, unknown or revoked key"
|
|
1280
|
+
},
|
|
1281
|
+
{
|
|
1282
|
+
"status": 403,
|
|
1283
|
+
"description": "The key lacks bookings:write, or the address is outside the allowlist"
|
|
1284
|
+
},
|
|
1285
|
+
{
|
|
1286
|
+
"status": 404,
|
|
1287
|
+
"description": "No such booking on this property, or not one this key (or the key it was rotated from) created"
|
|
1288
|
+
},
|
|
1289
|
+
{
|
|
1290
|
+
"status": 409,
|
|
1291
|
+
"description": "Checked in or otherwise not cancellable from the API; PROPERTY_UNAVAILABLE; PMS_NOT_AVAILABLE"
|
|
1292
|
+
},
|
|
1293
|
+
{
|
|
1294
|
+
"status": 429,
|
|
1295
|
+
"description": "A request budget was exhausted; honour Retry-After"
|
|
1296
|
+
}
|
|
1297
|
+
]
|
|
1298
|
+
},
|
|
1299
|
+
{
|
|
1300
|
+
"key": "GET /channels",
|
|
1301
|
+
"summary": "The connected channels and their open issues, from our record",
|
|
1302
|
+
"description": "Scope ari:read. No channel-manager call: asOf is when the list was captured (the nightly settings sweep); open issues are live. Each channel carries its price modifier (x-zimmerstack.modifiers); a modifier set through this API shows at once.",
|
|
1303
|
+
"scope": "ari:read",
|
|
1304
|
+
"call": "zs.channels.list()",
|
|
1305
|
+
"path": [],
|
|
1306
|
+
"query": [],
|
|
1307
|
+
"body": null,
|
|
1308
|
+
"response": "Channels",
|
|
1309
|
+
"answerStatus": [
|
|
1310
|
+
200
|
|
1311
|
+
],
|
|
1312
|
+
"idempotent": false,
|
|
1313
|
+
"request": null,
|
|
1314
|
+
"answer": {
|
|
1315
|
+
"asOf": "2026-10-30T20:15:04.000Z",
|
|
1316
|
+
"channels": [
|
|
1317
|
+
{
|
|
1318
|
+
"channelId": "7c1d8a3e-5f2b-4d6a-9e0c-1b2a3c4d5e6f",
|
|
1319
|
+
"kind": "BookingCom",
|
|
1320
|
+
"title": "Booking.com — The Lantern House",
|
|
1321
|
+
"seenAt": "2026-10-30T20:15:04.000Z",
|
|
1322
|
+
"openIssues": [],
|
|
1323
|
+
"modifier": [
|
|
1324
|
+
{
|
|
1325
|
+
"action": "increase",
|
|
1326
|
+
"type": "percent",
|
|
1327
|
+
"value": 18
|
|
1328
|
+
}
|
|
1329
|
+
],
|
|
1330
|
+
"markupPlan": null
|
|
1331
|
+
},
|
|
1332
|
+
{
|
|
1333
|
+
"channelId": "0a9b8c7d-6e5f-4a3b-2c1d-0e9f8a7b6c5d",
|
|
1334
|
+
"kind": "Expedia",
|
|
1335
|
+
"title": "Expedia — The Lantern House",
|
|
1336
|
+
"seenAt": "2026-10-30T20:15:04.000Z",
|
|
1337
|
+
"openIssues": [
|
|
1338
|
+
{
|
|
1339
|
+
"event": "rate_error",
|
|
1340
|
+
"raisedAt": "2026-10-30T09:40:11.000Z"
|
|
1341
|
+
}
|
|
1342
|
+
],
|
|
1343
|
+
"modifier": [],
|
|
1344
|
+
"markupPlan": null
|
|
1345
|
+
}
|
|
1346
|
+
],
|
|
1347
|
+
"propertyIssues": []
|
|
1348
|
+
},
|
|
1349
|
+
"refusals": [
|
|
1350
|
+
{
|
|
1351
|
+
"status": 401,
|
|
1352
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
1353
|
+
},
|
|
1354
|
+
{
|
|
1355
|
+
"status": 403,
|
|
1356
|
+
"description": "The key lacks the scope this route needs (SCOPE_MISSING, details.needed / details.held), or the request came from outside the key's address allowlist (IP_NOT_ALLOWED)"
|
|
1357
|
+
},
|
|
1358
|
+
{
|
|
1359
|
+
"status": 404,
|
|
1360
|
+
"description": "X-ZS-Property names a property this key may not act on (PROPERTY_NOT_FOUND): for a company key, one outside its hotels; for a hotel key, any other property. A company key without the header is 400 PROPERTY_REQUIRED"
|
|
1361
|
+
},
|
|
1362
|
+
{
|
|
1363
|
+
"status": 409,
|
|
1364
|
+
"description": "The property is deleted or demo (PROPERTY_UNAVAILABLE); on an ARI route its channel manager is off (CHANNEL_MANAGER_DISABLED), or, on a company key, its rates are not the source of truth (ARI_NOT_AUTHORITATIVE); on a booking route it has no PMS (PMS_NOT_AVAILABLE)"
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
"status": 429,
|
|
1368
|
+
"description": "A budget was exhausted — data.scope names it (ip · ip-auth · requests · writes · property · property-writes · cells · company · global, or one of the long budgets of x-zimmerstack.shield); honour Retry-After and pace on the RateLimit header (x-zimmerstack.rateLimits)"
|
|
1369
|
+
}
|
|
1370
|
+
]
|
|
1371
|
+
},
|
|
1372
|
+
{
|
|
1373
|
+
"key": "PUT /channels/{channelId}/modifier",
|
|
1374
|
+
"summary": "Set one channel's price modifier",
|
|
1375
|
+
"description": "Scope channel-modifiers:write. Replaces the channel's steps with the list sent ([] removes them). Applied to the channel manager while the request runs, read back, then answered: 200 means the channel holds them. Takes effect on prices sent to the channel after the change; prices already there stay until sent again (POST /rates/resend). Steps the channel already holds answer changed: false and cost nothing.",
|
|
1376
|
+
"scope": "channel-modifiers:write",
|
|
1377
|
+
"call": "zs.channels.setModifier(channelId, steps)",
|
|
1378
|
+
"path": [
|
|
1379
|
+
"channelId"
|
|
1380
|
+
],
|
|
1381
|
+
"query": [],
|
|
1382
|
+
"body": "ModifierWrite",
|
|
1383
|
+
"response": "ModifierResult",
|
|
1384
|
+
"answerStatus": [
|
|
1385
|
+
200
|
|
1386
|
+
],
|
|
1387
|
+
"idempotent": true,
|
|
1388
|
+
"request": {
|
|
1389
|
+
"steps": [
|
|
1390
|
+
{
|
|
1391
|
+
"action": "increase",
|
|
1392
|
+
"type": "percent",
|
|
1393
|
+
"value": 18
|
|
1394
|
+
},
|
|
1395
|
+
{
|
|
1396
|
+
"action": "decrease",
|
|
1397
|
+
"type": "fixed",
|
|
1398
|
+
"value": 200
|
|
1399
|
+
}
|
|
1400
|
+
]
|
|
1401
|
+
},
|
|
1402
|
+
"answer": {
|
|
1403
|
+
"channelId": "7c1d8a3e-5f2b-4d6a-9e0c-1b2a3c4d5e6f",
|
|
1404
|
+
"kind": "BookingCom",
|
|
1405
|
+
"title": "Booking.com — The Lantern House",
|
|
1406
|
+
"modifier": [
|
|
1407
|
+
{
|
|
1408
|
+
"action": "increase",
|
|
1409
|
+
"type": "percent",
|
|
1410
|
+
"value": 18
|
|
1411
|
+
},
|
|
1412
|
+
{
|
|
1413
|
+
"action": "decrease",
|
|
1414
|
+
"type": "fixed",
|
|
1415
|
+
"value": 200
|
|
1416
|
+
}
|
|
1417
|
+
],
|
|
1418
|
+
"changed": true,
|
|
1419
|
+
"notice": "A modifier applies to prices sent to the channel after the change. Prices already on the channel stay as they are until those nights are sent again."
|
|
1420
|
+
},
|
|
1421
|
+
"refusals": [
|
|
1422
|
+
{
|
|
1423
|
+
"status": 400,
|
|
1424
|
+
"description": "Body shape (data.code VALIDATION): at most five steps, each increase or decrease, percent or fixed, a positive value"
|
|
1425
|
+
},
|
|
1426
|
+
{
|
|
1427
|
+
"status": 401,
|
|
1428
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
1429
|
+
},
|
|
1430
|
+
{
|
|
1431
|
+
"status": 403,
|
|
1432
|
+
"description": "SCOPE_MISSING (the key lacks channel-modifiers:write) or IP_NOT_ALLOWED; or WRITES_SUSPENDED: ZimmerStack has suspended this integration's writes"
|
|
1433
|
+
},
|
|
1434
|
+
{
|
|
1435
|
+
"status": 404,
|
|
1436
|
+
"description": "No connected channel with this id on this property (CHANNEL_NOT_FOUND); or PROPERTY_NOT_FOUND as everywhere"
|
|
1437
|
+
},
|
|
1438
|
+
{
|
|
1439
|
+
"status": 409,
|
|
1440
|
+
"description": "The connection serves more than one property (CHANNEL_SHARED); or CHANNEL_MANAGER_DISABLED / PROPERTY_UNAVAILABLE as everywhere"
|
|
1441
|
+
},
|
|
1442
|
+
{
|
|
1443
|
+
"status": 422,
|
|
1444
|
+
"description": "The steps together would move prices outside the band (x-zimmerstack.modifiers.band); nothing changed"
|
|
1445
|
+
},
|
|
1446
|
+
{
|
|
1447
|
+
"status": 429,
|
|
1448
|
+
"description": "A budget was exhausted — data.scope names it: a per-minute budget, modifier-changes-day (the day's changes for this property), modifier-busy (another change to this channel is running), or shield-pause while the integration is paused. Honour Retry-After"
|
|
1449
|
+
},
|
|
1450
|
+
{
|
|
1451
|
+
"status": 502,
|
|
1452
|
+
"description": "The channel manager did not take the modifier; nothing changed"
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
"status": 503,
|
|
1456
|
+
"description": "ZimmerStack has paused every write to the channel manager (WRITES_FROZEN), or the write could not be checked against its budgets (SHIELD_UNAVAILABLE). Nothing was written; honour Retry-After"
|
|
1457
|
+
}
|
|
1458
|
+
]
|
|
1459
|
+
},
|
|
1460
|
+
{
|
|
1461
|
+
"key": "POST /rates/resend",
|
|
1462
|
+
"summary": "Send the property's prices to the channels again",
|
|
1463
|
+
"description": "Scope ari:write. Marks every rate-plan night of the writable horizon to be sent again, unchanged, so each channel's current modifier applies to it. The nights travel like any write: paced, coalesced, never lost. Use it after changing a modifier; it is limited per property per day (data.scope rate-resends-day). No body.",
|
|
1464
|
+
"scope": "ari:write",
|
|
1465
|
+
"call": "zs.rates.resend()",
|
|
1466
|
+
"path": [],
|
|
1467
|
+
"query": [],
|
|
1468
|
+
"body": null,
|
|
1469
|
+
"response": "RatesResendAccepted",
|
|
1470
|
+
"answerStatus": [
|
|
1471
|
+
202
|
|
1472
|
+
],
|
|
1473
|
+
"idempotent": true,
|
|
1474
|
+
"request": null,
|
|
1475
|
+
"answer": {
|
|
1476
|
+
"from": "2026-11-12",
|
|
1477
|
+
"to": "2027-11-12",
|
|
1478
|
+
"cells": 1098,
|
|
1479
|
+
"parkedLeft": 0,
|
|
1480
|
+
"watch": "/api/v1/connect-api/v1/sync",
|
|
1481
|
+
"notice": "The prices and stay rules of these nights are on their way to the channels again, unchanged, at the usual pace. A full calendar takes minutes."
|
|
1482
|
+
},
|
|
1483
|
+
"refusals": [
|
|
1484
|
+
{
|
|
1485
|
+
"status": 401,
|
|
1486
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
1487
|
+
},
|
|
1488
|
+
{
|
|
1489
|
+
"status": 403,
|
|
1490
|
+
"description": "SCOPE_MISSING or IP_NOT_ALLOWED as everywhere; or WRITES_SUSPENDED: ZimmerStack has suspended this integration's writes"
|
|
1491
|
+
},
|
|
1492
|
+
{
|
|
1493
|
+
"status": 404,
|
|
1494
|
+
"description": "X-ZS-Property names a property this key may not act on (PROPERTY_NOT_FOUND): for a company key, one outside its hotels; for a hotel key, any other property. A company key without the header is 400 PROPERTY_REQUIRED"
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
"status": 409,
|
|
1498
|
+
"description": "The property is deleted or demo (PROPERTY_UNAVAILABLE); on an ARI route its channel manager is off (CHANNEL_MANAGER_DISABLED), or, on a company key, its rates are not the source of truth (ARI_NOT_AUTHORITATIVE); on a booking route it has no PMS (PMS_NOT_AVAILABLE)"
|
|
1499
|
+
},
|
|
1500
|
+
{
|
|
1501
|
+
"status": 429,
|
|
1502
|
+
"description": "A budget was exhausted — data.scope names it (ip · ip-auth · requests · writes · property · property-writes · cells · company · global, or one of the long budgets of x-zimmerstack.shield); honour Retry-After and pace on the RateLimit header (x-zimmerstack.rateLimits)"
|
|
1503
|
+
},
|
|
1504
|
+
{
|
|
1505
|
+
"status": 503,
|
|
1506
|
+
"description": "ZimmerStack has paused every write to the channel manager (WRITES_FROZEN), or the write could not be checked against its budgets (SHIELD_UNAVAILABLE). Nothing was written; honour Retry-After"
|
|
1507
|
+
}
|
|
1508
|
+
]
|
|
1509
|
+
},
|
|
1510
|
+
{
|
|
1511
|
+
"key": "GET /channel-bookings",
|
|
1512
|
+
"summary": "The OTA bookings the channel manager delivered, in the webhook's shape",
|
|
1513
|
+
"description": "Scope channel-bookings:read. Oldest change first; since (default the last 7 days) is on the booking's last change so cancellations and modifications are listed again; while more is true, ask again with cursor = nextCursor, which resumes exactly after the last item even when many bookings changed in the same instant.",
|
|
1514
|
+
"scope": "channel-bookings:read",
|
|
1515
|
+
"call": "zs.channelBookings.list(query)",
|
|
1516
|
+
"path": [],
|
|
1517
|
+
"query": [
|
|
1518
|
+
{
|
|
1519
|
+
"name": "since",
|
|
1520
|
+
"required": false,
|
|
1521
|
+
"type": "string",
|
|
1522
|
+
"description": "Changed on or after this instant (ISO 8601); default: the last 7 days"
|
|
1523
|
+
},
|
|
1524
|
+
{
|
|
1525
|
+
"name": "status",
|
|
1526
|
+
"required": false,
|
|
1527
|
+
"type": "\"CONFIRMED\" | \"CANCELLED\"",
|
|
1528
|
+
"description": "Only confirmed or only cancelled; default both"
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
"name": "limit",
|
|
1532
|
+
"required": false,
|
|
1533
|
+
"type": "number",
|
|
1534
|
+
"description": "Default 50"
|
|
1535
|
+
},
|
|
1536
|
+
{
|
|
1537
|
+
"name": "cursor",
|
|
1538
|
+
"required": false,
|
|
1539
|
+
"type": "string",
|
|
1540
|
+
"description": "The previous page's nextCursor; takes precedence over since. One this API did not issue is 400 VALIDATION"
|
|
1541
|
+
}
|
|
1542
|
+
],
|
|
1543
|
+
"body": null,
|
|
1544
|
+
"response": "ChannelBookingsList",
|
|
1545
|
+
"answerStatus": [
|
|
1546
|
+
200
|
|
1547
|
+
],
|
|
1548
|
+
"idempotent": false,
|
|
1549
|
+
"request": null,
|
|
1550
|
+
"answer": {
|
|
1551
|
+
"since": "2026-10-23T12:00:00.000Z",
|
|
1552
|
+
"items": [
|
|
1553
|
+
{
|
|
1554
|
+
"id": 100001,
|
|
1555
|
+
"reference": "TEST-ZS-8K3Q2M",
|
|
1556
|
+
"status": "CONFIRMED",
|
|
1557
|
+
"stayStatus": "UPCOMING",
|
|
1558
|
+
"channel": {
|
|
1559
|
+
"otaName": "MakeMyTrip",
|
|
1560
|
+
"otaReservationCode": "TEST-ZS-8K3Q2M",
|
|
1561
|
+
"source": "CHANNEL_MANAGER",
|
|
1562
|
+
"sourceGroup": "INDIRECT"
|
|
1563
|
+
},
|
|
1564
|
+
"stay": {
|
|
1565
|
+
"checkIn": "2026-11-13",
|
|
1566
|
+
"checkOut": "2026-11-15",
|
|
1567
|
+
"nights": 2,
|
|
1568
|
+
"dayUse": false
|
|
1569
|
+
},
|
|
1570
|
+
"guest": {
|
|
1571
|
+
"fullName": "Asha Verma",
|
|
1572
|
+
"firstName": "Asha",
|
|
1573
|
+
"lastName": "Verma",
|
|
1574
|
+
"phone": "+919876500000",
|
|
1575
|
+
"email": "asha.verma@example.com",
|
|
1576
|
+
"country": "IN",
|
|
1577
|
+
"language": "en"
|
|
1578
|
+
},
|
|
1579
|
+
"guestNotes": "Late arrival around 22:00. Non-smoking room please. (test event)",
|
|
1580
|
+
"occupancy": {
|
|
1581
|
+
"adults": 2,
|
|
1582
|
+
"children": 0
|
|
1583
|
+
},
|
|
1584
|
+
"rooms": [
|
|
1585
|
+
{
|
|
1586
|
+
"roomTypeId": 412,
|
|
1587
|
+
"ratePlanId": 901,
|
|
1588
|
+
"roomTypeName": "Deluxe Sea View",
|
|
1589
|
+
"mealPlan": "CP",
|
|
1590
|
+
"adults": 2,
|
|
1591
|
+
"children": 0,
|
|
1592
|
+
"checkIn": "2026-11-13",
|
|
1593
|
+
"checkOut": "2026-11-15",
|
|
1594
|
+
"nights": 2,
|
|
1595
|
+
"dayUse": false,
|
|
1596
|
+
"ratePerNight": 2700,
|
|
1597
|
+
"amount": 5400,
|
|
1598
|
+
"status": "UPCOMING"
|
|
1599
|
+
}
|
|
1600
|
+
],
|
|
1601
|
+
"amounts": {
|
|
1602
|
+
"currency": "INR",
|
|
1603
|
+
"total": 5400,
|
|
1604
|
+
"paid": 0,
|
|
1605
|
+
"balanceDue": 5400,
|
|
1606
|
+
"paymentCollect": "property"
|
|
1607
|
+
},
|
|
1608
|
+
"finance": {
|
|
1609
|
+
"otaName": "MakeMyTrip",
|
|
1610
|
+
"amountBasis": "GROSS_TOTAL",
|
|
1611
|
+
"currency": "INR",
|
|
1612
|
+
"grossAmount": 5400,
|
|
1613
|
+
"commissionAmount": 1350,
|
|
1614
|
+
"taxAmount": 648,
|
|
1615
|
+
"netPayoutAmount": 4050
|
|
1616
|
+
},
|
|
1617
|
+
"cancellation": null,
|
|
1618
|
+
"createdAt": "2026-10-30T12:00:00.000Z",
|
|
1619
|
+
"updatedAt": "2026-10-30T12:00:00.000Z"
|
|
1620
|
+
}
|
|
1621
|
+
],
|
|
1622
|
+
"more": false,
|
|
1623
|
+
"nextCursor": null
|
|
1624
|
+
},
|
|
1625
|
+
"refusals": [
|
|
1626
|
+
{
|
|
1627
|
+
"status": 401,
|
|
1628
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
1629
|
+
},
|
|
1630
|
+
{
|
|
1631
|
+
"status": 403,
|
|
1632
|
+
"description": "The key lacks the scope this route needs (SCOPE_MISSING, details.needed / details.held), or the request came from outside the key's address allowlist (IP_NOT_ALLOWED)"
|
|
1633
|
+
},
|
|
1634
|
+
{
|
|
1635
|
+
"status": 404,
|
|
1636
|
+
"description": "X-ZS-Property names a property this key may not act on (PROPERTY_NOT_FOUND): for a company key, one outside its hotels; for a hotel key, any other property. A company key without the header is 400 PROPERTY_REQUIRED"
|
|
1637
|
+
},
|
|
1638
|
+
{
|
|
1639
|
+
"status": 409,
|
|
1640
|
+
"description": "The property is deleted or demo (PROPERTY_UNAVAILABLE); on an ARI route its channel manager is off (CHANNEL_MANAGER_DISABLED), or, on a company key, its rates are not the source of truth (ARI_NOT_AUTHORITATIVE); on a booking route it has no PMS (PMS_NOT_AVAILABLE)"
|
|
1641
|
+
},
|
|
1642
|
+
{
|
|
1643
|
+
"status": 429,
|
|
1644
|
+
"description": "A budget was exhausted — data.scope names it (ip · ip-auth · requests · writes · property · property-writes · cells · company · global, or one of the long budgets of x-zimmerstack.shield); honour Retry-After and pace on the RateLimit header (x-zimmerstack.rateLimits)"
|
|
1645
|
+
}
|
|
1646
|
+
]
|
|
1647
|
+
},
|
|
1648
|
+
{
|
|
1649
|
+
"key": "GET /channel-bookings/{bookingId}",
|
|
1650
|
+
"summary": "One channel booking, the webhook's shape",
|
|
1651
|
+
"description": "Scope channel-bookings:read. 404 for a booking that is not this property's or not a channel booking.",
|
|
1652
|
+
"scope": "channel-bookings:read",
|
|
1653
|
+
"call": "zs.channelBookings.get(bookingId)",
|
|
1654
|
+
"path": [
|
|
1655
|
+
"bookingId"
|
|
1656
|
+
],
|
|
1657
|
+
"query": [],
|
|
1658
|
+
"body": null,
|
|
1659
|
+
"response": "ChannelBooking",
|
|
1660
|
+
"answerStatus": [
|
|
1661
|
+
200
|
|
1662
|
+
],
|
|
1663
|
+
"idempotent": false,
|
|
1664
|
+
"request": null,
|
|
1665
|
+
"answer": {
|
|
1666
|
+
"id": 100001,
|
|
1667
|
+
"reference": "TEST-ZS-8K3Q2M",
|
|
1668
|
+
"status": "CONFIRMED",
|
|
1669
|
+
"stayStatus": "UPCOMING",
|
|
1670
|
+
"channel": {
|
|
1671
|
+
"otaName": "MakeMyTrip",
|
|
1672
|
+
"otaReservationCode": "TEST-ZS-8K3Q2M",
|
|
1673
|
+
"source": "CHANNEL_MANAGER",
|
|
1674
|
+
"sourceGroup": "INDIRECT"
|
|
1675
|
+
},
|
|
1676
|
+
"stay": {
|
|
1677
|
+
"checkIn": "2026-11-13",
|
|
1678
|
+
"checkOut": "2026-11-15",
|
|
1679
|
+
"nights": 2,
|
|
1680
|
+
"dayUse": false
|
|
1681
|
+
},
|
|
1682
|
+
"guest": {
|
|
1683
|
+
"fullName": "Asha Verma",
|
|
1684
|
+
"firstName": "Asha",
|
|
1685
|
+
"lastName": "Verma",
|
|
1686
|
+
"phone": "+919876500000",
|
|
1687
|
+
"email": "asha.verma@example.com",
|
|
1688
|
+
"country": "IN",
|
|
1689
|
+
"language": "en"
|
|
1690
|
+
},
|
|
1691
|
+
"guestNotes": "Late arrival around 22:00. Non-smoking room please. (test event)",
|
|
1692
|
+
"occupancy": {
|
|
1693
|
+
"adults": 2,
|
|
1694
|
+
"children": 0
|
|
1695
|
+
},
|
|
1696
|
+
"rooms": [
|
|
1697
|
+
{
|
|
1698
|
+
"roomTypeId": 412,
|
|
1699
|
+
"ratePlanId": 901,
|
|
1700
|
+
"roomTypeName": "Deluxe Sea View",
|
|
1701
|
+
"mealPlan": "CP",
|
|
1702
|
+
"adults": 2,
|
|
1703
|
+
"children": 0,
|
|
1704
|
+
"checkIn": "2026-11-13",
|
|
1705
|
+
"checkOut": "2026-11-15",
|
|
1706
|
+
"nights": 2,
|
|
1707
|
+
"dayUse": false,
|
|
1708
|
+
"ratePerNight": 2700,
|
|
1709
|
+
"amount": 5400,
|
|
1710
|
+
"status": "UPCOMING"
|
|
1711
|
+
}
|
|
1712
|
+
],
|
|
1713
|
+
"amounts": {
|
|
1714
|
+
"currency": "INR",
|
|
1715
|
+
"total": 5400,
|
|
1716
|
+
"paid": 0,
|
|
1717
|
+
"balanceDue": 5400,
|
|
1718
|
+
"paymentCollect": "property"
|
|
1719
|
+
},
|
|
1720
|
+
"finance": {
|
|
1721
|
+
"otaName": "MakeMyTrip",
|
|
1722
|
+
"amountBasis": "GROSS_TOTAL",
|
|
1723
|
+
"currency": "INR",
|
|
1724
|
+
"grossAmount": 5400,
|
|
1725
|
+
"commissionAmount": 1350,
|
|
1726
|
+
"taxAmount": 648,
|
|
1727
|
+
"netPayoutAmount": 4050
|
|
1728
|
+
},
|
|
1729
|
+
"cancellation": null,
|
|
1730
|
+
"createdAt": "2026-10-30T12:00:00.000Z",
|
|
1731
|
+
"updatedAt": "2026-10-30T12:00:00.000Z"
|
|
1732
|
+
},
|
|
1733
|
+
"refusals": [
|
|
1734
|
+
{
|
|
1735
|
+
"status": 401,
|
|
1736
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
1737
|
+
},
|
|
1738
|
+
{
|
|
1739
|
+
"status": 403,
|
|
1740
|
+
"description": "The key lacks the scope this route needs (SCOPE_MISSING, details.needed / details.held), or the request came from outside the key's address allowlist (IP_NOT_ALLOWED)"
|
|
1741
|
+
},
|
|
1742
|
+
{
|
|
1743
|
+
"status": 404,
|
|
1744
|
+
"description": "No channel booking with this id on this property; on a company key, PROPERTY_NOT_FOUND when X-ZS-Property names a property it may not act on"
|
|
1745
|
+
},
|
|
1746
|
+
{
|
|
1747
|
+
"status": 409,
|
|
1748
|
+
"description": "The property is deleted or demo (PROPERTY_UNAVAILABLE); on an ARI route its channel manager is off (CHANNEL_MANAGER_DISABLED), or, on a company key, its rates are not the source of truth (ARI_NOT_AUTHORITATIVE); on a booking route it has no PMS (PMS_NOT_AVAILABLE)"
|
|
1749
|
+
},
|
|
1750
|
+
{
|
|
1751
|
+
"status": 429,
|
|
1752
|
+
"description": "A budget was exhausted — data.scope names it (ip · ip-auth · requests · writes · property · property-writes · cells · company · global, or one of the long budgets of x-zimmerstack.shield); honour Retry-After and pace on the RateLimit header (x-zimmerstack.rateLimits)"
|
|
1753
|
+
}
|
|
1754
|
+
]
|
|
1755
|
+
},
|
|
1756
|
+
{
|
|
1757
|
+
"key": "GET /sandbox/bookings",
|
|
1758
|
+
"summary": "Simulated OTA bookings on the sandbox, newest first",
|
|
1759
|
+
"description": "Scope ari:read, test keys only (403 SANDBOX_ONLY on a live key).",
|
|
1760
|
+
"scope": "ari:read",
|
|
1761
|
+
"call": "zs.sandbox.bookings.list()",
|
|
1762
|
+
"path": [],
|
|
1763
|
+
"query": [],
|
|
1764
|
+
"body": null,
|
|
1765
|
+
"response": "SandboxBookingsList",
|
|
1766
|
+
"answerStatus": [
|
|
1767
|
+
200
|
|
1768
|
+
],
|
|
1769
|
+
"idempotent": false,
|
|
1770
|
+
"request": null,
|
|
1771
|
+
"answer": {
|
|
1772
|
+
"bookings": [
|
|
1773
|
+
{
|
|
1774
|
+
"bookingId": 90311,
|
|
1775
|
+
"reference": "SBX-9001-MH3K2Q7A",
|
|
1776
|
+
"channelBookingId": "sbx-1f6d0c2e-7b53-4a0e-9c5a-2d8f3b1e4c70",
|
|
1777
|
+
"otaName": "Booking.com",
|
|
1778
|
+
"status": "UPCOMING",
|
|
1779
|
+
"guestName": "Asha Verma",
|
|
1780
|
+
"checkIn": "2026-12-05",
|
|
1781
|
+
"checkOut": "2026-12-07",
|
|
1782
|
+
"nights": 2,
|
|
1783
|
+
"rooms": 1,
|
|
1784
|
+
"roomTypeId": 412,
|
|
1785
|
+
"nightlyRate": 4500,
|
|
1786
|
+
"total": 9000,
|
|
1787
|
+
"currency": "INR",
|
|
1788
|
+
"paidByOta": false,
|
|
1789
|
+
"oversold": false,
|
|
1790
|
+
"createdAt": "2026-10-30T12:00:00.000Z",
|
|
1791
|
+
"webhook": {
|
|
1792
|
+
"eventType": "channel.booking.created",
|
|
1793
|
+
"queued": true
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
]
|
|
1797
|
+
},
|
|
1798
|
+
"refusals": [
|
|
1799
|
+
{
|
|
1800
|
+
"status": 401,
|
|
1801
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
"status": 403,
|
|
1805
|
+
"description": "The key lacks the scope this route needs (SCOPE_MISSING, details.needed / details.held), or the request came from outside the key's address allowlist (IP_NOT_ALLOWED)"
|
|
1806
|
+
},
|
|
1807
|
+
{
|
|
1808
|
+
"status": 404,
|
|
1809
|
+
"description": "X-ZS-Property names a property this key may not act on (PROPERTY_NOT_FOUND): for a company key, one outside its hotels; for a hotel key, any other property. A company key without the header is 400 PROPERTY_REQUIRED"
|
|
1810
|
+
},
|
|
1811
|
+
{
|
|
1812
|
+
"status": 409,
|
|
1813
|
+
"description": "The property is deleted or demo (PROPERTY_UNAVAILABLE); on an ARI route its channel manager is off (CHANNEL_MANAGER_DISABLED), or, on a company key, its rates are not the source of truth (ARI_NOT_AUTHORITATIVE); on a booking route it has no PMS (PMS_NOT_AVAILABLE)"
|
|
1814
|
+
},
|
|
1815
|
+
{
|
|
1816
|
+
"status": 429,
|
|
1817
|
+
"description": "A budget was exhausted — data.scope names it (ip · ip-auth · requests · writes · property · property-writes · cells · company · global, or one of the long budgets of x-zimmerstack.shield); honour Retry-After and pace on the RateLimit header (x-zimmerstack.rateLimits)"
|
|
1818
|
+
}
|
|
1819
|
+
]
|
|
1820
|
+
},
|
|
1821
|
+
{
|
|
1822
|
+
"key": "POST /sandbox/bookings",
|
|
1823
|
+
"summary": "Simulate an OTA booking on the sandbox: the booking, the inventory, the real webhook",
|
|
1824
|
+
"description": "Scope ari:write, test keys only (403 SANDBOX_ONLY on a live key). Creates a channel booking on the sandbox exactly as the channel manager would: the booking row, the room type's availability moved down for every night, the inventory event, and the channel.booking.created webhook queued to every endpoint registered on the sandbox. A sold-out night does not refuse (an OTA oversells; the PMS is told): the booking lands with oversold: true.",
|
|
1825
|
+
"scope": "ari:write",
|
|
1826
|
+
"call": "zs.sandbox.bookings.create(body)",
|
|
1827
|
+
"path": [],
|
|
1828
|
+
"query": [],
|
|
1829
|
+
"body": "SandboxBookingCreate",
|
|
1830
|
+
"response": "SandboxBooking",
|
|
1831
|
+
"answerStatus": [
|
|
1832
|
+
201
|
|
1833
|
+
],
|
|
1834
|
+
"idempotent": true,
|
|
1835
|
+
"request": {
|
|
1836
|
+
"roomTypeId": 412,
|
|
1837
|
+
"checkIn": "2026-12-05",
|
|
1838
|
+
"nights": 2,
|
|
1839
|
+
"rooms": 1,
|
|
1840
|
+
"adults": 2,
|
|
1841
|
+
"guestName": "Asha Verma",
|
|
1842
|
+
"otaName": "Booking.com",
|
|
1843
|
+
"paidByOta": false
|
|
1844
|
+
},
|
|
1845
|
+
"answer": {
|
|
1846
|
+
"bookingId": 90311,
|
|
1847
|
+
"reference": "SBX-9001-MH3K2Q7A",
|
|
1848
|
+
"channelBookingId": "sbx-1f6d0c2e-7b53-4a0e-9c5a-2d8f3b1e4c70",
|
|
1849
|
+
"otaName": "Booking.com",
|
|
1850
|
+
"status": "UPCOMING",
|
|
1851
|
+
"guestName": "Asha Verma",
|
|
1852
|
+
"checkIn": "2026-12-05",
|
|
1853
|
+
"checkOut": "2026-12-07",
|
|
1854
|
+
"nights": 2,
|
|
1855
|
+
"rooms": 1,
|
|
1856
|
+
"roomTypeId": 412,
|
|
1857
|
+
"nightlyRate": 4500,
|
|
1858
|
+
"total": 9000,
|
|
1859
|
+
"currency": "INR",
|
|
1860
|
+
"paidByOta": false,
|
|
1861
|
+
"oversold": false,
|
|
1862
|
+
"createdAt": "2026-10-30T12:00:00.000Z",
|
|
1863
|
+
"webhook": {
|
|
1864
|
+
"eventType": "channel.booking.created",
|
|
1865
|
+
"queued": true
|
|
1866
|
+
}
|
|
1867
|
+
},
|
|
1868
|
+
"refusals": [
|
|
1869
|
+
{
|
|
1870
|
+
"status": 400,
|
|
1871
|
+
"description": "data.code is one of VALIDATION | UNKNOWN_ROOM_TYPE | STAY_INVALID"
|
|
1872
|
+
},
|
|
1873
|
+
{
|
|
1874
|
+
"status": 401,
|
|
1875
|
+
"description": "Missing, malformed, unknown or revoked key"
|
|
1876
|
+
},
|
|
1877
|
+
{
|
|
1878
|
+
"status": 403,
|
|
1879
|
+
"description": "SANDBOX_ONLY (a live key), SCOPE_MISSING (no ari:write), or IP_NOT_ALLOWED"
|
|
1880
|
+
},
|
|
1881
|
+
{
|
|
1882
|
+
"status": 413,
|
|
1883
|
+
"description": "Body larger than 1048576 bytes (x-zimmerstack.limits.maxBodyBytes); nothing was read"
|
|
1884
|
+
},
|
|
1885
|
+
{
|
|
1886
|
+
"status": 429,
|
|
1887
|
+
"description": "One of the request budgets; honour Retry-After"
|
|
1888
|
+
}
|
|
1889
|
+
]
|
|
1890
|
+
},
|
|
1891
|
+
{
|
|
1892
|
+
"key": "POST /sandbox/bookings/{bookingId}/cancel",
|
|
1893
|
+
"summary": "The channel cancels a simulated booking: availability back, the real cancelled webhook",
|
|
1894
|
+
"description": "Scope ari:write, test keys only (403 SANDBOX_ONLY on a live key). Idempotent: an already-cancelled booking answers 200 with webhook.queued false.",
|
|
1895
|
+
"scope": "ari:write",
|
|
1896
|
+
"call": "zs.sandbox.bookings.cancel(bookingId)",
|
|
1897
|
+
"path": [
|
|
1898
|
+
"bookingId"
|
|
1899
|
+
],
|
|
1900
|
+
"query": [],
|
|
1901
|
+
"body": null,
|
|
1902
|
+
"response": "SandboxBooking",
|
|
1903
|
+
"answerStatus": [
|
|
1904
|
+
200
|
|
1905
|
+
],
|
|
1906
|
+
"idempotent": false,
|
|
1907
|
+
"request": null,
|
|
1908
|
+
"answer": null,
|
|
1909
|
+
"refusals": [
|
|
1910
|
+
{
|
|
1911
|
+
"status": 401,
|
|
1912
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
1913
|
+
},
|
|
1914
|
+
{
|
|
1915
|
+
"status": 403,
|
|
1916
|
+
"description": "SANDBOX_ONLY (a live key), SCOPE_MISSING (no ari:write), or IP_NOT_ALLOWED"
|
|
1917
|
+
},
|
|
1918
|
+
{
|
|
1919
|
+
"status": 404,
|
|
1920
|
+
"description": "No simulated booking with this id on the sandbox; on a company key, PROPERTY_NOT_FOUND when X-ZS-Property names a property it may not act on"
|
|
1921
|
+
},
|
|
1922
|
+
{
|
|
1923
|
+
"status": 409,
|
|
1924
|
+
"description": "Not an UPCOMING booking"
|
|
1925
|
+
},
|
|
1926
|
+
{
|
|
1927
|
+
"status": 429,
|
|
1928
|
+
"description": "A budget was exhausted — data.scope names it (ip · ip-auth · requests · writes · property · property-writes · cells · company · global, or one of the long budgets of x-zimmerstack.shield); honour Retry-After and pace on the RateLimit header (x-zimmerstack.rateLimits)"
|
|
1929
|
+
}
|
|
1930
|
+
]
|
|
1931
|
+
},
|
|
1932
|
+
{
|
|
1933
|
+
"key": "POST /sandbox/bookings/{bookingId}/modify",
|
|
1934
|
+
"summary": "The channel sends a modified revision: new dates, length, rooms or guest; the real modified webhook",
|
|
1935
|
+
"description": "Scope ari:write, test keys only (403 SANDBOX_ONLY on a live key). At least one field. The old nights go back on the sandbox's availability, the new ones come off; channel.booking.modified carries changes and previous.",
|
|
1936
|
+
"scope": "ari:write",
|
|
1937
|
+
"call": "zs.sandbox.bookings.modify(bookingId, body)",
|
|
1938
|
+
"path": [
|
|
1939
|
+
"bookingId"
|
|
1940
|
+
],
|
|
1941
|
+
"query": [],
|
|
1942
|
+
"body": "SandboxBookingModify",
|
|
1943
|
+
"response": "SandboxBooking",
|
|
1944
|
+
"answerStatus": [
|
|
1945
|
+
200
|
|
1946
|
+
],
|
|
1947
|
+
"idempotent": false,
|
|
1948
|
+
"request": {
|
|
1949
|
+
"nights": 3,
|
|
1950
|
+
"guestName": "Asha Verma-Rao"
|
|
1951
|
+
},
|
|
1952
|
+
"answer": null,
|
|
1953
|
+
"refusals": [
|
|
1954
|
+
{
|
|
1955
|
+
"status": 400,
|
|
1956
|
+
"description": "data.code is one of VALIDATION | STAY_INVALID"
|
|
1957
|
+
},
|
|
1958
|
+
{
|
|
1959
|
+
"status": 401,
|
|
1960
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
1961
|
+
},
|
|
1962
|
+
{
|
|
1963
|
+
"status": 403,
|
|
1964
|
+
"description": "SANDBOX_ONLY (a live key), SCOPE_MISSING (no ari:write), or IP_NOT_ALLOWED"
|
|
1965
|
+
},
|
|
1966
|
+
{
|
|
1967
|
+
"status": 404,
|
|
1968
|
+
"description": "No simulated booking with this id on the sandbox; on a company key, PROPERTY_NOT_FOUND when X-ZS-Property names a property it may not act on"
|
|
1969
|
+
},
|
|
1970
|
+
{
|
|
1971
|
+
"status": 409,
|
|
1972
|
+
"description": "Not an UPCOMING booking"
|
|
1973
|
+
},
|
|
1974
|
+
{
|
|
1975
|
+
"status": 429,
|
|
1976
|
+
"description": "A budget was exhausted — data.scope names it (ip · ip-auth · requests · writes · property · property-writes · cells · company · global, or one of the long budgets of x-zimmerstack.shield); honour Retry-After and pace on the RateLimit header (x-zimmerstack.rateLimits)"
|
|
1977
|
+
}
|
|
1978
|
+
]
|
|
1979
|
+
},
|
|
1980
|
+
{
|
|
1981
|
+
"key": "GET /batches/{batchId}",
|
|
1982
|
+
"summary": "One accepted write and whether it has landed",
|
|
1983
|
+
"description": "",
|
|
1984
|
+
"scope": "ari:read",
|
|
1985
|
+
"call": "zs.batches.get(batchId)",
|
|
1986
|
+
"path": [
|
|
1987
|
+
"batchId"
|
|
1988
|
+
],
|
|
1989
|
+
"query": [],
|
|
1990
|
+
"body": null,
|
|
1991
|
+
"response": "BatchStatus",
|
|
1992
|
+
"answerStatus": [
|
|
1993
|
+
200
|
|
1994
|
+
],
|
|
1995
|
+
"idempotent": false,
|
|
1996
|
+
"request": null,
|
|
1997
|
+
"answer": {
|
|
1998
|
+
"batchId": "7f1d2c4e-5a6b-4c8d-9e0f-112233445566",
|
|
1999
|
+
"resource": "rates",
|
|
2000
|
+
"createdAt": "2026-10-12T09:14:03.201Z",
|
|
2001
|
+
"requestedCells": 151,
|
|
2002
|
+
"acceptedCells": 43,
|
|
2003
|
+
"noopCells": 108,
|
|
2004
|
+
"rejected": [],
|
|
2005
|
+
"status": "pending",
|
|
2006
|
+
"pendingCells": 12,
|
|
2007
|
+
"parkedCells": 0,
|
|
2008
|
+
"lastError": null
|
|
2009
|
+
},
|
|
2010
|
+
"refusals": [
|
|
2011
|
+
{
|
|
2012
|
+
"status": 401,
|
|
2013
|
+
"description": "Missing, malformed, unknown or revoked key (data.code API_KEY_INVALID | API_KEY_REVOKED)"
|
|
2014
|
+
},
|
|
2015
|
+
{
|
|
2016
|
+
"status": 403,
|
|
2017
|
+
"description": "The key lacks the scope this route needs (SCOPE_MISSING, details.needed / details.held), or the request came from outside the key's address allowlist (IP_NOT_ALLOWED)"
|
|
2018
|
+
},
|
|
2019
|
+
{
|
|
2020
|
+
"status": 404,
|
|
2021
|
+
"description": "No such batch on this property; on a company key, PROPERTY_NOT_FOUND when X-ZS-Property names a property it may not act on"
|
|
2022
|
+
},
|
|
2023
|
+
{
|
|
2024
|
+
"status": 409,
|
|
2025
|
+
"description": "The property is deleted or demo (PROPERTY_UNAVAILABLE); on an ARI route its channel manager is off (CHANNEL_MANAGER_DISABLED), or, on a company key, its rates are not the source of truth (ARI_NOT_AUTHORITATIVE); on a booking route it has no PMS (PMS_NOT_AVAILABLE)"
|
|
2026
|
+
},
|
|
2027
|
+
{
|
|
2028
|
+
"status": 429,
|
|
2029
|
+
"description": "A budget was exhausted — data.scope names it (ip · ip-auth · requests · writes · property · property-writes · cells · company · global, or one of the long budgets of x-zimmerstack.shield); honour Retry-After and pace on the RateLimit header (x-zimmerstack.rateLimits)"
|
|
2030
|
+
}
|
|
2031
|
+
]
|
|
2032
|
+
}
|
|
2033
|
+
],
|
|
2034
|
+
"types": {
|
|
2035
|
+
"Error": "export interface Error {\n statuscode: number;\n /** Human-readable, may change; branch on data.code */\n message: string;\n data: {\n code: \"API_KEY_INVALID\" | \"API_KEY_REVOKED\" | \"API_KEY_EXPIRED\" | \"CONNECT_API_NOT_CONFIGURED\" | \"IP_NOT_ALLOWED\" | \"SCOPE_MISSING\" | \"PROPERTY_UNAVAILABLE\" | \"CHANNEL_MANAGER_DISABLED\" | \"PMS_NOT_AVAILABLE\" | \"VALIDATION\" | \"RANGE_INVALID\" | \"HORIZON\" | \"TOO_MANY_UPDATES\" | \"TOO_MANY_CELLS\" | \"UNKNOWN_ROOM_TYPE\" | \"UNKNOWN_RATE_PLAN\" | \"CURRENCY_MISMATCH\" | \"RATE_LIMITED\" | \"NOTHING_ACCEPTED\" | \"BATCH_NOT_FOUND\" | \"IDEMPOTENCY_KEY_INVALID\" | \"IDEMPOTENCY_KEY_REUSED\" | \"IDEMPOTENCY_IN_FLIGHT\" | \"STAY_INVALID\" | \"UNKNOWN_ROOM_TYPE_FOR_PLAN\" | \"OCCUPANCY_EXCEEDED\" | \"NO_AVAILABILITY\" | \"EXTERNAL_REFERENCE_REUSED\" | \"PAYMENT_NOT_ALLOWED\" | \"PAYMENT_EXCEEDS_TOTAL\" | \"BOOKING_NOT_FOUND\" | \"BOOKING_NOT_CANCELLABLE\" | \"MODULE_NOT_ENTITLED\" | \"SANDBOX_ONLY\" | \"ROOM_TYPE_NOT_FOUND\" | \"RATE_PLAN_NOT_FOUND\" | \"CATALOG_CONFLICT\" | \"CATALOG_BUSY\" | \"CHANNEL_MANAGER_ERROR\" | \"PROPERTY_REQUIRED\" | \"PROPERTY_NOT_FOUND\" | \"ARI_NOT_AUTHORITATIVE\" | \"ROUTE_NOT_FOUND\" | \"PAYLOAD_TOO_LARGE\" | \"AUTH_BACKEND_UNAVAILABLE\" | \"BOOKING_NOT_MODIFIABLE\" | \"SANDBOX_NOT_FOUND\" | \"SANDBOX_INCOMPLETE\" | \"WRITES_FROZEN\" | \"WRITES_SUSPENDED\" | \"SHIELD_UNAVAILABLE\" | \"CATALOG_LIMIT_REACHED\" | \"TOO_MANY_NEW_ENTITIES\" | \"RATE_OUT_OF_BAND\" | \"CHANNEL_NOT_FOUND\" | \"CHANNEL_SHARED\" | \"MODIFIER_OUT_OF_BAND\";\n details?: unknown;\n };\n}",
|
|
2036
|
+
"Property": "export interface Property {\n id: number;\n name: string;\n /** IANA; every date in this API is a calendar date in this zone */\n timezone: string;\n /** ISO 4217; every rate must be sent in it */\n currency: string;\n inventoryScope: \"PMS_CM\" | \"CM_ONLY\" | \"PMS_CUTOVER\" | \"OWNER_SITE\";\n /** true when this key is a zsk_test_ key on the owner's sandbox: nothing you send reaches a channel, and POST /sandbox/bookings simulates an OTA booking */\n sandbox: boolean;\n /** last writable night = today + horizonDays */\n horizonDays: number;\n ariAuthoritative: boolean;\n /** what THIS key may do: ari:read · ari:write · bookings:read · bookings:write · bookings:payments */\n scopes: Array<string>;\n products: {\n /** the ARI routes need it */\n channelManager: boolean;\n /** the booking routes need it */\n pms: boolean;\n };\n limits: {\n requestsPerMinute: number;\n writesPerMinute: number;\n maxUpdatesPerRequest: number;\n maxCellsPerRequest: number;\n bookingsPerMinute: number;\n /** Changed cells this property may take per clock hour (UTC), all its keys together. A cell that already holds the value sent is not counted */\n cellsPerHour: number;\n /** Changed cells this property may take per rolling 24 hours */\n cellsPerDay: number;\n /** Room types this property may hold */\n maxRoomTypes: number;\n /** Rate plans this property may hold */\n maxRatePlans: number;\n /** A vacation rental: rate plans this property may hold per room type, counted over the whole property. null on a hotel, where maxRatePlans is the rule */\n ratePlansPerRoomType: number | null;\n /** New room types or rate plans one request, and one minute, may create */\n newEntitiesPerMinute: number;\n };\n /** What this property has used of its long budgets (§6.6) */\n usage: {\n /** Changed cells counted against cellsPerHour so far this clock hour */\n cellsThisHour: number;\n /** Changed cells counted against cellsPerDay over the last 24 hours */\n cellsLast24h: number;\n };\n /** Where this integration stands with the channel shield. Reads and bookings are never affected */\n shield: {\n /** CLEAR nothing held against the integration · WATCH noted, nothing refused · PAUSED only writes that close inventory are accepted · SUSPENDED every write refused until ZimmerStack releases it */\n level: \"CLEAR\" | \"WATCH\" | \"PAUSED\" | \"SUSPENDED\";\n /** Why, when the level is not CLEAR */\n reason: string | null;\n /** When a pause ends on its own (ISO instant); null = until released, or not paused */\n until: string | null;\n };\n sync: {\n state: \"IN_SYNC\" | \"PENDING\" | \"OUT_OF_SYNC\" | \"DISABLED\";\n pendingCells: number;\n };\n}",
|
|
2037
|
+
"Catalog": "export interface Catalog {\n /** ISO 4217; the property's, and the one every rate and booking is sent in */\n currency: string;\n /** Every room type on the property, stable ids, in the order they were created */\n roomTypes: Array<{\n /** The number every availability write and every booking room names as roomTypeId */\n id: number;\n /** Your own id for it, when your system wrote it through PUT /catalog/room-types; null otherwise */\n ref: string | null;\n /** As the owner named it in ZimmerStack */\n name: string;\n /** Most adults one room takes; null = not set */\n maxAdults: number | null;\n /** Most children one room takes; null = not set */\n maxChildren: number | null;\n /** \"room\" unless the owner chose another kind of unit */\n roomKind: string;\n /** IN_SYNC the channel manager has it · PENDING / SENDING on its way · FAILED stopped retrying (the owner's screen offers Retry) · DRIFTED someone changed it inside the channel manager · NOT_LINKED saved here, never added there · DISABLED the property is not connected */\n sync: \"IN_SYNC\" | \"PENDING\" | \"SENDING\" | \"FAILED\" | \"DRIFTED\" | \"NOT_LINKED\" | \"DISABLED\";\n }>;\n /** Every rate plan, each under one room type */\n ratePlans: Array<{\n /** The number rate and restriction writes name as ratePlanId; optional on a booking room */\n id: number;\n /** Your own id for it, when your system wrote it through PUT /catalog/rate-plans; null otherwise */\n ref: string | null;\n /** The room type this plan sells; a booking may only pair the two */\n roomTypeId: number;\n /** As the owner named it */\n name: string;\n /** EP room only · CP breakfast · MAP half board · AP full board; null = not set */\n mealPlan: \"EP\" | \"CP\" | \"MAP\" | \"AP\" | null;\n /** The occupancy this plan is priced for; null = any */\n occupancy: number | null;\n currency: string;\n /** false = a non-refundable plan */\n refundable: boolean;\n /** IN_SYNC the channel manager has it · PENDING / SENDING on its way · FAILED stopped retrying (the owner's screen offers Retry) · DRIFTED someone changed it inside the channel manager · NOT_LINKED saved here, never added there · DISABLED the property is not connected */\n sync: \"IN_SYNC\" | \"PENDING\" | \"SENDING\" | \"FAILED\" | \"DRIFTED\" | \"NOT_LINKED\" | \"DISABLED\";\n }>;\n}",
|
|
2038
|
+
"Properties": "export interface Properties {\n /** company: a software vendor's key, the hotel named in X-ZS-Property on every request. property: one hotel's own key, no header needed. */\n keyKind: \"company\" | \"property\";\n /** A company key: every property it may act on. A hotel key: its one property. */\n properties: Array<{\n /** The id a company key names in the X-ZS-Property header */\n id: number;\n name: string;\n timezone: string;\n currency: string;\n /** The property publishes to its channels */\n channelManager: boolean;\n /** A sandbox: everything lands locally, nothing reaches a channel */\n sandbox: boolean;\n }>;\n}",
|
|
2039
|
+
"RoomTypesUpsert": "export interface RoomTypesUpsert {\n /** Each ref once per request */\n roomTypes: Array<{\n /** Your own id for this entity: the upsert key, stable across sends (1–64 of A–Z a–z 0–9 . _ : -) */\n ref: string;\n /** Shown to the owner and sent to the channel manager as the title */\n name: string;\n /** Sellable rooms of this type. Read on create; a later change is made in the channel manager (the count there is the truth the channels sell) */\n roomCount: number;\n /** Most adults one room takes */\n adults: number;\n /** Most children one room takes; default 0 */\n children?: number;\n }>;\n}",
|
|
2040
|
+
"RatePlansUpsert": "export interface RatePlansUpsert {\n /** Each ref once per request */\n ratePlans: Array<{\n /** Your own id for this entity: the upsert key, stable across sends (1–64 of A–Z a–z 0–9 . _ : -) */\n ref: string;\n /** The room type this plan sells (GET /catalog); or name it by roomTypeRef */\n roomTypeId?: number;\n /** The room type by the ref you gave it, in this request or an earlier one */\n roomTypeRef?: string;\n /** Shown to the owner and sent to the channel manager as the title */\n name: string;\n /** EP room only · CP breakfast · MAP half board · AP full board; null = not set */\n mealPlan?: \"EP\" | \"CP\" | \"MAP\" | \"AP\" | null;\n /** The occupancy this plan is priced for; null = the room type's default */\n occupancy?: number | null;\n /** false = a non-refundable plan; default true */\n refundable?: boolean;\n /** The plan's standing price in MAJOR units (e.g. 4500 or \"4500.00\"), like every rate here: what new dates open at, mirrored to the channel manager. Omit to leave it; null = follow the room type's base rate */\n defaultRate?: number | string | null;\n /** Deprecated: the same standing price in MINOR units (paise). Send defaultRate instead; never both */\n defaultRateMinor?: number | null;\n }>;\n}",
|
|
2041
|
+
"CatalogUpsertResult": "export interface CatalogUpsertResult {\n /** One per entity sent, in the order sent */\n items: Array<{\n ref: string;\n /** The ZimmerStack id: what every availability, rate and booking write names from now on */\n id: number;\n /** created: new here and on the channel manager · updated: fields changed · adopted: an entity the owner had already made with this name is now yours by ref · unchanged: nothing differed */\n action: \"created\" | \"updated\" | \"adopted\" | \"unchanged\";\n /** IN_SYNC the channel manager has it · PENDING / SENDING on its way · FAILED stopped retrying (the owner's screen offers Retry) · DRIFTED someone changed it inside the channel manager · NOT_LINKED saved here, never added there · DISABLED the property is not connected */\n sync: \"IN_SYNC\" | \"PENDING\" | \"SENDING\" | \"FAILED\" | \"DRIFTED\" | \"NOT_LINKED\" | \"DISABLED\";\n /** Saved, but something to know (for example the property is not on the channel manager yet); null when nothing */\n notice: string | null;\n }>;\n /** Where the property stands after this write; a sandbox always says enabled */\n channelManager: {\n /** The property publishes to its channels */\n enabled: boolean;\n /** Why not, when enabled is false (for example: a room type still has no rate plan) */\n reason: string | null;\n };\n}",
|
|
2042
|
+
"CatalogDeleteResult": "export interface CatalogDeleteResult {\n id: number;\n deleted: true;\n /** The channel manager's copy is gone too (a sandbox has none) */\n channelManagerDeleted: boolean;\n /** For a room type: the plans that went with it */\n deletedRatePlanIds: Array<number>;\n}",
|
|
2043
|
+
"RangeQuery": "export interface RangeQuery {\n /** default: today in the property's timezone */\n from?: string;\n /** default: from + 30 days; at most 500 days after from */\n to?: string;\n}",
|
|
2044
|
+
"AvailabilityRead": "export interface AvailabilityRead {\n /** Hotel-local calendar date, YYYY-MM-DD */\n from: string;\n /** Hotel-local calendar date, YYYY-MM-DD */\n to: string;\n cells: Array<{\n roomTypeId: number;\n /** Hotel-local calendar date, YYYY-MM-DD */\n date: string;\n available: number;\n }>;\n}",
|
|
2045
|
+
"AvailabilityWrite": "export interface AvailabilityWrite {\n updates: Array<{\n /** ZimmerStack room type id (GET /catalog) */\n roomTypeId: number;\n /** Hotel-local calendar date, YYYY-MM-DD */\n dateFrom: string;\n /** Hotel-local calendar date, YYYY-MM-DD */\n dateTo: string;\n /** ABSOLUTE count of rooms of this type for sale on each night of the range */\n available: number;\n }>;\n}",
|
|
2046
|
+
"RatesRead": "export interface RatesRead {\n /** Hotel-local calendar date, YYYY-MM-DD */\n from: string;\n /** Hotel-local calendar date, YYYY-MM-DD */\n to: string;\n currency: string;\n cells: Array<{\n ratePlanId: number;\n /** Hotel-local calendar date, YYYY-MM-DD */\n date: string;\n /** MINOR units (paise, cents) */\n rateMinor: number;\n source: \"MANUAL\" | \"BASE\" | \"ENGINE\" | \"CHANNEX_SEED\" | \"PLAN_DEFAULT\" | \"STANDING\";\n }>;\n}",
|
|
2047
|
+
"RatesWrite": "export interface RatesWrite {\n updates: Array<{\n /** ZimmerStack rate plan id (GET /catalog) */\n ratePlanId: number;\n /** Hotel-local calendar date, YYYY-MM-DD */\n dateFrom: string;\n /** Hotel-local calendar date, YYYY-MM-DD */\n dateTo: string;\n days?: Array<\"mo\" | \"tu\" | \"we\" | \"th\" | \"fr\" | \"sa\" | \"su\">;\n /** Nightly sell price in MAJOR units (e.g. 4500 or \"4500.00\"), 1 to 21474836; rounded to a whole major unit */\n rate: number | string;\n /** ISO 4217; must equal the property's currency (GET /property) */\n currency: string;\n }>;\n}",
|
|
2048
|
+
"RestrictionsRead": "export interface RestrictionsRead {\n /** Hotel-local calendar date, YYYY-MM-DD */\n from: string;\n /** Hotel-local calendar date, YYYY-MM-DD */\n to: string;\n cells: Array<{\n ratePlanId: number;\n /** Hotel-local calendar date, YYYY-MM-DD */\n date: string;\n stopSell: boolean | null;\n closedToArrival: boolean | null;\n closedToDeparture: boolean | null;\n minStayArrival: number | null;\n minStayThrough: number | null;\n maxStay: number | null;\n }>;\n}",
|
|
2049
|
+
"RestrictionsWrite": "export interface RestrictionsWrite {\n updates: Array<{\n /** ZimmerStack rate plan id (GET /catalog) */\n ratePlanId: number;\n /** Hotel-local calendar date, YYYY-MM-DD */\n dateFrom: string;\n /** Hotel-local calendar date, YYYY-MM-DD */\n dateTo: string;\n days?: Array<\"mo\" | \"tu\" | \"we\" | \"th\" | \"fr\" | \"sa\" | \"su\">;\n stopSell?: boolean;\n closedToArrival?: boolean;\n closedToDeparture?: boolean;\n minStayArrival?: number;\n minStayThrough?: number;\n maxStay?: number;\n }>;\n}",
|
|
2050
|
+
"WriteAccepted": "export interface WriteAccepted {\n batchId: string;\n resource: \"availability\" | \"rates\" | \"restrictions\";\n /** distinct cells after per-request coalescing (last write wins) */\n requestedCells: number;\n /** cells that differed from our record and were written; they will be pushed */\n acceptedCells: number;\n /** cells that already held the requested value; nothing written, nothing pushed */\n noopCells: number;\n /** groups our record refused (e.g. a plan whose policy forbids exceptions) */\n rejected: Array<{\n cells: number;\n error: string;\n }>;\n pushedBy: \"inventory-drain\" | \"ari-projector\";\n /** GET path to watch this batch land */\n poll: string;\n /** Accepted, but worth a look: an availability above the room type's room count (an oversell the channels will sell). Absent when there is nothing to say */\n warnings?: Array<{\n roomTypeId: number;\n /** Rooms of this type in our record */\n units: number;\n /** The highest count this request set for it */\n requested: number;\n message: string;\n }>;\n /** Accepted, but far outside the plan's standing price, on a property whose price band only warns (§6.6). At most 20; absent when there is nothing to say */\n priceWarnings?: Array<{\n ratePlanId: number;\n /** Hotel-local calendar date, YYYY-MM-DD */\n date: string;\n /** The price this request set, MINOR units */\n rateMinor: number;\n /** The plan's standing price, MINOR units */\n standingMinor: number;\n message: string;\n }>;\n /** true when the write was taken through the safety lane: the integration is paused or over a budget, and this write only closed inventory (§6.6) */\n lane?: boolean;\n}",
|
|
2051
|
+
"BatchStatus": "export interface BatchStatus {\n batchId: string;\n resource: \"availability\" | \"rates\" | \"restrictions\";\n createdAt: string;\n requestedCells: number;\n acceptedCells: number;\n noopCells: number;\n rejected: Array<{\n cells: number;\n error: string;\n }>;\n status: \"landed\" | \"pending\" | \"failed\";\n pendingCells: number;\n /** Cells of this batch the channel manager refused: held, not re-sent (§6.6). More than 0 reads failed */\n parkedCells: number;\n lastError: string | null;\n}",
|
|
2052
|
+
"SyncStatus": "export interface SyncStatus {\n propertyId: number;\n /** true on a sandbox property (a zsk_test_ key): pushes land in our record and stop there, so IN_SYNC means recorded */\n sandbox: boolean;\n /** false = nothing is pushed; ask ZimmerStack support */\n ariAuthoritative: boolean;\n inventory: {\n state: \"IN_SYNC\" | \"PENDING\" | \"OUT_OF_SYNC\" | \"DISABLED\";\n pendingCells: number;\n lastOkAt: string | null;\n lastError: string | null;\n outOfSyncSince: string | null;\n };\n rates: {\n /** rate/restriction cells waiting for the projector */\n dirtyCells: number;\n /** rate/restriction cells the channel manager refused: held, no longer re-sent, their batch reads failed. Send a corrected value for those nights (§6.6) */\n parkedCells: number;\n lastPushAt: string | null;\n lastErrorAt: string | null;\n lastError: string | null;\n };\n /** Where this integration stands with the channel shield. Reads and bookings are never affected */\n shield: {\n /** CLEAR nothing held against the integration · WATCH noted, nothing refused · PAUSED only writes that close inventory are accepted · SUSPENDED every write refused until ZimmerStack releases it */\n level: \"CLEAR\" | \"WATCH\" | \"PAUSED\" | \"SUSPENDED\";\n /** Why, when the level is not CLEAR */\n reason: string | null;\n /** When a pause ends on its own (ISO instant); null = until released, or not paused */\n until: string | null;\n };\n newestPendingBatch: {\n batchId: string;\n resource: \"availability\" | \"rates\" | \"restrictions\";\n createdAt: string;\n requestedCells: number;\n acceptedCells: number;\n noopCells: number;\n rejected: Array<{\n cells: number;\n error: string;\n }>;\n status: \"landed\" | \"pending\" | \"failed\";\n pendingCells: number;\n /** Cells of this batch the channel manager refused: held, not re-sent (§6.6). More than 0 reads failed */\n parkedCells: number;\n lastError: string | null;\n } | null;\n}",
|
|
2053
|
+
"BookingCreate": "export interface BookingCreate {\n /** Your own reservation id; unique per property. A retried POST with the same value returns the same booking while it is live and yours; after a cancel, a new stay needs a new reference (409 EXTERNAL_REFERENCE_REUSED otherwise) */\n externalReference: string;\n /** Hotel-local calendar date, YYYY-MM-DD */\n checkIn: string;\n /** Exclusive: the checkout day is not a night */\n checkOut: string;\n /** ISO 4217; must equal the property's (GET /property) */\n currency: string;\n /** Who booked; found or created in the PMS by phone */\n guest: {\n /** Full name as the guest typed it */\n name: string;\n /** Guest phone, digits with an optional leading + */\n phone: string & string;\n /** Guest email, when you have it; we write to it only if the owner switches our confirmation on */\n email?: string;\n /** Special requests for the desk; shown in the PMS, never sent anywhere */\n notes?: string;\n };\n /** One entry per ROOM; two rooms of the same type are two entries */\n rooms: Array<{\n /** ZimmerStack room type id: roomTypes[].id from GET /catalog, never guessed */\n roomTypeId: number;\n /** Optional: the plan the guest booked, ratePlans[].id from GET /catalog; must belong to roomTypeId. Decides the meal plan; omitted = room only (EP) */\n ratePlanId?: number;\n /** Adults in this room; at most the room type's maxAdults */\n adults: number;\n /** Children in this room; default 0; at most the room type's maxChildren */\n children?: number;\n /** The nightly price YOU charged for this room, MAJOR units (e.g. 4500 or \"4500.00\"), 1 to 21474836, taxes as you sold them */\n nightlyRate: number | string;\n }>;\n /** Omit when nothing was collected; an amount above 0 needs the bookings:payments scope */\n payment?: {\n /** What you collected so far, MAJOR units; 0 = nothing collected (pay at hotel); never more than the stay's total */\n amount: number | string;\n /** How you collected it */\n method: \"ONLINE\" | \"CARD\" | \"UPI\" | \"NETBANKING\" | \"CASH\";\n /** Your gateway's payment or transaction id */\n reference?: string;\n };\n /** Booking-level remarks for the desk (promo code, source page) */\n notes?: string;\n}",
|
|
2054
|
+
"BookingCancel": "export interface BookingCancel {\n /** Why; kept on the booking's activity log */\n reason?: string;\n}",
|
|
2055
|
+
"BookingsQuery": "export interface BookingsQuery {\n /** Created on or after this instant (ISO 8601); default: the last 7 days */\n since?: string;\n /** Your own reservation id; unique per property. A retried POST with the same value returns the same booking while it is live and yours; after a cancel, a new stay needs a new reference (409 EXTERNAL_REFERENCE_REUSED otherwise) */\n externalReference?: string;\n /** 1 to 100; default 50 */\n limit?: number;\n}",
|
|
2056
|
+
"Booking": "export interface Booking {\n bookingId: number;\n reference: string;\n externalReference: string | null;\n status: \"UPCOMING\" | \"INHOUSE\" | \"COMPLETED\" | \"CANCELLED\" | \"NOSHOW\";\n /** Hotel-local calendar date, YYYY-MM-DD */\n checkIn: string;\n /** Hotel-local calendar date, YYYY-MM-DD */\n checkOut: string;\n nights: number;\n currency: string;\n /** MAJOR units, two decimals: the whole stay */\n totalAmount: string;\n /** MAJOR units, two decimals: collected so far */\n totalPaid: string;\n /** MAJOR units, two decimals: owed at the hotel */\n balanceDue: string;\n guest: {\n name: string;\n phone: string;\n email: string | null;\n };\n rooms: Array<{\n bookingRoomId: number;\n roomTypeId: number;\n ratePlanId: number | null;\n mealPlan: \"EP\" | \"CP\" | \"MAP\" | \"AP\";\n adults: number;\n children: number;\n /** MAJOR units, two decimals */\n nightlyRate: string;\n status: \"UPCOMING\" | \"CHECKEDIN\" | \"CHECKEDOUT\" | \"CANCELLED\" | \"NOSHOW\";\n }>;\n inventory: {\n eventRecorded: boolean;\n /** false = this property has no channel manager; nothing is pushed */\n channelManager: boolean;\n pushedBy: \"inventory-drain\";\n };\n replay: boolean;\n createdAt: string;\n cancelledAt: string | null;\n}",
|
|
2057
|
+
"BookingsList": "export interface BookingsList {\n since: string;\n items: Array<{\n bookingId: number;\n reference: string;\n externalReference: string | null;\n status: \"UPCOMING\" | \"INHOUSE\" | \"COMPLETED\" | \"CANCELLED\" | \"NOSHOW\";\n /** Hotel-local calendar date, YYYY-MM-DD */\n checkIn: string;\n /** Hotel-local calendar date, YYYY-MM-DD */\n checkOut: string;\n nights: number;\n currency: string;\n /** MAJOR units, two decimals: the whole stay */\n totalAmount: string;\n /** MAJOR units, two decimals: collected so far */\n totalPaid: string;\n /** MAJOR units, two decimals: owed at the hotel */\n balanceDue: string;\n guest: {\n name: string;\n phone: string;\n email: string | null;\n };\n rooms: Array<{\n bookingRoomId: number;\n roomTypeId: number;\n ratePlanId: number | null;\n mealPlan: \"EP\" | \"CP\" | \"MAP\" | \"AP\";\n adults: number;\n children: number;\n /** MAJOR units, two decimals */\n nightlyRate: string;\n status: \"UPCOMING\" | \"CHECKEDIN\" | \"CHECKEDOUT\" | \"CANCELLED\" | \"NOSHOW\";\n }>;\n inventory: {\n eventRecorded: boolean;\n /** false = this property has no channel manager; nothing is pushed */\n channelManager: boolean;\n pushedBy: \"inventory-drain\";\n };\n replay: boolean;\n createdAt: string;\n cancelledAt: string | null;\n }>;\n}",
|
|
2058
|
+
"SandboxBookingCreate": "export interface SandboxBookingCreate {\n /** A room type of the sandbox (GET /catalog) */\n roomTypeId: number;\n /** Arrival, YYYY-MM-DD in the property's timezone; today or later, within the horizon */\n checkIn: string;\n /** 1–30; checkout = checkIn + nights */\n nights: number;\n /** Rooms of this type the guest books (1–5); default 1 */\n rooms?: number;\n /** Adults per room; default 2 */\n adults?: number;\n /** The guest's name; default a fictional one */\n guestName?: string;\n /** The channel the booking pretends to arrive from; default Booking.com */\n otaName?: \"Booking.com\" | \"Expedia\" | \"Agoda\" | \"Airbnb\" | \"MakeMyTrip\" | \"Goibibo\";\n /** true = the channel collected the money, so totalPaid equals the total; default false (pay at the property) */\n paidByOta?: boolean;\n}",
|
|
2059
|
+
"SandboxBookingModify": "export interface SandboxBookingModify {\n /** New arrival, YYYY-MM-DD in the property's timezone; today or later */\n checkIn?: string;\n /** New length of stay, 1–30 */\n nights?: number;\n /** New number of rooms, 1–5 */\n rooms?: number;\n /** New adults per room */\n adults?: number;\n /** The guest renamed, as a channel sometimes does */\n guestName?: string;\n}",
|
|
2060
|
+
"Channels": "export interface Channels {\n /** When the connection list was last captured; null when never */\n asOf: string | null;\n channels: Array<{\n /** The channel manager's id for this connection */\n channelId: string;\n /** The channel: BookingCom, Expedia, Agoda, Airbnb, GoMMT, … */\n kind: string;\n /** The connection's title in the channel manager */\n title: string | null;\n /** When our record last saw this connection (the nightly settings sweep) */\n seenAt: string;\n /** Unresolved problems the channel manager reported for this connection */\n openIssues: Array<{\n /** sync_error · rate_error · disconnect_channel · inventory_out_of_sync · … */\n event: string;\n raisedAt: string;\n }>;\n /** This channel's price modifier (§2.8): the steps the channel manager applies, in order, to every price it sends this channel. [] = prices go as they are. null = the channel holds a rule set by hand in the channel manager that this API cannot express; PUT /channels/{channelId}/modifier replaces it */\n modifier: Array<{\n /** Raise or lower what this channel is sent */\n action: \"increase\" | \"decrease\";\n /** percent of the price, or a fixed amount in MAJOR units of the property's currency */\n type: \"percent\" | \"fixed\";\n /** How much: 18 with type percent is 18 %; 200 with type fixed is 200.00 in the property's currency. Always positive: choose decrease instead of a minus sign. Two decimals at most */\n value: number;\n }> | null;\n /** A separate adjustment the owner set for this channel in the ZimmerStack Channels app, applied before the modifier. Read-only here; null = none */\n markupPlan: {\n /** markup: this channel sells a copy of each plan priced a fixed step from it · manual: this channel has prices of its own for some nights */\n mode: \"markup\" | \"manual\";\n direction: \"increase\" | \"decrease\";\n /** Percent of the price, when the step is a percentage */\n percent: number | null;\n /** MAJOR units, when the step is a fixed amount */\n amount: number | null;\n } | null;\n }>;\n /** Unresolved problems not tied to one connection (for example the inventory pipe out of sync) */\n propertyIssues: Array<{\n event: string;\n raisedAt: string;\n }>;\n}",
|
|
2061
|
+
"ModifierWrite": "export interface ModifierWrite {\n /** The whole modifier, in the order it is applied; replaces what the channel holds. At most 5 steps. An empty list removes it: prices go to the channel as they are */\n steps: Array<{\n /** Raise or lower what this channel is sent */\n action: \"increase\" | \"decrease\";\n /** percent of the price, or a fixed amount in MAJOR units of the property's currency */\n type: \"percent\" | \"fixed\";\n /** How much: 18 with type percent is 18 %; 200 with type fixed is 200.00 in the property's currency. Always positive: choose decrease instead of a minus sign. Two decimals at most */\n value: number;\n }>;\n}",
|
|
2062
|
+
"ModifierResult": "export interface ModifierResult {\n channelId: string;\n /** The channel: BookingCom, Expedia, Agoda, Airbnb, GoMMT, … */\n kind: string;\n title: string | null;\n /** What the channel holds now */\n modifier: Array<{\n /** Raise or lower what this channel is sent */\n action: \"increase\" | \"decrease\";\n /** percent of the price, or a fixed amount in MAJOR units of the property's currency */\n type: \"percent\" | \"fixed\";\n /** How much: 18 with type percent is 18 %; 200 with type fixed is 200.00 in the property's currency. Always positive: choose decrease instead of a minus sign. Two decimals at most */\n value: number;\n }>;\n /** false when the channel already held exactly these steps: nothing was sent to the channel manager and nothing was counted */\n changed: boolean;\n /** When it takes effect. Always: \"A modifier applies to prices sent to the channel after the change. Prices already on the channel stay as they are until those nights are sent again.\" */\n notice: string;\n}",
|
|
2063
|
+
"RatesResendAccepted": "export interface RatesResendAccepted {\n /** Hotel-local calendar date, YYYY-MM-DD */\n from: string;\n /** Hotel-local calendar date, YYYY-MM-DD */\n to: string;\n /** Rate-plan nights marked to be sent again. They travel like any write: watch rates.dirtyCells on GET /sync fall to 0 */\n cells: number;\n /** Nights left out because the channel manager refused their value earlier (rates.parkedCells on GET /sync): send a corrected value for those */\n parkedLeft: number;\n /** GET path that says when it has landed */\n watch: string;\n notice: string;\n}",
|
|
2064
|
+
"ChannelBookingsQuery": "export interface ChannelBookingsQuery {\n /** Changed (created, modified or cancelled) on or after this instant (ISO 8601); default: the last 7 days */\n since?: string;\n /** Only confirmed (live) or only cancelled bookings; default both */\n status?: \"CONFIRMED\" | \"CANCELLED\";\n /** 1 to 100; default 50 */\n limit?: number;\n /** The previous page's nextCursor: resume exactly after its last item, even when many bookings changed in the same instant. Takes precedence over since */\n cursor?: string;\n}",
|
|
2065
|
+
"ChannelBookingsList": "export interface ChannelBookingsList {\n /** The instant the list starts at, echoed */\n since: string;\n /** Oldest change first — exactly the booking object the webhooks carry */\n items: Array<{\n id: number;\n reference: string;\n status: \"CONFIRMED\" | \"CANCELLED\";\n stayStatus: string;\n channel: {\n otaName: string;\n otaReservationCode: string;\n source: string;\n sourceGroup: string;\n };\n stay: {\n checkIn: string;\n checkOut: string;\n nights: number;\n dayUse: boolean;\n };\n guest: {\n fullName: string;\n firstName: string | null;\n lastName: string | null;\n phone?: string | null;\n email?: string | null;\n country: string | null;\n language: string | null;\n };\n guestNotes: string | null;\n occupancy: {\n adults: number;\n children: number;\n };\n rooms: Array<{\n roomTypeId: number;\n roomTypeName: string;\n ratePlanId?: number | null;\n mealPlan: \"EP\" | \"CP\" | \"MAP\" | \"AP\";\n adults: number;\n children: number;\n checkIn: string;\n checkOut: string;\n nights: number;\n dayUse: boolean;\n ratePerNight: number;\n amount: number;\n status: string;\n }>;\n amounts: {\n currency: string;\n total: number;\n paid: number;\n balanceDue: number;\n paymentCollect: \"ota\" | \"property\" | \"unknown\";\n };\n finance: {\n otaName: string;\n amountBasis: string;\n currency: string | null;\n grossAmount: number | null;\n commissionAmount: number | null;\n taxAmount: number | null;\n netPayoutAmount: number | null;\n } | null;\n cancellation: {\n at: string;\n reason: string | null;\n } | null;\n createdAt: string;\n updatedAt: string;\n }>;\n /** More rows matched than limit: ask again with cursor = nextCursor */\n more: boolean;\n /** Pass as cursor for the next page; null when there is no more */\n nextCursor: string | null;\n}",
|
|
2066
|
+
"ChannelBooking": "export interface ChannelBooking {\n id: number;\n reference: string;\n status: \"CONFIRMED\" | \"CANCELLED\";\n stayStatus: string;\n channel: {\n otaName: string;\n otaReservationCode: string;\n source: string;\n sourceGroup: string;\n };\n stay: {\n checkIn: string;\n checkOut: string;\n nights: number;\n dayUse: boolean;\n };\n guest: {\n fullName: string;\n firstName: string | null;\n lastName: string | null;\n phone?: string | null;\n email?: string | null;\n country: string | null;\n language: string | null;\n };\n guestNotes: string | null;\n occupancy: {\n adults: number;\n children: number;\n };\n rooms: Array<{\n roomTypeId: number;\n roomTypeName: string;\n ratePlanId?: number | null;\n mealPlan: \"EP\" | \"CP\" | \"MAP\" | \"AP\";\n adults: number;\n children: number;\n checkIn: string;\n checkOut: string;\n nights: number;\n dayUse: boolean;\n ratePerNight: number;\n amount: number;\n status: string;\n }>;\n amounts: {\n currency: string;\n total: number;\n paid: number;\n balanceDue: number;\n paymentCollect: \"ota\" | \"property\" | \"unknown\";\n };\n finance: {\n otaName: string;\n amountBasis: string;\n currency: string | null;\n grossAmount: number | null;\n commissionAmount: number | null;\n taxAmount: number | null;\n netPayoutAmount: number | null;\n } | null;\n cancellation: {\n at: string;\n reason: string | null;\n } | null;\n createdAt: string;\n updatedAt: string;\n}",
|
|
2067
|
+
"SandboxBooking": "export interface SandboxBooking {\n /** The PMS booking id, the one the webhook carries */\n bookingId: number;\n /** The booking reference, SBX-… — the webhook's booking.reference */\n reference: string;\n /** The pretend channel-side id */\n channelBookingId: string;\n otaName: string;\n status: \"UPCOMING\" | \"CANCELLED\";\n guestName: string;\n checkIn: string;\n checkOut: string;\n nights: number;\n rooms: number;\n roomTypeId: number;\n /** Major units, per room per night */\n nightlyRate: number;\n /** Major units */\n total: number;\n currency: string;\n paidByOta: boolean;\n /** true when a night had no sandbox availability left — the booking lands anyway, as an OTA booking would */\n oversold: boolean;\n createdAt: string;\n /** What this call put on the wire for the sandbox's webhook endpoints */\n webhook: {\n eventType: \"channel.booking.created\" | \"channel.booking.modified\" | \"channel.booking.cancelled\";\n /** The event is in the outbox; every active endpoint on the sandbox receives it within seconds */\n queued: boolean;\n };\n}",
|
|
2068
|
+
"SandboxBookingsList": "export interface SandboxBookingsList {\n /** Simulated OTA bookings on the sandbox, newest first */\n bookings: Array<{\n /** The PMS booking id, the one the webhook carries */\n bookingId: number;\n /** The booking reference, SBX-… — the webhook's booking.reference */\n reference: string;\n /** The pretend channel-side id */\n channelBookingId: string;\n otaName: string;\n status: \"UPCOMING\" | \"CANCELLED\";\n guestName: string;\n checkIn: string;\n checkOut: string;\n nights: number;\n rooms: number;\n roomTypeId: number;\n /** Major units, per room per night */\n nightlyRate: number;\n /** Major units */\n total: number;\n currency: string;\n paidByOta: boolean;\n /** true when a night had no sandbox availability left — the booking lands anyway, as an OTA booking would */\n oversold: boolean;\n createdAt: string;\n /** What this call put on the wire for the sandbox's webhook endpoints */\n webhook: {\n eventType: \"channel.booking.created\" | \"channel.booking.modified\" | \"channel.booking.cancelled\";\n /** The event is in the outbox; every active endpoint on the sandbox receives it within seconds */\n queued: boolean;\n };\n }>;\n}"
|
|
2069
|
+
},
|
|
2070
|
+
"topics": {
|
|
2071
|
+
"keys": "## auth\nscheme: Authorization: Bearer zsk_live_… (zsk_test_… on a sandbox)\nkeyShape: zsk_live_ (or zsk_test_ on a sandbox) + 43 base64url characters; shown once at creation; a hotel key = one property, a company key = a software vendor's hotels\nnever:\n - query string\n - x-api-key\n - user-api-key\nexpiry: The owner may give a key an end of life (expiresAt); past it every request is 401 API_KEY_EXPIRED, like a revocation. A rotation keeps the life.\nscopes:\n - scope: ari:read · does: Read availability, rates, restrictions and sync state from our record\n - scope: ari:write · does: Set availability, rates and restrictions (pushed to every connected channel)\n - scope: catalog:write · does: Create and change room types and rate plans (created on the channel manager and mirrored there)\n - scope: channel-modifiers:write · does: Set a channel's price modifier: one change moves every price sent to that channel from then on\n - scope: channel-bookings:read · does: Read the OTA bookings the channel manager delivered to this property, in the webhook's shape\n - scope: bookings:read · does: Read bookings this key created\n - scope: bookings:write · does: Create and cancel bookings in the PMS (inventory updates and reaches the channels)\n - scope: bookings:payments · does: Record a payment on a booking it creates (needs bookings:write)\nscopeRule: A key holds the scopes the owner granted at creation (editable later without rotating). Every route names the one scope it needs; a key without it is 403 SCOPE_MISSING. bookings:payments needs bookings:write. GET /property echoes this key's scopes.\nallowlist: Optional per key: up to 20 IPv4/IPv6 addresses or CIDR ranges. Set it to your servers' egress addresses: a request from anywhere else is 403 IP_NOT_ALLOWED, counts against the address's authentication budget, and is shown to the owner.\nwhichKey: Two kinds of key, one API. A HOTEL KEY is bound to one property: the property is implicit and needs no header (an X-ZS-Property naming another property is 404 PROPERTY_NOT_FOUND). A COMPANY KEY belongs to a software vendor and reaches every hotel the vendor may act on: name the hotel on every request with the X-ZS-Property header, its id from GET /properties. GET /properties says which kind you hold (keyKind). Routes, bodies and answers are the same for both.\ncompanyKey:\n header: X-ZS-Property: <property id from GET /properties>\n missingHeader: 400 PROPERTY_REQUIRED (GET /properties is the one route that needs no header)\n notReachable: 404 PROPERTY_NOT_FOUND for a property the key may not act on, whether or not it exists\n reach: A live company key reaches the hotels the vendor enrolled and any hotel whose owner allowed the vendor (Integrations → Software vendors, by the vendor code); the owner can revoke that any time and the key stops reaching the hotel at once. A test company key reaches the vendor's own sandbox only.\n scopes: Channel-manager scopes only: ari:read, ari:write, catalog:write, channel-bookings:read. A hotel's PMS bookings (bookings:*) need that hotel's own key.\n budgets: Each hotel keeps its own per-key and per-property budgets; the company key also has one budget across all its hotels (x-zimmerstack.limits.companyRequestsPerMinute).\n writes: An ARI write to a hotel whose local rates and availability are not the channels' source of truth is 409 ARI_NOT_AUTHORITATIVE (a hotel a vendor enrols is born the source of truth).\n minted: In the ZimmerStack partner portal (Developers), shown once, revoked there.\n webhooks: One company webhook endpoint (partner portal, Developers) receives the booking and sync events of every hotel a live company key reaches; each event names its hotel in property.id. A sandbox endpoint receives the vendor's sandbox. A pause holds events: they are kept (up to 90 days) and sent in order on resume. A suspension (72 hours of failures) drops them; Recover since in the portal replays them, for a hotels endpoint only from hotels that allowed the vendor when the event happened and still do.\n\n",
|
|
2072
|
+
"money-and-dates": "## dates\nYYYY-MM-DD, calendar dates in the property's timezone (GET /property); a stay occupies [checkIn, checkOut) — the checkout day is not a night\n\n## money\nrates are SENT in major units with the property's currency and RETURNED in minor units (rateMinor); stored as whole major units\n\n## writes\nabsolute values, last write wins within a request, unchanged cells are dropped before anything is written\n\n## idempotency\nheader: x-idempotency-key\nretentionDays: 7\n\n",
|
|
2073
|
+
"limits": "## limits\nrequestsPerMinute: 120\nwritesPerMinute: 30\npropertyRequestsPerMinute: 300\npropertyWritesPerMinute: 60\npropertyCellsPerMinute: 20000\nipRequestsPerMinute: 240\nmaxUpdatesPerRequest: 1000\nmaxCellsPerRequest: 5000\nmaxBodyBytes: 1048576\nhorizonDays: 365\nbookingsPerMinute: 20\npropertyBookingsPerMinute: 40\npropertyBookingsPerDay: 500\ncompanyRequestsPerMinute: 1200\nmaxNightsPerBooking: 90\n\n## rateLimits\nwindow: 60 s sliding, shared by every API machine; counters are exact, not per machine\nscopes:\n - scope: ip · perMinute: 240 · counts: every request from one address, checked before the key is read\n - scope: ip-auth · perMinute: 20 · counts: 401 answers to one address; after that the address is refused before any lookup\n - scope: requests · perMinute: 120 · counts: every request on one key\n - scope: writes · perMinute: 30 · counts: PUT requests on one key\n - scope: property · perMinute: 300 · counts: every request on all of a property's keys together (five keys are not five budgets)\n - scope: property-writes · perMinute: 60 · counts: PUT requests on all of a property's keys together\n - scope: cells · perMinute: 20000 · counts: cells a property's writes name after range expansion, charged before anything is read or written\n - scope: bookings · perMinute: 20 · counts: POST /bookings on one key\n - scope: property-bookings · perMinute: 40 · counts: POST /bookings on all of a property's keys together\n - scope: property-bookings-day · perMinute: 500 · counts: POST /bookings per property per ROLLING 24 HOURS (not per minute); the owner can raise it per property\n - scope: company · perMinute: 1200 · counts: every request on one company key, across all its hotels (each hotel keeps its own key and property budgets too)\n - scope: global · perMinute: 3000 · counts: every request on the Connect API, all keys and addresses\nheaders:\n RateLimit-Policy: on every answer, one quoted policy per key scope — \"key\";q=120;w=60, \"key-writes\";q=30;w=60\n RateLimit: on every answer, what is left and when it refills — \"key\";r=117;t=42, \"key-writes\";r=29;t=42\n Retry-After: on every 429, whole seconds to wait; the body's data.scope says which budget refused\nonRefusal: 429 RATE_LIMITED. Wait Retry-After, then resend the same request. Never retry in a tight loop; never retry any other 4xx.\ntooLarge: 413 when the JSON body exceeds 1048576 bytes; split the updates array\npace:\n - Batch: one PUT per resource carrying ranges (dateFrom..dateTo, optional days) — a 365-night calendar for three plans is a handful of updates, not a thousand\n - Send on change, not on a timer: unchanged cells are dropped and cost nothing, but they still spend your request budget\n - Read RateLimit on every answer and slow down when r approaches 0, instead of waiting for a 429\n - Reuse x-idempotency-key on a retry so a timed-out request can never land twice\n - Poll GET /batches/{batchId} and GET /sync no more than every 15 s; the push to the channels is asynchronous and bounded by the channel manager's own budget\nchannelManager:\n whyAsynchronous: Your 202 means the cells are in our record. Pushing them to the channel manager is paced by its budget — ten rate/restriction reads a minute for the whole account and a per-property write budget — so a full calendar takes minutes, never seconds, and is never lost.\n whatWeDo: We coalesce your cells into the fewest channel-manager calls, drop what did not change, pace every call, stop before the channel manager's last token, and back off on its Retry-After — you never have to think about its limits, only about ours.\n\n",
|
|
2074
|
+
"bookings": "## bookings\nwho: Hotels that run the ZimmerStack PMS and their OWN booking engine: hand us the reservation your website sold and it lands in the PMS exactly as a front-desk booking — guest, folio, inventory, channels.\npricing: You price the stay. Send the nightly rate you charged per room; we store it and never re-quote. currency must equal the property's.\ninventory: Availability is checked inside the booking transaction under the property's inventory lock (a sold-out night is 409 NO_AVAILABILITY, nothing written). The inventory event commits with the booking; the drain pushes the new counts to every connected channel within seconds.\nidempotency: externalReference is YOUR reservation id and is unique per property: the same value again from the same key (or the key it was rotated from), while that booking is live, returns the same booking with HTTP 200 and replay: true. Use it on every retry. A reference another key already used on this property, or one that belongs to a booking you cancelled, is 409 EXTERNAL_REFERENCE_REUSED: after a cancel, the new stay needs a new reference.\npayments: A payment is recorded only when the key holds bookings:payments and never above the stay total. Nothing collected = omit payment; the desk collects at check-in.\nguest: By default the guest hears from YOUR site only; the owner can switch on our confirmation per property (admin → Developers → Settings).\ncancel: POST /bookings/{bookingId}/cancel cancels the whole booking and re-opens its nights on the channels; a booking already checked in is 409 BOOKING_NOT_CANCELLABLE. Date or room changes: cancel and re-create under a NEW externalReference (a modify endpoint is planned).\nscope: A key reads and cancels only the bookings it (or the key it was rotated from) created on its property; another key's, front-desk and OTA bookings are never visible (BOOKING_NOT_FOUND).\n\n",
|
|
2075
|
+
"budgets-and-standing": "## shield\nwhat: On top of the per-minute budgets, every property has budgets over an hour and a day, hard limits on its structure, and a standing ZimmerStack can change. They exist because every changed cell is forwarded by the channel manager to every connected channel: an integration that re-sends, flaps or loops is the hotel's and the channels' problem within a minute. GET /property carries this property's own figures (limits), what it has used (usage) and where it stands (shield).\ncounted: A budget counts CHANGED cells: cells whose value differs from our record. Re-sending a calendar we already hold costs nothing here. So send on change, in ranges.\nbudgets:\n - scope: cells-hour · window: one clock hour (UTC) · floor: 10000 · counts: changed cells, all of a property's keys together. At least this many; a larger property gets two of its own full calendars an hour\n - scope: cells-day · window: rolling 24 hours · floor: 30000 · counts: changed cells, all of a property's keys together. At least this many; a larger property gets six of its own full calendars a day\n - scope: vendor-cells-day · window: rolling 24 hours · floor: 150000 · counts: a software vendor's changed cells across all its hotels (company keys and keys it minted)\n - scope: structure-creates · window: 60 s sliding · floor: 20 · counts: new room types and rate plans per property; also the most one request may create (TOO_MANY_NEW_ENTITIES)\n - scope: structure-creates-day · window: rolling 24 hours · floor: 300 · counts: new room types and rate plans per property\n - scope: structure-edits-day · window: rolling 24 hours · floor: 300 · counts: changed room types and rate plans per property\n - scope: structure-deletes-day · window: rolling 24 hours · floor: 60 · counts: deleted room types and rate plans per property\n - scope: vendor-structure-creates-day · window: rolling 24 hours · floor: 500 · counts: a software vendor's new room types and rate plans across all its hotels\n - scope: vendor-remote-properties-day · window: rolling 24 hours · floor: 10 · counts: hotels a software vendor puts on the channel manager for the first time\n - scope: modifier-changes-day · window: rolling 24 hours · floor: 6 · counts: changes to a channel's price modifier per property (PUT /channels/{channelId}/modifier); steps the channel already holds are not counted\n - scope: rate-resends-day · window: rolling 24 hours · floor: 3 · counts: times a property's prices are sent to the channels again (POST /rates/resend)\ncaps:\n maxRoomTypes: 18\n maxRatePlans: 180\n why: Each cap sits a tenth under what the channel manager includes for that kind of property before it bills extra, so an integration never runs a hotel into overage. GET /property carries this property's own caps.\n byCategory:\n - category: hotel · maxRoomTypes: 18 · maxRatePlans: 180 · ratePlansPerRoomType: null\n - category: vacation rental · maxRoomTypes: 45 · maxRatePlans: 405 · ratePlansPerRoomType: 9\n onRefusal: 409 CATALOG_LIMIT_REACHED (details.limit, details.current, details.requested). Delete what is unused, or ask ZimmerStack support.\nonRefusal: 429 RATE_LIMITED with data.scope naming the budget and Retry-After in whole seconds: to the next clock hour for cells-hour, until enough of the day has aged out for a rolling day. Nothing was written. Wait, then send what still needs to change.\nsafetyLane: A hotel must not oversell because its integration ran out of budget or was paused. A write that only CLOSES inventory (a lower availability count or 0, or stopSell / closedToArrival / closedToDeparture switched on, and nothing else in the request) is still accepted in both cases, against its own hourly allowance (at least 500 cells); its 202 carries lane: true. A write that opens inventory or changes a price waits.\npriceBand:\n what: PUT /rates takes prices in MAJOR units; reads answer in MINOR units. A price below a tenth or above ten times its plan's standing price (the plan's defaultRate, or its room type's base rate) is not taken on trust: the whole request is 422 RATE_OUT_OF_BAND and nothing is written. A plan with no standing price is never judged.\n minPct: 10\n maxPct: 1000\n wayOut: If the price is meant, move the plan's standing price first (PUT /catalog/rate-plans defaultRate): the band moves with it. ZimmerStack support can set a property to warn only (the 202 then carries priceWarnings) or switch its band off; the hotel's owner asks for it.\nstanding:\n levels:\n CLEAR: Nothing held against the integration.\n WATCH: Something notable happened (a budget was used up). Nothing is refused.\n PAUSED: Only writes that close inventory are accepted (the safety lane); anything else is 429 RATE_LIMITED with data.scope shield-pause and a Retry-After that ends with the pause. Set automatically for a while when the channel manager refuses the integration's values or it uses up a budget on two of three days (15 minutes, then 1 hour, 6 hours, a day), or by ZimmerStack support until released.\n SUSPENDED: Every write is 403 WRITES_SUSPENDED until ZimmerStack support releases it.\n frozen: 503 WRITES_FROZEN with Retry-After: ZimmerStack has paused every integration's writes at once. Rare, short, and never your integration alone.\n never: Reads, GET /channel-bookings, webhooks and POST /bookings are never refused by any of this: a guest's reservation and its news always travel.\nrejectedValues: A rate or restriction value the channel manager itself refuses is held, not re-sent: GET /sync counts it (rates.parkedCells), its batch reads failed with the reason, and the property's other cells keep landing. Send a corrected value for those nights.\nsandbox: A sandbox meets the same budgets, limits and band on its own property, so you learn them before going live. It is never frozen and never counts against your company's budgets.\n\n",
|
|
2076
|
+
"room-types-and-rate-plans": "## structure\nwhat: PUT /catalog/room-types and PUT /catalog/rate-plans (scope catalog:write) let the PMS own the hotel's structure: an upsert by ref, your own id. A new entity is created on the channel manager at once; every later change mirrors there with retries and a nightly drift check; the answer names our id, the action and the sync status per entity. GET /catalog carries ref and sync from now on.\nadoption: A room type the owner already made with the same name (and no ref) becomes yours by ref (action: adopted); a plan likewise under the same room type. A plan never moves between room types (409 CATALOG_CONFLICT): delete it and send it again.\nswitchOn: A channel-manager-only hotel with no channel-manager property yet gets one on the first write, and the channel manager is switched on once a room type and a plan are mapped; channelManager.enabled in the answer says where it stands, reason why not.\nidempotent: Twice over: ref is the upsert key here, and the channel-manager create adopts an existing entity with the same title instead of creating it again, so a retry never duplicates on either side. Send x-idempotency-key on retries as on every write.\nnotHere: A room count after creation (it lives on the channel manager), photos, descriptions, amenities, cancellation policies and stay rules: the owner's Rooms & rates screen, or the restrictions routes.\nsandbox: On a sandbox everything lands locally and reads IN_SYNC, through the same code path.\n\n",
|
|
2077
|
+
"ota-bookings": "## channelBookings\nwhat: GET /channel-bookings lists the OTA bookings the channel manager delivered to the property — the SAME booking object the webhooks carry, so one parser serves both. Scope channel-bookings:read, granted separately from the ARI pair.\nsince: since is on the booking's last change (created, modified or cancelled), default the last 7 days; page with limit (≤100) and repeat with since = the last item's updatedAt while more is true.\nwhy: Recover a missed webhook, or poll instead of receiving: the webhooks remain the push path, this is the pull path over the same shape.\nnever: Front-desk, booking-engine and Connect API bookings are never listed here; they are not channel bookings.\n\n",
|
|
2078
|
+
"channels-and-modifiers": "## channels\nwhat: GET /channels lists the connections the channel manager holds for the property, from our record (the nightly settings sweep), with every unresolved problem the channel manager reported (rate_error, sync_error, disconnect_channel, the inventory pipe out of sync).\nfreshness: asOf says when the list was captured; a channel connected today appears after the next sweep. Problems are live.\npushed: The same problems are pushed as webhooks: channel.sync.alert when one is raised, channel.sync.recovered when the inventory pipe recovers (docs/webhooks).\n\n## modifiers\nwhat: One price per rate plan per night goes to every channel the plan is mapped to. A channel's modifier is the one thing that differs per channel: up to five ordered steps (raise or lower, by a percentage or a fixed amount in major units) the channel manager applies to every price it sends that channel. GET /channels shows each channel's steps; PUT /channels/{channelId}/modifier replaces them (scope channel-modifiers:write, granted separately: one call moves every price on that channel).\ntakesEffect: A modifier applies to prices sent to the channel after the change. Prices already on the channel stay as they are until those nights are sent again.\nresend: POST /rates/resend (scope ari:write) sends the property's prices and stay rules to the channels again, unchanged, so every night picks the current modifiers up. Re-sending the same price through PUT /rates does nothing: a value our record already holds is dropped before anything is sent. The re-send is the way, and a hotel may ask for it only a few times a day (data.scope rate-resends-day).\nworkflow:\n - GET /channels: find the channel (channelId, kind) and read the steps it holds\n - PUT /channels/{channelId}/modifier with the whole list of steps; [] removes the modifier\n - POST /rates/resend if nights already on the channel should move too, then watch rates.dirtyCells on GET /sync fall to 0\nband:\n maxDecreasePct: 50\n maxIncreasePct: 100\nbandRule: The steps together may not lower a price by more or raise it by more than the band: 422 MODIFIER_OUT_OF_BAND, nothing changed. A fixed amount is judged at the property's lowest and highest standing price.\nshared: A connection that serves more than one property (one Airbnb or Booking.com account for sister hotels) is refused, 409 CHANNEL_SHARED: its modifier would move another hotel's prices. The hotels' owner sets it in ZimmerStack.\ngrid: GET /rates always answers the price before any modifier. What a channel is sent is that price with the channel's steps applied in order.\nmarkupPlan: markupPlan on GET /channels is a separate adjustment the owner may have set in the ZimmerStack Channels app; it applies before the modifier and is read-only here.\nsandbox: A sandbox has three pretend channels (Booking.com, MakeMyTrip, Agoda) so the whole workflow can be tried with a test key; nothing leaves our record.\n\n",
|
|
2079
|
+
"sandbox": "## sandbox\nwhat: The owner creates a sandbox from a real property (admin → Developers → API keys, Channels → Integrations): a copy of its room types and rate plans that no channel ever sees. Keys minted there start with zsk_test_ and work ONLY there; a live key never reaches it.\npushes: Every route behaves as in production. A push lands in our record and stops: GET /sync reports IN_SYNC and GET /batches/{batchId} reports landed within a minute, through the same code path as a live property. GET /property says sandbox: true.\nmodify: POST /sandbox/bookings/{bookingId}/modify sends a modified revision — new dates, length, rooms or guest — and the REAL channel.booking.modified webhook with changes and previous, the old nights back on availability and the new ones off.\nbookings: POST /sandbox/bookings simulates an OTA booking end to end — the booking, the sandbox's availability moved down, the inventory event, and the REAL channel.booking.created webhook to every endpoint registered on the sandbox. POST /sandbox/bookings/{bookingId}/cancel does the same for a cancellation. A live key gets 403 SANDBOX_ONLY.\nlimits: The same budgets as production (one sandbox per owner, at most five keys). Nothing you do there is billed or pushed to a channel.\ngoLive: Ask the owner for a zsk_live_ key on the real property, swap the key, keep the code.\n\n",
|
|
2080
|
+
"errors": "Every refusal is { statuscode, message, data: { code, … } }. Branch on data.code (the client: err.code): it is stable. message is for a person and may change.\nRetry only 429, 5xx and IDEMPOTENCY_IN_FLIGHT, after Retry-After; every other code is a verdict on the request. The client does this by itself.\n\n- API_KEY_INVALID (401): \"Unauthorized\"\n- API_KEY_REVOKED (401): \"Unauthorized\"\n- API_KEY_EXPIRED (401): \"Unauthorized\"\n- CONNECT_API_NOT_CONFIGURED\n- IP_NOT_ALLOWED (403): \"This API key may not be used from this address. The property owner restricts it to an allowlist.\"\n- SCOPE_MISSING (403): \"This API key does not have the bookings:write scope. The property owner grants scopes when creating or editing a key.\"\n- PROPERTY_UNAVAILABLE (409): \"This property is not available to the API any more. Contact the property owner.\"\n- CHANNEL_MANAGER_DISABLED (409): \"This property's channel manager is switched off, so writes would not reach any channel. Contact the property owner.\"\n- PMS_NOT_AVAILABLE (409): \"This property runs the channel manager only; there is no PMS to put a booking in.\"\n- VALIDATION (400): \"updates[0].available: Expected number, received string\"\n- RANGE_INVALID (400)\n- HORIZON (400): \"updates[0]: 2028-01-01 is beyond the horizon (last writable night is 2027-10-12, today + 365 days)\" [PUT /availability, PUT /rates, PUT /restrictions]\n- TOO_MANY_UPDATES (400) [PUT /availability, PUT /rates, PUT /restrictions]\n- TOO_MANY_CELLS (400): \"a request may name at most 5000 cells (entity × night); split the calendar into several requests\" [PUT /availability, PUT /rates, PUT /restrictions]\n- UNKNOWN_ROOM_TYPE (400) [PUT /catalog/rate-plans, PUT /availability, POST /bookings, POST /sandbox/bookings]\n- UNKNOWN_RATE_PLAN (400): \"rate plan(s) 77 do not belong to this property (see GET /catalog)\" [PUT /rates, PUT /restrictions, POST /bookings]\n- CURRENCY_MISMATCH (400): \"rates must be sent in INR (got EUR)\" [PUT /rates, POST /bookings]\n- RATE_LIMITED (429): \"Too many requests on this API key. Slow down and retry after the Retry-After interval.\"\n- NOTHING_ACCEPTED (422): \"exceptions are switched off for this property — move the base rate instead\" [PUT /availability, PUT /rates, PUT /restrictions]\n- BATCH_NOT_FOUND (404): \"Batch not found.\"\n- IDEMPOTENCY_KEY_INVALID\n- IDEMPOTENCY_KEY_REUSED (409): \"This idempotency key was already used with a different request body.\"\n- IDEMPOTENCY_IN_FLIGHT\n- STAY_INVALID (400): \"checkIn 2026-10-01 is in the past (today at the property is 2026-10-20)\" [POST /bookings, POST /sandbox/bookings, POST /sandbox/bookings/{bookingId}/modify]\n- UNKNOWN_ROOM_TYPE_FOR_PLAN (400) [POST /bookings]\n- OCCUPANCY_EXCEEDED (400): \"rooms[0]: Deluxe takes at most 3 adults (got 4)\" [POST /bookings]\n- NO_AVAILABILITY (409): \"room type 412 has 0 left on 2026-12-21; 1 requested\" [POST /bookings]\n- EXTERNAL_REFERENCE_REUSED (409) [POST /bookings]\n- PAYMENT_NOT_ALLOWED (403): \"This API key may not record payments. The property owner grants the bookings:payments scope.\" [POST /bookings]\n- PAYMENT_EXCEEDS_TOTAL (400): \"payment.amount 30000.00 exceeds the stay total 27000.00\" [POST /bookings]\n- BOOKING_NOT_FOUND (404): \"Booking not found.\"\n- BOOKING_NOT_CANCELLABLE (409): \"Booking already checked in. Ask the hotel to handle it at the desk.\"\n- MODULE_NOT_ENTITLED (402): \"This property's plan does not include the PMS.\"\n- SANDBOX_ONLY (403): \"The sandbox routes answer only to a test key (zsk_test_…) on a sandbox property. This key is a live key.\" [POST /sandbox/bookings, POST /sandbox/bookings/{bookingId}/cancel, POST /sandbox/bookings/{bookingId}/modify]\n- ROOM_TYPE_NOT_FOUND (404): \"That room type doesn't exist.\"\n- RATE_PLAN_NOT_FOUND (404): \"That rate plan doesn't exist.\"\n- CATALOG_CONFLICT (409): \"A room type with this name already exists.\" [PUT /catalog/room-types, PUT /catalog/rate-plans]\n- CATALOG_BUSY (409): \"Another room-type or rate-plan write for this property is still running. Retry in a few seconds.\"\n- CHANNEL_MANAGER_ERROR (502): \"The channel manager refused the delete. Nothing changed here; try again in a moment.\"\n- PROPERTY_REQUIRED (400): \"This is a company key: name the hotel in the X-ZS-Property header, with its id from GET /properties.\"\n- PROPERTY_NOT_FOUND (404): \"No property with this id that this key may act on (see GET /properties).\"\n- ARI_NOT_AUTHORITATIVE (409): \"This property's local rates and availability are not the channels' source of truth yet, so API writes would never be pushed. Contact ZimmerStack support.\"\n- ROUTE_NOT_FOUND (404): \"No GET /api/v1/connect-api/v1/nope in the Connect API; the contract lists every route.\"\n- PAYLOAD_TOO_LARGE (413): \"The request body is larger than the API accepts. Split the updates array across requests.\"\n- AUTH_BACKEND_UNAVAILABLE\n- BOOKING_NOT_MODIFIABLE (409): \"A cancelled booking cannot be modified from the sandbox.\"\n- SANDBOX_NOT_FOUND\n- SANDBOX_INCOMPLETE\n- WRITES_FROZEN (503): \"ZimmerStack has paused every write to the channel manager for now. Nothing was written. Retry after the Retry-After interval; reads and bookings are not affected.\"\n- WRITES_SUSPENDED (403): \"ZimmerStack has suspended writes for this integration: it kept sending after repeated notices. Reads and bookings still work. Contact ZimmerStack support to have it released.\" [PUT /availability, PUT /rates, PUT /restrictions, PUT /channels/{channelId}/modifier, POST /rates/resend]\n- SHIELD_UNAVAILABLE (503): \"The write could not be checked against this property's budgets right now. Nothing was written. Retry after the Retry-After interval.\"\n- CATALOG_LIMIT_REACHED (409): \"This property holds 298 rate plans and may hold 300; this request would add 6. Delete what is unused, or ask ZimmerStack support to raise the limit.\" [PUT /catalog/room-types, PUT /catalog/rate-plans]\n- TOO_MANY_NEW_ENTITIES (400): \"This request would create 34 new room types or rate plans; one request may create at most 20. Entities that already exist do not count. Split the new ones across requests.\" [PUT /catalog/room-types, PUT /catalog/rate-plans]\n- RATE_OUT_OF_BAND (422): \"rate plan 901 on 2026-12-01: 45 INR is below the band around this plan's standing price 4500 INR (lowest accepted 450) (and 29 more cells). Rates are sent in major units (4500, not 450000). If the price is meant, change the plan's standing price first (PUT /catalog/rate-plans defaultRate), or ask ZimmerStack support to lift the band for this property.\" [PUT /availability, PUT /rates, PUT /restrictions]\n- CHANNEL_NOT_FOUND (404): \"No connected channel with this id on this property. GET /channels lists them.\" [PUT /channels/{channelId}/modifier]\n- CHANNEL_SHARED (409): \"This connection serves more than one property, so its modifier would move another hotel's prices too. It is set by the hotels' owner in ZimmerStack, not through this API. Nothing was changed.\" [PUT /channels/{channelId}/modifier]\n- MODIFIER_OUT_OF_BAND (422): \"These steps would change what the channel is sent by +180%; a channel's modifier must stay between 50% lower and 100% higher. Nothing was changed.\"\n",
|
|
2081
|
+
"webhooks": "ZimmerStack POSTs a signed JSON event to the endpoint the hotel's owner (or a software vendor) registered.\n- Events: channel.booking.created, channel.booking.modified, channel.booking.cancelled (an OTA booking arrived, changed, was cancelled); channel.sync.* (a connection's health); zimmerstack.ping (a test).\n- Envelope: { id, type, apiVersion, occurredAt, mode: \"live\" | \"test\", property: { id, name, currency, timezone }, data: { booking }, changes, previous }.\n- Signature (Standard Webhooks): headers webhook-id, webhook-timestamp, webhook-signature. The signature is \"v1,\" + base64(HMAC-SHA256(secret, id + \".\" + timestamp + \".\" + rawBody)); the secret is whsec_ + base64. During a rotation the header carries two, space-separated.\n- Verify the RAW body before parsing it, compare in constant time, and refuse a timestamp more than five minutes old. With this package: const event = await verifyWebhook(rawBody, headers, secret); it throws ZimmerStackWebhookError otherwise.\n- Deliveries are at-least-once and may arrive out of order: dedupe on event.id, order on occurredAt. Answer 2xx within seconds and do slow work afterwards.\n- GET /channel-bookings (zs.channelBookings.all({ since })) recovers what an endpoint missed. It is not a polling loop.\n",
|
|
2082
|
+
"the-package": "@zimmerstack/connect 0.1.0: npm install @zimmerstack/connect. Node 20 or newer, on a server only, zero dependencies.\n\nconst zs = new ZimmerStack(); // reads ZIMMERSTACK_CONNECT_KEY; make one per process and reuse it\n\nEvery operation has a method: each operation's lookup names it (\"With the package\"). On top of those:\n- zs.grid.load(from, to): the whole rate grid for a window, ready for a screen. Rows are room types with their rate plans, columns are nights; prices in MAJOR units. Three reads (four the first time; the catalog is kept ten minutes).\n- zs.grid.save(edits): what a person changed, as single nights { availability?, rates?, restrictions? }. Folds nights into ranges, fills in the currency, splits a large save, sends one request per resource in turn. Returns the accepted answers, each with a batchId.\n- zs.batches.wait(batchId): asks every 15 seconds at the fastest, for at most five minutes; returns the last status (\"landed\", \"failed\", or still \"pending\").\n- zs.channelBookings.all({ since }): an async iterator over every OTA booking changed since then, following the cursor.\n- zs.forProperty(propertyId): a software vendor's company key acting on one hotel; shares the pace of the client it came from.\n- zs.request(\"GET /sync\"): any operation by its contract name, typed.\n- Pure helpers: eachDate(from, to), addDays(date, n), toRanges(cells), chunk(updates), buildGrid(parts), channelPrice(rate, steps).\n- verifyWebhook(rawBody, headers, secret): returns the event or throws ZimmerStackWebhookError.\n- MODIFIER_TAKES_EFFECT: the sentence to show where a person saves a channel's modifier. LIMITS, ERROR_CODES, SCOPES: the contract's own.\n\nA refusal is a ZimmerStackError: code (stable; branch on it), message (for a person; show it), status, retryable (false = fix the request, never resend), retryAfterSeconds, scope (which budget), details, operation.\n\nOptions: apiKey, propertyId, timeoutMs (30 s), maxRetries (3), maxWaitSeconds (120), onEvent (every answer, wait and retry, for logs; never the key), fetch (a stand-in for tests), allowLiveWritesInTests.\n\nWhat it keeps by itself, so do not re-implement it or wrap its calls in a retry loop:\n- Server only: it refuses a browser and React Native, sends the key to ZimmerStack only, never follows a redirect with it and never prints it.\n- Reads the RateLimit header and waits before a budget runs out. Writes go one at a time, in order; at most four reads at once.\n- Retries 429, 5xx and a network failure (four attempts, a growing wait, the same idempotency key); throws anything else at once. A wait over two minutes is handed back.\n- A write the server keeps no idempotency record for is not resent when its outcome is unknown.\n- Splits a write at 1,000 updates or 5,000 cells.\n- After API_KEY_INVALID, API_KEY_REVOKED or API_KEY_EXPIRED it stops calling.\n- A zsk_live_ key under a test runner may read but not write.\n"
|
|
2083
|
+
}
|
|
2084
|
+
};
|