Skip to content

Confirm a held table

patch/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

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.

id*string

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}