API reference

The custom GraphQL operations for visitors, families and the tutor, and the HTTP routes.

Everything is on POST /api/graphql. Custom operations are in features/keystone/mutations/tutor.ts. Except publicTutor and homeTutor, they return CommandResult { success, error, data }; when success is false, error is a sentence to show as it is. The repository's docs/feature-matrix.md gives inputs and the shape of data for each one.

Public

homeTutor, publicTutor, publicSlots, publicOpenDays, bookFirstSession, publicBooking, payForBooking, confirmBookingPayment, cancelMyBooking, rescheduleMyBooking, sendInquiry, claimFamilyAccount, publicInvoice, payInvoiceByLink, confirmInvoicePayment.

Family (signed in)

myFamily, bookSession, mySessions, mySession, cancelSession, rescheduleSession, payForSession, confirmSessionPayment, myStudents, saveStudent, myHomework, handInHomework, myProgress, myPackages, buyPackage, confirmPackagePayment, myInvoices, myInvoice, payInvoice, reportPayment, myResources, submitReview, updateMyContact, myCalendarFeedUrl.

Tutor

AreaOperations
SetupsetUpMyBusiness
Today and sessionstoday, completeSession, saveSessionNote, markNoShow, cancelSessionAsTutor, rescheduleSessionAsTutor, excuseSession, reopenSession, tutorSession, sessionLink
Calendarcalendar, createSessionAsTutor, saveSeries, pauseSeries, endSeries, clearSkippedWeek
FamiliesfamiliesOverview, tutorFamily, inviteFamily, saveStudentAsTutor, tutorStudent, setInquiryStatus, convertInquiry, moderateReview
HomeworkhomeworkBoard, reviewHomework
PackagessellPackage, cancelPackagePurchase, refundPackage, adjustMinutes
InvoicesreadyToInvoice, draftInvoice, addInvoiceLine, removeInvoiceLine, sendInvoice, invoiceLink, voidInvoice, tutorInvoice
PaymentsconfirmPayment, rejectPayment, recordPayment, refundPayment, paymentSettings
EarningsmyEarnings, exportCsv
Calendar feedtutorCalendarFeedUrl

The tutor's invoice creation is draftInvoice because Keystone already owns createInvoice.

HTTP routes

RoutePurpose
POST /api/payment-webhooks/stripeStripe webhook
POST /api/jobs/runHolds, series, package expiry and reminders. Needs Authorization: Bearer $JOBS_SECRET.
GET /api/calendar/[feed], GET /api/calendar/session/[id]iCal feed and one session's .ics
GET /api/files/[kind]/[id]Homework and resource files
/api/completion, /api/mcp-transport/[transport]The dashboard assistant and MCP access with OAuth tokens from /oauth/*

On this page