Zum Inhalt springen

Enrollment API

The enrollment API covers three distinct layers. They exist because the SwissMentor workflow separates intent (someone wants this course) from confirmation (the school actually books the person).

LayerGraphQL entityTypical callerCreates a billing row?
Public sign-uppublicEnrollToCourseAnonymous website visitorNo, only a registration
Course registrationCourseRegistrationAuthenticated user or staffNo
Course participantCourseParticipantStaff after Buchen is confirmedYes

A typical flow:

  1. A prospective student submits the public form on your school’s website → the server calls publicEnrollToCourse and creates a CourseRegistration (an intent to attend).
  2. Staff reviews the registration in SwissMentor and confirms (Buchen) → the server creates a CourseParticipant, which represents the real booking and triggers invoicing.

You can also skip the first step entirely if staff enter data directly through the authenticated API.

  • Registration (Anmeldung) — a CourseRegistration object. Signals intent, can cover multiple courses and multiple participants.
  • Participant (Kursteilnehmer) — a CourseParticipant object attached to exactly one course and one person. Drives class membership, invoicing and reporting.
  • Public API — the subset of mutations annotated with @Authorized(auth('Public')) on the server. These accept unauthenticated requests but are rate-limited and validated strictly.