See how ZvenBook powers different types of booking systems across various industries. Each example includes complete code samples and best practices.
Complete booking system for a hair salon with multiple stylists and services
// Set up services
await sdk.createService({
tenantId: 'salon',
name: 'Haircut & Style',
durationMin: 60,
bufferAfterMin: 15
});
// Add providers (stylists)
await sdk.createProvider({
tenantId: 'salon',
name: 'Alex Johnson',
timezone: 'Europe/Stockholm',
email: 'alex@salon.com'
});
// Get availability
const { slots } = await sdk.availability({
tenantId: 'salon',
serviceId: 'haircut',
providerId: 'alex',
start: '2024-01-15T09:00:00Z',
end: '2024-01-15T17:00:00Z',
timezone: 'Europe/Stockholm'
});
Healthcare appointment scheduling with patient information and reminders
// Create medical service
await sdk.createService({
tenantId: 'clinic',
name: 'General Consultation',
durationMin: 30,
bufferBeforeMin: 10,
bufferAfterMin: 5
});
// Book appointment with patient details
await sdk.createBooking({
tenantId: 'clinic',
serviceId: 'consultation',
providerId: 'dr-smith',
start: '2024-01-15T14:00:00Z',
end: '2024-01-15T14:30:00Z',
contactEmail: 'patient@example.com',
contactFirstName: 'John',
contactLastName: 'Doe',
contactPhone: '+46701234567',
notes: 'Follow-up for blood pressure check'
});
Group fitness classes with capacity limits and waitlists
// Create group fitness service
await sdk.createService({
tenantId: 'gym',
name: 'Yoga Class',
durationMin: 60,
capacity: 20 // Max 20 participants
});
// Set up recurring weekly schedule
await sdk.createWeeklyRule({
tenantId: 'gym',
providerId: 'yoga-studio',
timezone: 'Europe/Stockholm',
days: [
{ weekday: 1, start: '18:00', end: '19:00' }, // Monday
{ weekday: 3, start: '18:00', end: '19:00' }, // Wednesday
{ weekday: 5, start: '18:00', end: '19:00' } // Friday
]
});
Table booking system with party size and special requests
// Create dining service
await sdk.createService({
tenantId: 'restaurant',
name: 'Dinner Reservation',
durationMin: 120, // 2 hour slots
bufferAfterMin: 30 // Cleaning time
});
// Book table with special requests
await sdk.createBooking({
tenantId: 'restaurant',
serviceId: 'dinner',
providerId: 'main-dining',
start: '2024-01-15T19:00:00Z',
end: '2024-01-15T21:00:00Z',
contactEmail: 'guest@example.com',
contactFirstName: 'Sarah',
contactLastName: 'Wilson',
notes: 'Party of 4, window table preferred, celebrating anniversary'
});
Professional consulting with flexible scheduling and client management
// Create consulting service
await sdk.createService({
tenantId: 'consulting',
name: 'Strategy Session',
durationMin: 90,
bufferBeforeMin: 15 // Prep time
});
// Schedule consultation
await sdk.createBooking({
tenantId: 'consulting',
serviceId: 'strategy',
providerId: 'consultant-jane',
start: '2024-01-15T10:00:00Z',
end: '2024-01-15T11:30:00Z',
contactEmail: 'client@company.com',
contactFirstName: 'Michael',
contactLastName: 'Chen',
notes: 'Digital transformation roadmap discussion'
});
Resource booking for equipment, rooms, or vehicles
// Create equipment resource
await sdk.createService({
tenantId: 'rental',
name: 'Conference Room A',
durationMin: 60,
capacity: 1 // Only one booking at a time
});
// Book conference room
await sdk.createBooking({
tenantId: 'rental',
serviceId: 'conf-room-a',
providerId: 'building-1',
start: '2024-01-15T14:00:00Z',
end: '2024-01-15T16:00:00Z',
contactEmail: 'organizer@company.com',
contactFirstName: 'Team',
contactLastName: 'Meeting',
notes: 'Quarterly planning session, need projector'
});
Best practices and patterns for integrating ZvenBook into your applications.
Use webhooks or polling to keep your UI synchronized with booking changes and availability updates.
Implement retry logic, graceful degradation, and user-friendly error messages for robust applications.
Organize your application with proper tenant isolation and resource management strategies.
Start with our comprehensive documentation and get your first booking system up and running in minutes.