Introducing the Reservations API
Layout now books restaurant tables on the person's own booking account, with the same user, key and webhooks you use for orders. It is in early access. See Reservations.
What changed
- Search.
POST /v1/reservations/searchreturns up to 20 places with open tables near a point or a named place, each with up to 10 times. - Book.
POST /v1/reservationsbooks a free table at once when the person's booking account is connected. Otherwise it answers withnext, the one thing Layout needs from the person. - Respond.
POST /v1/reservations/:id/respondsends what the person gave: the phone on their booking account with their consent, the code it texts them, an email, or a yes to the table's terms. - Manage.
GET /v1/reservations/:id,GET /v1/reservationsandPOST /v1/reservations/:id/cancel. A cancel that carries a fee asks the person to confirm it first, with the fee and the card named. - Connect ahead of time.
/v1/users/:id/connectionsconnects a person's booking account at signup, so their first booking needs no code. US and Canadian (+1) mobile numbers only. reservation.updatedis sent on every change to a Reservation'sstateornext. See Event types.- Paid tables. A table with a deposit, a cancellation fee or a card hold needs separate access. Without it the booking fails with
paid_table_unavailableand nothing is booked.
A Reservation's state is pending, booking, booked, checking, unresolved, failed, cancelling or cancelled. unresolved is final: Layout could not confirm whether the booking stands. Error and failure codes are in Errors and Failure codes, and limits in Reservations limits.
Why it matters
An agent or app that orders food for a person can now book them a table too, without a second integration.
What to do
Nothing, unless you want reservations. Contact us for early access, and say if you need paid tables. Until then every route answers 403 not_enabled. Sandbox has eight test places, one per path, and the code 000000: see Sandbox.
Breaking changes
None.