Skip to content

Book an appointment

post/api/book/{slug}/appointments

Public guest checkout. The requested slot is checked again server-side (not in the past, inside the staff member's working hours, not inside a blocked period), because nothing stops a direct POST inventing a slot the booking page never offered. Overlap is enforced by the database.

The client record is matched on email, so a returning customer builds up history on one record. notes goes on this booking, never on the client record.

This route checks only that the business is active; it is the hospitality endpoints that refuse a business running the other engine.

Path Parameters

slug*string

The organization's public booking slug, i.e. the {slug} in /{slug}. Only orgs with status active resolve; anything else is a 404.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/book/string/appointments" \  -H "Content-Type: application/json" \  -d '{    "providerId": "4834bcdc-4a64-444d-966b-1a6fe381da24",    "startsAt": "2019-08-24T14:15:22Z",    "customer": {      "name": "string",      "email": "user@example.com"    }  }'
{  "appointment": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "starts_at": "2019-08-24T14:15:22Z",    "ends_at": "2019-08-24T14:15:22Z"  },  "calendar": {    "googleCalendarUrl": "http://example.com",    "icsUrl": "http://example.com"  },  "promotion": {    "kind": "sale",    "discountCents": 0  },  "lines": [    {      "serviceId": "8f8bb40f-b96b-40fe-9064-5031fbe483f9",      "providerName": "string"    }  ]}