Skip to main content

Public booking

The public-booking slice offers schedule and service information by public code and decides whether a requested appointment can be confirmed. It serves the Telegram channel now and exposes a browser channel for a future connected browser client. The channel must be enabled on an active schedule; archived schedules and services cannot offer a new booking.

Offered time and commitment​

Availability is calculated for a local date in the schedule's IANA time zone. Working-hours openings must fit the service duration; fixed-slot openings use their configured start and duration. Effective availability rules, the 35-day window, current time, confirmed appointments across the professional, recurring appointments, and group-session seats reduce the offered starts. Local times that cannot be mapped unambiguously across a daylight-saving transition are omitted.

Displayed availability is a snapshot. Booking locks the professional's owner row and checks the current channel, schedule, service, phone block, availability, overlaps, and remaining seat before committing. A competing request for the last seat can therefore be rejected even when both clients initially saw it. The appointment stores the submitted contact and service snapshots. A Telegram booking is claimed by the verified client account in the same transaction; a sessionless browser booking remains unclaimed until a client uses its personal link. See Client accounts.

An idempotency key ties a retry to the original input and appointment. Repeating the same request returns that appointment; using the key with changed input is a conflict. Failed validation or lost capacity creates no appointment.

A successful booking also returns an opaque personal management token. The database stores its hash and key version, not its plaintext. An active token allows its holder to view the associated appointment or cancel an eligible future confirmed appointment. A revoked or unknown token reveals no appointment. Cancellation retains the appointment as history, releases its future place when the schedule still offers that time, and records notices without duplicating them on a retry.