Skip to main content

Check available times

Auth: None (public) Handler: AvailabilityService::getAvailableTimes()

Parameters

Response

Via AvailableTimesTransformer:

How availability is calculated

  1. Gets tutor’s DayAvailability for the requested day of week
  2. Generates 15-minute interval time slots
  3. Filters out clashing lessons — checks existing lessons on that date
  4. Filters out calendar events — checks Google Calendar if connected
  5. Applies travel time buffers — for in-person lessons, uses BlackBox service to calculate transit time between locations
  6. Validates postcode — for student’s home lessons, validates the student’s postcode is within tutor’s travel distance
  7. Converts times based on UTC offset

Auth: auth:api Similar functionality with slightly different parameters.

Day availability management (tutor-side)

Tutors manage their weekly schedule:
Auth: auth:api Each day availability record defines:
  • Day — day of week (mapped to generic dates internally)
  • Time slots — from/to times within that day
  • Lesson types — which lesson types are available (online, tutor’s home, student’s home)
  • Buffer duration — travel time buffer between lessons

Day constants

Defined in DayAvailability model: The system uses generic dates (not real calendar dates) so availability repeats weekly.