Skip to content

Online booking

  • the Scheduling and Online booking modules enabled
  • services marked “can be booked online”, with a duration
  • employees with working hours, and the site key

Paste it after the base prompt, then add Design without the AI look.

Build the booking flow on /api/site/v1/booking.
Steps, one per screen on phones:
1. Service (or several), grouped by category, with duration and price from GET /booking.
2. Location and specialist, only if the catalog offers them; "anyone available" as an option.
3. Day and time: GET /booking?services=...&from=...&to=... Show only days with free slots; if none, jump to the first free day.
4. When a time is picked: POST /booking/hold. Show how long it is held. On change or abandon: DELETE /booking/hold.
5. The person's details: the fields and consents from the form returned by the API, not a fixed list.
6. Confirm: POST /booking with { holdToken, answers, consents, lang, website }.
7. Success: summary, the manage link if present, an add to calendar button.
Cases to handle:
- 409 or expired hold: "that time was just taken", reload slots and keep what was typed.
- 429: ask the person to try again shortly.
- The time zone is the company's.
Put a "Book now" button on service pages, with the service preselected in the URL.
Performance:
- Cache the catalog (services, specialists) briefly; always fetch free slots fresh.
- The form is server-rendered, JavaScript starts on first touch.
- Reserve the space while slots load, so the page does not jump.