Booking Flow
Overview
The booking flow in Bronjoy follows a multi-step process: the client selects a service, picks a staff member and time slot, provides their details, optionally pays, and receives a confirmation.
Step 1: Select a Service
The client browses available services for an organization's public booking page.
GET /api/booking/{slug}/services
Each service has a name, duration, price, and which staff members can provide it. No authentication needed — this is the public booking page endpoint.
Step 2: Check Availability
Once a service is selected, fetch available time slots for a given date.
GET /api/booking/{slug}/slots?service_id=1&date=2026-03-25
Or a whole date range at once:
GET /api/booking/{slug}/slots/range?service_id=1&start_date=2026-03-25&end_date=2026-03-31
The slot calculator considers:
- Staff working hours and breaks
- Existing bookings
- Service duration + buffer time
- Organization advance booking limits
Returns an array of available time slots with the assigned staff member.
Step 3: Create the Appointment
Submit the booking with the chosen slot. This works for both guests and signed-in clients — Bronjoy identifies the client from the auth token if one is present, or from the contact details in the body if not.
POST /api/client/booking/{slug}
Content-Type: application/json
{
"service_id": 1,
"staff_id": 3,
"start_time": "2026-03-25T10:00:00Z",
"notes": "First visit",
"name": "Maria Garcia",
"phone": "+998901234567"
}
name and either phone or email are required for guest bookings; they're ignored if the request carries a client Bearer token instead. The appointment is created in Pending status.
Step 4: Payment (if required)
If the organization requires payment, a Stripe Checkout Session is created automatically. The client is redirected to Stripe to complete payment.
POST /api/client/payments/appointments/{appointment}/pay
Authorization: Bearer client-token
After successful payment, the appointment moves to Confirmed status. See Payments for the full flow.
Step 5: Confirmation
The client receives a confirmation with appointment details. Notifications are sent via:
- Database notification (visible in the app)
- Telegram (if the client has connected their account)
Status Flow
Pending → Confirmed → Completed
↓ ↓
Cancelled Cancelled
↓
NoShow
- Pending — awaiting confirmation or payment
- Confirmed — payment received or manually confirmed by staff
- Completed — service was delivered
- Cancelled — cancelled by client or staff
- NoShow — client didn't show up