Enrollment API
Enrollment API
Abschnitt betitelt „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).
| Layer | GraphQL entity | Typical caller | Creates a billing row? |
|---|---|---|---|
| Public sign-up | publicEnrollToCourse | Anonymous website visitor | No, only a registration |
| Course registration | CourseRegistration | Authenticated user or staff | No |
| Course participant | CourseParticipant | Staff after Buchen is confirmed | Yes |
A typical flow:
- A prospective student submits the public form on your school’s website → the server calls
publicEnrollToCourseand creates a CourseRegistration (an intent to attend). - 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.
Sections
Abschnitt betitelt „Sections“- Public enrollment — sign up an anonymous visitor (no token required)
- Course registrations — create, list and update
CourseRegistrationobjects - Course participants — book a person into a course (
CourseParticipant)
Terminology
Abschnitt betitelt „Terminology“- Registration (Anmeldung) — a
CourseRegistrationobject. Signals intent, can cover multiple courses and multiple participants. - Participant (Kursteilnehmer) — a
CourseParticipantobject 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.