Developer & API
Developer & API
Abschnitt betitelt „Developer & API“SwissMentor exposes a single GraphQL endpoint that covers every operation the web client performs. Any integration — CRM sync, course portals, payroll exports — uses the same endpoint with the same schema.
API Areas
Abschnitt betitelt „API Areas“Fundamentals
Abschnitt betitelt „Fundamentals“- Getting Started — connect, first query, client libraries
- Authentication — JWT tokens, refresh, logout
- GraphQL Schema — core types, conventions, error handling
- Public API — anonymous endpoints, rate-limits, anti-spam
- Embedding Widgets —
<sm-*>Web-Components on customer websites
Entities and Workflows
Abschnitt betitelt „Entities and Workflows“- Courses — create
Courserecords and publish them throughCourseListing(Kursausschreibung) - Persons — create, update, import, addresses
- Enrollment — course registrations, participants, public sign-up without authentication
Conventions at a Glance
Abschnitt betitelt „Conventions at a Glance“- All public IDs are
UID, a GUID string. Internal numeric IDs are never exposed through the API. - Queries and mutations follow CRUD naming:
person/persons(list) /createPerson/updatePerson/deletePerson. - Mutations return a result wrapper with
status,message,id, and the created/updated entity — not the entity directly. - Parent-child structure: most objects are subordinated to a
parentIDwhich drives ACL and object hierarchy. - Most mutations require authentication; a small curated set (
publicEnrollToCourse,login,systemInfo) is intentionally public.
Public API vs Authenticated API
Abschnitt betitelt „Public API vs Authenticated API“| Use case | Endpoint | Auth |
|---|---|---|
| Anonymous course catalogue / detail page | publicListingPlatform / publicCourseListings / publicCourse | None |
| Anonymous course sign-up from website | publicEnrollToCourse | None (signupToken for OTP) |
| Anonymous Beratung / Kontaktformular | createPublicLead | None (rate-limited + honeypot) |
| Public CMS-Block content | publicCmsBlocksByParent(parentID) | None |
| Authenticated user registers for a course | enrollToCourse / enrollCourse | JWT |
| Staff creates a full course registration | createCourseRegistration | JWT + ACL |
| Staff books a participant into a course | createCourseParticipant | JWT + ACL |
| Staff creates a new person record | createPerson | JWT + ACL |
See Public API for the complete list of anonymous endpoints, rate-limit ceilings and anti-spam safeguards. End-to-end examples for enrollment live under Enrollment.