Confirm a held table
/api/book/{slug}/reservations/{id}Attaches the guest's details and promotes the hold to confirmed. The update is a compare-and-set on status = hold, so two racing confirms cannot both succeed; the loser gets 410 and, importantly, does not send a "table confirmed" email for a booking it did not make.
hold_expires_at is cleared in the same statement because the check constraint is biconditional; setting status alone would fail.
Path Parameters
The organization's public booking slug, i.e. the {slug} in /{slug}. Only orgs with status active resolve; anything else is a 404.
The reservationId returned by the hold. Scoped to the slug, so one venue's URL can never confirm another venue's hold.
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 PATCH "https://example.com/api/book/string/reservations/string" \ -H "Content-Type: application/json" \ -d '{ "customer": { "name": "string", "email": "user@example.com" } }'{ "reservation": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "starts_at": "2019-08-24T14:15:22Z", "ends_at": "2019-08-24T14:15:22Z", "party_size": 0 }, "requested": true, "amountDueCents": 0}Hold a tablePOST
Takes a 10-minute hold on a table and returns its id. The guest then confirms it with PATCH once they have typed their details; that gap is exactly what the hold protects. The slot is re-derived server-side and matched exactly against the requested `startsAt`. The database's overlap guarantee, not the availability read, is what makes the allocation safe. **400 versus 409.** 400 means the request can never succeed (the time is outside every service period, no table seats a party that size, or the venue is closed); 409 means it was bookable and someone else has it. Reload the availability grid on 409 only. `areaId`/`levelId` narrow the candidate tables the same way the availability grid does. `tableId` asks for a specific one of them: honoured only if `tablePickerEnabled` is on (silently ignored otherwise, so a stale client still completes a normal booking) and only if that table is still free for this exact slot. Losing that race is a 409, not a 400: the time is still bookable, just not at that table.
Release a held tableDELETE
The guest closed the sheet or hit back. Releases the table immediately rather than waiting out the hold window. Only ever deletes a row whose status is still `hold`; a confirmed booking is cancelled from the dashboard or the manage link, never dropped by an unauthenticated caller holding an id.