Party Flags
Party flags are broken down into section and experience flags. Supporting sections is optional. If your restaurant only has one section, or you want to restrict customer booking to the main floor, you can skip this portion of party flags.
Section Flags
Section flags are used to pick a particular section of the restaurant to sit in, such as the patio. Every restaurant has at least one section, referred to as the Main Floor. This has a section ID of 0 and a party flag of 0. You will want to get the list of sections ahead of time so you know what sections a restaurant supports.
Getting the list of sections
curl --request GET \
--url https://sandbox.seatninja.com/restaurant/restaurantId/sections \
--header 'accept: application/json' \
--header 'x-api-key: YOUR_API_KEY'
{
"data": [{
"id": 105,
"name": "Patio",
"partyFlag": 8
},
{
"id": 0,
"name": "Main Floor",
"partyFlag": 0
}],
"error": null
}
The section object has the following properties:
- id: ID of the section, this is used to match up available times to a given section.
- name: restaurant configured name of the section.
- partyFlag: used for booking in that section.
See sections API
First available seating and multiple sections
Assume the restaurant has the following sections: main floor, patio, upstairs.
If the customer wants the first available table and doesn't care if they are sat in any of the above three sections, use the first available seating flag.
If the customer wants to sit in either the patio or upstairs, but not the main floor, you would OR the two flag values together.
If the customer wanted to sit in the main floor or patio, but not upstairs, you currently would not be able to request this.
Experience Flags
Experience flags signify important details about the reservation or waitlist, such as high chair needed or and event, such as the customer's birthday.
Usage
Party flags are a bitwise enums. To say it is a customer's birthday and they need a high chair you would OR the two values together. Birthday has a value of 1, and high chair has a value of 256, so 1 | 256 = 257.
[Flags]
public enum ReservationPartyFlag : ulong
{
None = 0UL,
/// <summary>
/// Section flags
/// </summary>
FirstAvailableSeating = 1UL << 1, //Customer is ok with any seat in any section
Patio = 1UL << 3,
BarSeatingOk = 1UL << 9,
HeatedPatio = 1UL << 25
/// <summary>
/// Experience flags
/// </summary>
Birthday = 1UL << 0,
Anniversary = 1UL << 6,
SpecialNeeds = 1UL << 7,
HighChairNeeded = 1UL << 8,
BusinessMeeting = 1UL << 10,
CallAhead = 1UL << 11,
ServerRequested = 1UL << 14,
ChildrenInParty1 = 1UL << 15, //There is 1 child in the party
ChildrenInParty2 = 1UL << 16, //There are 2 children in the party
ChildrenInParty3 = 1UL << 17, //There are 3 children in the party
ChildrenInParty4 = 1UL << 18, //There are 4 children in the party
ChildrenInParty5 = 1UL << 19, //There are 5 children in the party
ChildrenInParty6 = 1UL << 20, //There are 6 children in the party
ChildrenInParty7 = 1UL << 21, //There are 7 children in the party
ChildrenInParty8 = 1UL << 22, //There are 8 children in the party
ChildrenInParty9 = 1UL << 23, //There are 9 children in the party
ChildrenInParty10 = 1UL << 24, //There are 10 children in the party
}
Updated almost 6 years ago