API reference (v1)
Read and change a business’s appointments, clients and catalogue from your own software. The machine-readable description is the OpenAPI 3.1 document; load it into any OpenAPI tool to try requests or generate a client.
Authentication
The business’s owner or admin creates a key in Settings → Calendar feeds & API and chooses its scopes. Send it as a bearer token on every request:
Authorization: Bearer sp_live_…
A key belongs to one business and can never do more than the person who made it can do in the app. Scopes: read:appointments, write:appointments, read:clients, write:clients, read:services, read:staff, read:availability, read:sales, read:exports.
Conventions
- Base URL:
/api/v1. Changes within v1 only add things. - Times are ISO-8601 instants in UTC, such as
2027-03-28T10:15:00Z. - Money is
{ "amountMinor": 4500, "currency": "GBP" }: whole pence, never decimals. Prices include VAT. - Lists return
{ data, nextCursor }. Passcursorto get the next page;limitis 1–100 (default 25). - POSTs that change data need an
Idempotency-Keyheader. Repeating a request with the same key and body returns the first response (withIdempotent-Replayed: true) for 24 hours. - Up to 600 requests a minute per key; see the
RateLimit-*headers.
Endpoints
| Method | Path | What it does | Scope |
|---|---|---|---|
| GET | /locations | List locations | any |
| GET | /locations/{id} | Get a location | any |
| GET | /services | List services | read:services |
| GET | /services/{id} | Get a service | read:services |
| GET | /staff | List staff | read:staff |
| GET | /staff/{id} | Get a staff member | read:staff |
| POST | /availability | Search bookable times | read:availability |
| GET | /appointments | List appointments | read:appointments |
| POST | /appointments | Book an appointment | write:appointments |
| GET | /appointments/{id} | Get an appointment | read:appointments |
| POST | /appointments/{id}/cancel | Cancel an appointment | write:appointments |
| POST | /appointments/{id}/reschedule | Move an appointment | write:appointments |
| GET | /clients | List clients | read:clients |
| POST | /clients | Create a client | write:clients |
| GET | /clients/{id} | Get a client | read:clients |
| PATCH | /clients/{id} | Update a client | write:clients |
| GET | /sales | List sales | read:sales |
| GET | /sales/{id} | Get a sale | read:sales |
| GET | /exports | List data warehouse snapshots | read:exports |
| GET | /exports/{date} | Download a data warehouse snapshot | read:exports |
Errors
Errors are application/problem+json with a stable code:
| UNAUTHENTICATED | 401 | No key, an unknown key or a revoked key. |
| INSUFFICIENT_SCOPE | 403 | The key was not given the scope this needs. |
| FORBIDDEN | 403 | The key’s creator can no longer do this (permissions or locations). |
| NOT_FOUND | 404 | Nothing with that id in this business. |
| INVALID_INPUT | 400 | The body or query failed validation. |
| INVALID_CURSOR | 400 | The cursor is not one we issued. |
| IDEMPOTENCY_KEY_REQUIRED | 400 | POSTs that change things need an Idempotency-Key. |
| SLOT_TAKEN | 409 | Someone else has that time. Search availability again. |
| VERSION_CONFLICT | 409 | The appointment changed since the version you sent. |
| INVALID_TRANSITION | 409 | For example, cancelling a completed appointment. |
| DUPLICATE | 409 | A client with that email or phone exists. |
| IDEMPOTENCY_IN_PROGRESS | 409 | The first request with this key is still running. |
| IDEMPOTENCY_KEY_REUSED | 422 | The key was used with a different request. |
| RATE_LIMITED | 429 | Over 600 requests a minute for this key. See Retry-After. |
Webhooks
Add an https endpoint in Settings and choose events: appointment.booked, appointment.rescheduled, appointment.cancelled, appointment.status_changed, client.created, order.paid, order.voided, membership.started, membership.paused, membership.resumed, membership.cancelled, waitlist.joined. Each is a POST of { id, type, createdAt, businessId, apiVersion, data }, where data holds ids (fetch the object for details). Answer with any 2xx within 10 seconds. Failures are retried with growing gaps for about a day; delivery order is not guaranteed, so de-duplicate on id.
Check the X-Salon-Signature header (t=…,v1=…) against your endpoint’s secret before trusting a request:
import { createHmac, timingSafeEqual } from 'node:crypto';
// rawBody: the request body exactly as received (a string), before JSON.parse.
function verify(secret, rawBody, header) {
const parts = Object.fromEntries(header.split(',').map((p) => p.split('=')));
const t = Number(parts.t);
if (!t || Math.abs(Date.now() / 1000 - t) > 300) return false; // older than 5 minutes
const expected = createHmac('sha256', secret).update(`${t}.${rawBody}`).digest();
const given = Buffer.from(parts.v1 ?? '', 'hex');
return given.length === expected.length && timingSafeEqual(given, expected);
}