L'objet section
Une section, c’est un espace de placement. Elle revient de Sections et une référence plus légère à une section est posée sur chaque table où une réservation est placée.
Le tableau ci-dessous est généré depuis la spécification OpenAPI et reste en anglais, comme la référence de l'API : noms de champs, valeurs d'énumération et descriptions viennent du backend. Une traduction serait une copie qui ment dès la première évolution du contrat.
objectstring
Valeurs possibles : 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
Valeurs possibles : 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.
Un espace, plusieurs lignes
Section intitulée « Un espace, plusieurs lignes »Une ligne de section appartient à un plan de salle. Le même espace dessiné sur
un plan d’été et sur un plan d’hiver fait deux lignes et un seul choix pour un
client : c’est ce que group_id sert à dire. Regroupez par ce champ avant
d’afficher quoi que ce soit, prenez le nom et l’area_type du groupe sur la
ligne où group_id == id, et proposez le groupe dès qu’une de ses lignes est
bookable_online — ce marqueur est par ligne et n’est volontairement pas
propagé.
N’importe quel identifiant membre se résout vers le groupe entier quand vous le
passez comme section_id, donc un sec_… lu sur la table d’une réservation
fonctionne sans savoir de quelle ligne il s’agit.
Deux identifiants sec_… différents
Section intitulée « Deux identifiants sec_… différents »L’identifiant dans sections[] d’un jour de disponibilité est celui du groupe.
L’identifiant dans tables[].section d’une réservation est celui de la ligne.
Les deux sont des sec_…, les deux sont acceptés comme section_id, et les
comparer par égalité est l’erreur que cette forme invite à faire.