Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: nisebookings — public Bookings API
version: '2026-10-13'
summary: Hosted appointment booking, packages, waiting lists and event tickets.
description: 'Public, unauthenticated API for one business account, identified by its **public key** in the
path (Instellingen → Insluiten in the admin). Used by the embeddable widgets and by custom
front-ends. Test against a 24-hour sandbox: `POST https://app.nisebookings.com/api/sandbox`.
## Rules that matter
- All instants are ISO 8601 UTC. `from`/`until` are business-local calendar dates (`YYYY-MM-DD`).
- The server never trusts client amounts, staff, extras or persons: every request is re-resolved
and re-checked against the live schedule, then written transactionally with per-staff locks.
- Two customers can never book the same seat: the loser of a race receives `409 slot_unavailable`
with the 0-based index of the failing item.
- Send back the exact `start` (and `staffId`) that a slot search returned. Times are never
constructed client-side.
- CORS: the request `Origin` is reflected when the account''s allowed-websites list (`allowedOrigins`) is empty or
contains that origin; otherwise `403 origin_not_allowed`. `OPTIONS` is answered with 204.
- Responses are `Cache-Control: no-store`, except `GET services` (`public, max-age=60`).
- Retries: send an `Idempotency-Key` header on `POST bookings` and `POST tickets`. A retry with the
same key and body returns the original response (`Idempotent-Replayed: true`) instead of creating
a second order. Keys are kept 24 hours.
## Versioning and rate limits
- Send `X-Api-Version: 2026-10-13` to pin a version; omit it for the latest, which every response
echoes — except the unknown-version `400` itself. An unknown value is `400 bad_request` and lists
the supported `versions`.
- Per minute and per client IP: 120 requests, or 20 for booking commits (`POST bookings`,
`POST bookings/{token}/reschedule`, `POST uploads` and `POST tickets`); `OPTIONS` preflights have
their own bucket of 120. Over that is `429 rate_limited`. Counted responses carry `X-RateLimit-Limit`,
`X-RateLimit-Remaining` and `X-RateLimit-Reset` (epoch seconds); a 429 adds `Retry-After`
(seconds). The unknown-version `400` and `OPTIONS` preflights carry no rate-limit state.
- A breaking change ships as a new dated version; the old one stays supported for at least six
months, announced with `Deprecation` and `Sunset` headers.
- This document is served on the app origin as `GET /openapi.json`; the management API spec as
`GET /api/v1/openapi.json`.
Limits: 60 items per order, 10 chain parts, 52 recurrence occurrences, 31 days per slots call,
2000-character notes, 40-character coupon codes, 1–50 tickets per type (max 20 types).
Errors use stable `error` codes: `not_found`, `origin_not_allowed`, `validation`,
`slot_unavailable`, `sold_out`, `sales_closed`, `payment_unavailable`, `bad_request`,
`idempotency_in_progress`, `idempotency_mismatch`, `rate_limited`, `server`.'
license:
name: Proprietary
servers:
- url: https://app.nisebookings.com
tags:
- name: Bookings
paths:
/api/public/{key}/quote:
parameters:
- $ref: '#/components/parameters/Key'
- $ref: '#/components/parameters/ApiVersion'
post:
tags:
- Bookings
summary: Price an order
description: 'Computes the price for fully resolved items (each with a `start`). The server recomputes the
same numbers for `POST bookings`, so this is only for display. Call it again after a coupon
changes. The legacy single-item body (`service`, `staff`, `start`, …) is still accepted.'
operationId: postQuote
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
items:
type: array
maxItems: 60
items:
allOf:
- $ref: '#/components/schemas/ItemInput'
- type: object
required:
- start
coupon:
type: string
maxLength: 40
payFull:
type: boolean
gateway:
$ref: '#/components/schemas/Gateway'
responses:
'200':
description: Quote
content:
application/json:
schema:
$ref: '#/components/schemas/Quote'
'400':
$ref: '#/components/responses/BadRequest'
'403':
$ref: '#/components/responses/OriginNotAllowed'
'404':
$ref: '#/components/responses/NotFound'
'409':
description: An item's slot is no longer available
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
$ref: '#/components/responses/Validation'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/ServerError'
/api/public/{key}/uploads:
parameters:
- $ref: '#/components/parameters/Key'
- $ref: '#/components/parameters/ApiVersion'
post:
tags:
- Bookings
summary: Upload a customer file
description: 'One file for an intake question of kind `file` (see GET /services): `multipart/form-data` with a
`file` part. JPEG, PNG, WebP or PDF, at most 5 MB. Send the returned `id` back as the answer to
the file question when booking. Uploads count against the commit rate limit (20/min per address).
The file is private: the account reads it through a short-lived signed URL (admin, mails). An
upload that no booking uses is deleted 24 hours after it was made.'
operationId: postUpload
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required:
- file
properties:
file:
type: string
format: binary
description: JPEG, PNG, WebP or PDF, at most 5 MB.
responses:
'201':
description: Stored
content:
application/json:
schema:
type: object
required:
- id
- name
- size
properties:
id:
type: string
format: uuid
description: 'Upload id: the answer to the file question.'
name:
type: string
description: The original file name.
size:
type: integer
'400':
$ref: '#/components/responses/BadRequest'
'403':
$ref: '#/components/responses/OriginNotAllowed'
'404':
$ref: '#/components/responses/NotFound'
'413':
$ref: '#/components/responses/TooLarge'
'422':
$ref: '#/components/responses/Validation'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/ServerError'
/api/public/{key}/bookings:
parameters:
- $ref: '#/components/parameters/Key'
- $ref: '#/components/parameters/ApiVersion'
post:
tags:
- Bookings
summary: Create an order
description: 'One request = one order = one payment. Re-checks every item against the live schedule and
writes transactionally. For `gateway: "mollie"` the response contains a `checkoutUrl`; the
customer''s confirmation mail is deferred until the payment completes. For local/free orders
the mail is sent immediately.'
operationId: postBookings
parameters:
- $ref: '#/components/parameters/IdempotencyKey'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- items
- name
- email
properties:
items:
type: array
minItems: 1
maxItems: 60
items:
allOf:
- $ref: '#/components/schemas/ItemInput'
- type: object
description: 'A timed item needs `start`; a package purchase (`kind: package`) must not have one.'
series:
type: object
description: Rules per series key used by the items.
additionalProperties:
$ref: '#/components/schemas/RecurrenceRule'
name:
type: string
maxLength: 255
email:
type: string
format: email
maxLength: 255
phone:
type: string
maxLength: 50
notes:
type: string
maxLength: 2000
gateway:
$ref: '#/components/schemas/Gateway'
coupon:
type: string
maxLength: 40
payFull:
type: boolean
returnUrl:
type: string
format: uri
maxLength: 2000
description: 'Required for Mollie. Must be http(s) and its origin must be in the account''s
allowlist, or equal the request `Origin` when no allowlist is set. The server
appends `nb_pay=<payment token>` on return.
'
responses:
'201':
description: Order created
content:
application/json:
schema:
$ref: '#/components/schemas/BookingResult'
'400':
$ref: '#/components/responses/BadRequest'
'402':
$ref: '#/components/responses/PlanLimit'
'403':
$ref: '#/components/responses/OriginNotAllowed'
'404':
$ref: '#/components/responses/NotFound'
'409':
description: Slot taken (`slot_unavailable`; `item` is the failing item index), or `idempotency_in_progress`
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
$ref: '#/components/responses/Validation'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/ServerError'
'502':
description: Mollie could not be reached. The order and its payment are written and then set to rejected, so no visit stays booked; answer the customer with a retry or an on-site payment option.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/public/{key}/bookings/{token}/reschedule:
parameters:
- $ref: '#/components/parameters/Key'
- name: token
in: path
required: true
description: The booking token from `POST bookings` (the one in the `/b/<token>` cancel link).
schema:
type: string
pattern: ^[0-9a-f]{48}$
- $ref: '#/components/parameters/ApiVersion'
post:
tags:
- Bookings
summary: Reschedule the customer's own booking
description: 'Moves one booking to another time, addressed by its 48-hex token (the `/b/` link). Keeps
the service, staff and duration; `staff` picks another staff member who offers the service.
The new slot is re-checked exactly like a new booking — overlap, capacity, schedule and holiday
conflicts answer `409 slot_unavailable`, and there is no `force`. Allowed while the booking is
`pending` or `approved` and at least the account''s cancel window (`cancelMinMinutes`) before its
start: the same limit as cancelling, otherwise `409 cannot_reschedule`.'
operationId: postBookingReschedule
parameters:
- $ref: '#/components/parameters/IdempotencyKey'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- start
properties:
start:
type: string
description: The exact `start` of a slot from `GET slots`.
staff:
type: string
format: uuid
description: A staff member who offers the appointment's service; omitted = keep the current one.
responses:
'200':
description: Moved to the new time
content:
application/json:
schema:
type: object
required:
- start
- end
properties:
start:
type: string
description: New start (ISO 8601 UTC).
end:
type: string
description: New end; the appointment keeps its duration.
'400':
$ref: '#/components/responses/BadRequest'
'403':
$ref: '#/components/responses/OriginNotAllowed'
'404':
$ref: '#/components/responses/NotFound'
'409':
description: '`cannot_reschedule` (not pending/approved, or inside the cancel window / already started) or `slot_unavailable` (taken, outside the schedule or on a holiday)'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
$ref: '#/components/responses/Validation'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/ServerError'
components:
schemas:
Quote:
type: object
required:
- subtotal
- discount
- tax
- total
- payNow
- due
- paidType
- coupon
- items
- onSite
properties:
subtotal:
type: number
discount:
type: number
tax:
type: number
description: VAT part of the total (included) or on top (excluded).
total:
type: number
payNow:
type: number
description: Amount requested now.
due:
type: number
description: Amount to pay later (deposit mode).
paidType:
type: string
enum:
- in_full
- deposit
coupon:
oneOf:
- type: 'null'
- type: object
required:
- code
- status
properties:
code:
type: string
status:
type: string
enum:
- ok
- invalid
- expired
items:
type: array
items:
type: object
required:
- price
- extras
- payNow
properties:
price:
type: number
extras:
type: number
payNow:
type: boolean
onSite:
type: number
description: 'Recurring ''first'': amount of occurrences paid on site.'
Gateway:
type: string
enum:
- local
- mollie
description: '`local` = pay on site, `mollie` = online (iDEAL/card on Mollie''s page).'
BookingFields:
type: object
description: Answers to the service's intake questions as stored on the booking; a `file` answer is `{id, name}`.
additionalProperties: true
PaymentRef:
type: object
required:
- status
properties:
status:
type: string
enum:
- pending
- completed
- none
checkoutUrl:
type: string
description: Present for Mollie orders; redirect the browser here.
BookingResult:
type: object
required:
- orderToken
- items
- payment
properties:
id:
type: string
description: First item's booking id (legacy single-item clients).
kind:
type: string
enum:
- booking
- package
description: First item's kind (legacy position).
status:
type: string
enum:
- pending
- approved
- rejected
- cancelled
- done
- waitlisted
- package
description: First item's status; `package` for a package purchase.
start:
type:
- string
- 'null'
serviceTitle:
type: string
staffName:
type: string
fields:
$ref: '#/components/schemas/BookingFields'
description: The stored answers of the first item (legacy position), keyed by field id.
orderToken:
type: string
description: 48-hex order token.
items:
type: array
items:
type: object
required:
- id
- status
- serviceTitle
- staffName
properties:
id:
type: string
kind:
type: string
enum:
- package
description: Present for package purchases.
status:
type: string
description: '`package` for package purchases, else a booking status.'
start:
type:
- string
- 'null'
serviceTitle:
type: string
staffName:
type: string
fields:
$ref: '#/components/schemas/BookingFields'
description: The stored answers, keyed by field id.
payment:
$ref: '#/components/schemas/PaymentRef'
Error:
type: object
required:
- error
properties:
error:
type: string
enum:
- not_found
- origin_not_allowed
- validation
- slot_unavailable
- cannot_reschedule
- sold_out
- sales_closed
- payment_unavailable
- plan_limit
- too_large
- bad_request
- idempotency_in_progress
- idempotency_mismatch
- rate_limited
- server
message:
type: string
description: 'Present for `plan_limit`: a sentence for the customer, in the account language.'
limit:
type: integer
description: 'Present for a reached booking limit (`plan_limit`): bookings per month.'
used:
type: integer
description: 'Present for a reached booking limit (`plan_limit`): bookings this month.'
payment:
type: boolean
description: Present for `plan_limit` when the subscription is read-only after a missed payment.
fields:
type: object
description: 'Present for `validation`. For the request''s own fields: a code (`invalid`, `required`, `too_long`;
`coupon` carries the coupon''s status, e.g. `expired`). For an intake question (keyed by its field id)
and for uploads: a message in the account language, ready to show.
'
additionalProperties:
type: string
item:
type: integer
description: 0-based index of the failing item.
min:
type: integer
description: 'Present with `fields.persons`: the fewest persons that fit.'
max:
type: integer
description: 'Present with `fields.persons`: the most persons that fit.'
type:
type: string
description: Ticket type id for `sold_out`.
versions:
type: array
description: Present for `bad_request` when `X-Api-Version` is unknown; the supported versions.
items:
type: string
example: '2026-10-13'
retryAfter:
type: integer
description: Present for `rate_limited` (429), same value as the `Retry-After` header.
RecurrenceRule:
type: object
required:
- freq
properties:
freq:
type: string
enum:
- daily
- weekly
- biweekly
- monthly
every:
type: integer
minimum: 1
maximum: 30
description: Interval.
'on':
type: array
description: ISO weekdays (1 = Monday) for weekly frequencies.
minItems: 1
maxItems: 7
items:
type: integer
minimum: 1
maximum: 7
monthly:
description: One of `day` (1–31; short months skip) or `nth` + `weekday`.
oneOf:
- type: object
required:
- day
properties:
day:
type: integer
minimum: 1
maximum: 31
- type: object
required:
- nth
- weekday
properties:
nth:
type: integer
enum:
- 1
- 2
- 3
- 4
- -1
weekday:
type: integer
minimum: 1
maximum: 7
until:
type: string
format: date
description: Capped at the booking horizon.
count:
type: integer
minimum: 1
maximum: 52
ItemInput:
type: object
required:
- service
properties:
service:
type: string
format: uuid
staff:
type:
- string
- 'null'
description: Staff id, or `any`/omitted to let the engine choose.
start:
type: string
description: ISO 8601 UTC, exactly as returned by a slot search. A day service returns it with the business offset (local midnight); send it back as-is.
end:
type: string
description: 'Day services only (`durationDays` > 0): the `end` of the same slot — local midnight `durationDays` calendar days after `start`. Send it back verbatim; the server re-checks the whole span. Ignored for other services.'
persons:
type: integer
minimum: 1
maximum: 1000
default: 1
extras:
type: object
description: Quantity per extra id; clamped server-side, mandatory extras added. A day service has no extras (any value → 422).
additionalProperties:
type: integer
minimum: 0
fields:
type: object
description: Answers to the service's intake questions, keyed by field id (see GET /services). A perPerson field sends an array with one entry per person; `textarea` is capped at 2000 and `text` at 500 characters, `date` is YYYY-MM-DD, and a `file` field sends the upload id from POST /uploads (unknown, another account's or already-used ids are 422). Unknown ids are ignored; a missing or wrong answer is 422 with the field id in `fields`.
additionalProperties: true
series:
type: string
pattern: ^[A-Za-z0-9_-]{1,64}$
description: Key linking this item to a rule in the order's `series` map.
waitlist:
type: boolean
description: Join the waiting list; cannot combine with `series` or `package`.
package:
type: string
pattern: ^[0-9a-f]{48}$
description: 'Token of a bought package; the visit is not paid. Requires `persons: 1`.'
kind:
type: string
enum:
- booking
- package
default: booking
description: '`package` buys a package itself (no `start`).'
responses:
OriginNotAllowed:
description: The request `Origin` is not in the account's allowed websites (`allowedOrigins`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
TooLarge:
description: The upload is larger than the limit (`too_large`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
PlanLimit:
description: 'The account''s plan has no room (`plan_limit`): the monthly booking limit is reached (`limit` and
`used` say how far), a new customer would pass the customer limit, or the subscription is
read-only after a missed payment (`payment: true`). Show `message`; existing customers and
bookings are unaffected.
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Validation:
description: Invalid input; `fields` names the offending fields.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
TooManyRequests:
description: 'Rate limit exceeded (`rate_limited`): 120 requests per minute per client IP, or 20 for booking
commits.
'
headers:
Retry-After:
$ref: '#/components/headers/Retry-After'
X-RateLimit-Limit:
$ref: '#/components/headers/X-RateLimit-Limit'
X-RateLimit-Remaining:
$ref: '#/components/headers/X-RateLimit-Remaining'
X-RateLimit-Reset:
$ref: '#/components/headers/X-RateLimit-Reset'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
BadRequest:
description: Unsupported `X-Api-Version` (`bad_request` with the supported `versions`), or a malformed `Idempotency-Key`.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
ServerError:
description: Unexpected server error (details are logged server-side only).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
NotFound:
description: Unknown key, service, event, package, payment or booking token.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
headers:
X-RateLimit-Remaining:
description: Requests left in the current minute.
schema:
type: integer
X-RateLimit-Limit:
description: Requests allowed per minute for this identity (client IP).
schema:
type: integer
X-RateLimit-Reset:
description: Epoch seconds when the current window resets.
schema:
type: integer
Retry-After:
description: Seconds until the rate-limit window resets. Sent on 429 only.
schema:
type: integer
parameters:
ApiVersion:
name: X-Api-Version
in: header
required: false
description: Defaults to the latest version when omitted.
schema:
type: string
enum:
- '2026-10-13'
Key:
name: key
in: path
required: true
description: The account's public key, 1–64 chars of `[A-Za-z0-9_-]`.
schema:
type: string
pattern: ^[A-Za-z0-9_-]{1,64}$
IdempotencyKey:
name: Idempotency-Key
in: header
required: false
description: 'Optional; 1–255 visible ASCII characters (use a UUID, one per checkout attempt). Same key + same
body within 24 hours → the stored status and body, with header `Idempotent-Replayed: true`; nothing
is booked or mailed again. Same key + different body → 422 `idempotency_mismatch`. First request
still running → 409 `idempotency_in_progress` (`Retry-After: 1`). Malformed → 400 `bad_request`.
5xx responses are not stored, so the retry runs for real.
'
schema:
type: string
minLength: 1
maxLength: 255
pattern: ^[\x21-\x7E]+$