To successfully display your slots in the booking flow, you must send an accurate and up-to-date mapping of your inventory. The number of spots that are open can change significantly after a single booking because of the nature of dining venues and the ability to join tables or party size. The examples in this document guide you on how to maintain and map your available inventory properly.
Following are the parameters as specified in the
Availability definition
:
party_size
: the party size that the business can accommodate at this time slot. The diagrams in this article display the various ways you can configure party size.spots_open
: the number of tables currently available for a specific availability slot and party size.spots_total
: the total number of tables that the merchant has for this configuration, including the unavailable tables.
These three parameters work together to build a digital representation of the
floor plan. party_size
is the number of people each table can hold. There is
an entry for each size that a table can accommodate. spots_open
and
spots_total
are counts of tables that can accommodate that party_size
.
Example of empty floor plan
Imagine a restaurant with the following floor plan and no active bookings:
Figure 1. Floor plan with no active bookings.
The following are the values for party_size
, spots_open
, and spots_total
:
party_size | spots_open | spots_total |
---|---|---|
4 | 3 | 3 |
5 | 3 | 3 |
6 | 4 | 4 |
7 | 1 | 1 |
8 | 1 | 1 |
The Availability Feed for one time slot at this merchant looks like following:
{
"availability": [
{
"spots_total": 3,
"spots_open": 3,
"duration_sec": 3600,
"service_id": "1000",
"start_sec": 1535806800,
"merchant_id": "merch1",
"resources": {
"party_size": 4
}
},
{
"spots_total": 3,
"spots_open": 3,
"duration_sec": 3600,
"service_id": "1000",
"start_sec": 1535806800,
"merchant_id": "merch1",
"resources": {
"party_size": 5
}
},
{
"spots_total": 4,
"spots_open": 4,
"duration_sec": 3600,
"service_id": "1000",
"start_sec": 1535806800,
"merchant_id": "merch1",
"resources": {
"party_size": 6
}
},
{
"spots_total": 1,
"spots_open": 1,
"duration_sec": 3600,
"service_id": "1000",
"start_sec": 1535806800,
"merchant_id": "merch1",
"resources": {
"party_size": 7
}
},
{
"spots_total": 1,
"spots_open": 1,
"duration_sec": 3600,
"service_id": "1000",
"start_sec": 1535806800,
"merchant_id": "merch1",
"resources": {
"party_size": 8
}
}
]
}
Example of floor plan with a booking
A restaurant with one of the round tables previously booked is as follows:
Figure 2. Floor plan with one active booking.
The following are the values for party_size
, spots_open
, and spots_total
:
party_size | spots_open | spots_total |
---|---|---|
4 | 2 | 3 |
5 | 2 | 3 |
6 | 3 | 4 |
7 | 1 | 1 |
8 | 1 | 1 |
The Availability Feed for one time slot at this merchant looks like following:
{
"availability": [
{
"spots_total": 3,
"spots_open": 2,
"duration_sec": 3600,
"service_id": "1000",
"start_sec": 1535806800,
"merchant_id": "merch1",
"resources": {
"party_size": 4
}
},
{
"spots_total": 3,
"spots_open": 2,
"duration_sec": 3600,
"service_id": "1000",
"start_sec": 1535806800,
"merchant_id": "merch1",
"resources": {
"party_size": 5
}
},
{
"spots_total": 4,
"spots_open": 3,
"duration_sec": 3600,
"service_id": "1000",
"start_sec": 1535806800,
"merchant_id": "merch1",
"resources": {
"party_size": 6
}
},
{
"spots_total": 1,
"spots_open": 1,
"duration_sec": 3600,
"service_id": "1000",
"start_sec": 1535806800,
"merchant_id": "merch1",
"resources": {
"party_size": 7
}
},
{
"spots_total": 1,
"spots_open": 1,
"duration_sec": 3600,
"service_id": "1000",
"start_sec": 1535806800,
"merchant_id": "merch1",
"resources": {
"party_size": 8
}
}
]
}
Specify dining availability with combined tables support
There are many ways in which a restaurant can combine tables to support larger
groups. You need to specify the spots_open
and spots_total
in a way that
accurately reflects whether you can accept parties of a given size.
Following is an example of how you can specify combining tables. Your feeds
might differ based on the calculation method you use. It's acceptable for you to
specify spots_open
and spots_total
in a way that matches your business
logic.
If a restaurant supports combining tables to form a larger party, you can update
your spots_open
and spots_total
to reflect this.
For example, a restaurant that can combine two small tables to seat a party of 7-10 people:
Figure 3. Floor plan with no active bookings.
In the case of no active bookings, following are the values for party_size
,
spots_open
, and spots_total
:
party_size | spots_open | spots_total |
---|---|---|
4 | 3 | 3 |
5 | 3 | 3 |
6 | 4 | 4 |
7 | 1 | 1 |
8 | 1 | 1 |
9 | 1 | 1 |
10 | 1 | 1 |
Now, with the same floor plan, a booking is made for a party size of ten that combines two small tables.
Figure 4. Floor plan with one active booking spanning two tables.
Then, the values for party_size
, spots_open
, and spots_total
are as
follows:
party_size | spots_open | spots_total |
---|---|---|
4 | 1 | 3 |
5 | 1 | 3 |
6 | 2 | 4 |
7 | 1 | 1 |
8 | 1 | 1 |
9 | 0 | 1 |
10 | 0 | 1 |