Appearance
Restaurant Booking
Build a complete restaurant reservation system with table management, capacity-based booking, and waitlist.
Domain Mapping
| Restaurant Concept | AvailEngine Concept | How to Set Up |
|---|---|---|
| Restaurant | Business | Create one business per restaurant |
| Table | Resource | resource_type: "table", capacity_min: 1, capacity_max: 4 |
| Floor section | Resource section | Group tables by section: "Main Floor", "Patio", "Bar" |
| Reservation | Booking | capacity = party size, start_time = reservation time |
| Walk-in list | Waitlist | Parties waiting for a table |
Step-by-Step Setup
1. Create the Business
bash
curl -X POST https://api.availengine.com/v1/developer/businesses \
-H "Authorization: Bearer YOUR_JWT" \
-H "Content-Type: application/json" \
-d '{
"name": "Trattoria Bella",
"business_type": "restaurant"
}'2. Add Tables (Resources)
Create tables with different capacities. A 4-top, two 2-tops, and a large 8-top round table:
bash
# 4-person table
curl -X POST https://api.availengine.com/v1/manage/resources \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Table 1", "resource_type": "table", "capacity_min": 1, "capacity_max": 4, "section": "Main Floor", "display_order": 1}'
# 2-person table
curl -X POST https://api.availengine.com/v1/manage/resources \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Table 2", "resource_type": "table", "capacity_min": 1, "capacity_max": 2, "section": "Main Floor", "display_order": 2}'
# 2-person table
curl -X POST https://api.availengine.com/v1/manage/resources \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Table 3", "resource_type": "table", "capacity_min": 1, "capacity_max": 2, "section": "Patio", "display_order": 3}'
# Large round table for groups
curl -X POST https://api.availengine.com/v1/manage/resources \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Round Table", "resource_type": "table", "capacity_min": 4, "capacity_max": 8, "section": "Private Room", "display_order": 4}'3. Set Operating Hours
bash
curl -X PUT https://api.availengine.com/v1/manage/hours \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"hours": [
{"day_of_week": 0, "is_open": false},
{"day_of_week": 1, "is_open": true, "open_time": "11:00", "close_time": "22:00", "last_booking_time": "21:00"},
{"day_of_week": 2, "is_open": true, "open_time": "11:00", "close_time": "22:00", "last_booking_time": "21:00"},
{"day_of_week": 3, "is_open": true, "open_time": "11:00", "close_time": "22:00", "last_booking_time": "21:00"},
{"day_of_week": 4, "is_open": true, "open_time": "11:00", "close_time": "22:00", "last_booking_time": "21:00"},
{"day_of_week": 5, "is_open": true, "open_time": "11:00", "close_time": "23:00", "last_booking_time": "22:00"},
{"day_of_week": 6, "is_open": true, "open_time": "11:00", "close_time": "23:00", "last_booking_time": "22:00"}
]
}'Last Booking Time
Set last_booking_time so customers can't book a table 5 minutes before closing. For a restaurant that closes at 22:00, last booking at 21:00 gives the kitchen an hour to finish.
4. Configure Booking Settings
bash
curl -X PATCH https://api.availengine.com/v1/manage/settings \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"default_slot_interval_minutes": 15,
"default_slot_duration_minutes": 90,
"booking_window_days": 14,
"min_notice_hours": 1,
"max_capacity": 10,
"default_deposit_amount_cents": 20
}'| Setting | Why This Value |
|---|---|
slot_interval_minutes: 15 | Tables turn over every 15 minutes — customers can book at 18:00, 18:15, 18:30, etc. |
slot_duration_minutes: 90 | Average dinner is 90 minutes. The table is blocked for this long. |
booking_window_days: 14 | Accept reservations up to 2 weeks ahead. |
5. Check Availability for a Party of 4
bash
curl "https://api.availengine.com/v1/availability/YOUR_BUSINESS_ID?date=2026-06-14&capacity=4"Only tables with capacity_max >= 4 show as available. A 2-top won't appear for a party of 4.
json
{
"business_id": "uuid",
"date": "2026-06-14",
"slots": [
{"time": "18:00", "resource_id": "uuid", "resource_name": "Table 1", "available": true},
{"time": "18:00", "resource_id": "uuid", "resource_name": "Round Table", "available": true},
{"time": "18:15", "resource_id": "uuid", "resource_name": "Table 1", "available": false},
{"time": "18:15", "resource_id": "uuid", "resource_name": "Round Table", "available": true}
]
}6. Make a Reservation
bash
curl -X POST https://api.availengine.com/v1/bookings/ \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"business_id": "YOUR_BUSINESS_ID",
"customer": {
"first_name": "Marco",
"last_name": "Rossi",
"phone": "+393331234567",
"email": "marco@example.com"
},
"booking_date": "2026-06-14",
"start_time": "19:00",
"capacity": 4,
"customer_notes": "Birthday dinner — would love the round table"
}'Response:
json
{
"booking_id": "uuid",
"status": "confirmed",
"confirmation_code": "AV-XK9M2P",
"resource_name": "Round Table",
"customer_id": "uuid",
"deposit": null
}Restaurant-Specific Patterns
Deposits for No-Shows
Restaurants lose money on no-shows. Enable deposits to protect revenue:
bash
curl -X PATCH https://api.availengine.com/v1/manage/settings \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"default_deposit_amount_cents": 500}'This charges €5 per person. A party of 4 pays €20 upfront, refunded if they cancel within policy (set via cancellation_cutoff_hours in your Stripe settings).
Walk-In Waitlist
When the restaurant is full, add walk-ins to the waitlist:
bash
curl -X POST https://api.availengine.com/v1/waitlist/YOUR_BUSINESS_ID \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer": {
"first_name": "Lucia",
"last_name": "Bianchi",
"phone": "+39333987654"
},
"preferred_date": "2026-06-14",
"capacity": 2,
"notes": "Waiting at the bar"
}'When a table opens up (a booking cancels), check your waitlist and contact the next party.
Handling Large Parties
For parties larger than any single table, create a "combined" resource:
bash
curl -X POST https://api.availengine.com/v1/manage/resources \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Combined Tables 1+2", "resource_type": "table", "capacity_min": 5, "capacity_max": 6, "section": "Main Floor"}'When this is booked, manually block Tables 1 and 2. Or handle large parties outside the booking system with a manual note.
Seasonal Hours
Update hours for summer/winter seasons:
bash
# Summer hours (June-August): open later
curl -X PUT https://api.availengine.com/v1/manage/hours \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"hours": [ ... "open_time": "11:00", "close_time": "23:00" ... ]}'Holiday Closures
Block off closure dates so customers can't book:
bash
curl -X POST https://api.availengine.com/v1/manage/blackout-dates \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"start_date": "2026-08-15",
"end_date": "2026-08-22",
"reason": "Ferragosto — summer closure"
}'Widget Integration
js
// Restaurant booking widget — key considerations:
// 1. Always show party size selector BEFORE date/time
// 2. Only show slots where at least one table fits the party
// 3. Display table options when multiple are available for the same time
const client = new AvailEngine('avail_live_YOUR_KEY');
async function getAvailableSlots(businessId, date, partySize) {
const slots = await client.availability(businessId, {
date,
capacity: partySize,
durationMinutes: 90
});
return slots;
}Dashboard Tips
- Use the Booking List to see tonight's reservations at a glance
- The Waitlist tab shows parties waiting for tables — call them when something opens
- Blackout Dates for holidays and staff vacations
- Set up webhooks to get SMS/email when a booking is created or cancelled