/api/v1/* error response follows the same envelope. Codes and shapes are stable inside v1; new error types are additive only.
Error envelope
Standard HTTP codes
Conventions
These conventions are constant across every endpoint and every webhook payload.Money
amount is an integer in the smallest unit of the currency (pence for GBP, cents for USD). currency is an ISO-4217 three-letter code, uppercase. Never assume two decimal places — JPY has zero, BHD has three. Always divide by the minor-unit factor for the currency at display time.
Datetimes
All datetimes are ISO-8601 in UTC with theZ suffix:
GET /api/v1/tenant (or store it on first install) and convert client-side.
Resource IDs
Every resource has a stable two-or-three-letter prefix. Treat the full ID as an opaque string — do not parse the part after the prefix.Pagination
List endpoints return:next_cursor back as ?cursor=...&limit=25 to fetch the next page. next_cursor is null on the final page. Maximum limit is 100; default is 25.
Idempotency
POST and PATCH requests accept an Idempotency-Key header. Use a UUIDv4 (or any client-generated unique string up to 255 chars) per logical operation.
- Same key, same body → the original 2xx response is returned. The side-effect (booking creation, payment capture) happens exactly once.
- Same key, different body →
422withcode: "idempotency_mismatch". Pick a new key. - Different key → treated as a fresh request.