The section object
A section is a seating area. It comes back from Sections, and a thinner reference to one sits on every table a booking is seated at.
Fields
Section titled “Fields”objectstring
Possible values: section
The object type: always section.
idstring
Pass this as section_id to GET /v1/availability or to a create — any member of a group resolves to the whole group, so a sec_… read off a reservation’s table works without knowing which row it is.
namestring
The area’s name, in the restaurant’s primary_language.
area_typestring
Possible values: indoor outdoor terrace bar lounge private_room patio rooftop
The kind of space, as the restaurant classified it: indoor, outdoor, terrace,
bar, lounge, private_room (a room of its own), patio or rooftop. For a group,
take it from the row where group_id == id.
bookable_onlineboolean
Whether THIS row is offered for online booking. Per row, never per group: it is deliberately not cascaded between group members, so a group is worth offering when ANY of its rows is true.
group_idstring
The sec_… id that identifies the conceptual seating area this row belongs to.
Rows sharing a group_id are ONE choice to a guest — the same area drawn on more than
one floor plan — so group by it before rendering a picker, or the same area is offered
twice.
Exactly one row per group has group_id == id: take that row’s name and
area_type as the group’s. The others are kept in step by the product and are
normally identical, but that is a behaviour of its editing paths rather than a
constraint, so the naming row is the answer that cannot go stale.
One area, several rows
Section titled “One area, several rows”A section row belongs to one floor plan. The same area drawn on a summer plan
and a winter plan is two rows and one choice to a guest, which is what
group_id exists to say. Group by it before you render anything, take the
group’s name and area_type from the row where group_id == id, and offer the
group when any of its rows is bookable_online — that flag is per row and is
deliberately not cascaded.
Any member id resolves to the whole group when you pass it as section_id, so a
sec_… read off a reservation’s table works without knowing which row it is.
Two different ids called sec_…
Section titled “Two different ids called sec_…”The id on an availability day’s sections[] is the group id. The id on a
reservation’s tables[].section is the row. Both are sec_…, both are accepted
as section_id, and comparing one to the other for equality is the mistake this
shape invites.