Skip to content

Hold a table

post/api/book/{slug}/reservations

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.

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

application/json

curl -X POST "https://example.com/api/book/string/reservations" \  -H "Content-Type: application/json" \  -d '{    "startsAt": "2019-08-24T14:15:22Z",    "partySize": 1  }'
{  "reservationId": "54c41ef9-5629-4a9c-bb0d-10f615966bd0",  "expiresAt": "2019-08-24T14:15:22Z",  "holdMinutes": 0,  "requiresApproval": true}