Developer docs
De Pluvo API geeft je programmatische toegang tot je leeromgeving. Beheer gebruikers, groepen, trainingen, inschrijvingen en certificaten vanuit je eigen systemen.
De API is gebaseerd op GraphQL. Je bepaalt zelf welke data je opvraagt of muteert, zonder overbodige velden. Authenticatie verloopt via OAuth 2.0 met client credentials. Webhooks houden je systemen real-time op de hoogte van wijzigingen.
Use Cases
Enrollments in Pluvo are processed through an OfferEvent. A user does not enroll directly in a training, but in a specific entry moment within an offering. This page covers the enrollment mutations for managing enrollments programmatically.
Enroll users in an event (bulk)
Enrolls one or more users in a specific offer event. You can identify both the event and users by id or ref.
mutation {
createOfferEventEnrollments(
offerEventId: "uuid-event"
userIds: ["uuid-user-1", "uuid-user-2"]
sendMail: false
sendNotification: true
) {
id
user { id name email }
status
}
}Using ref instead of id:
mutation {
createOfferEventEnrollments(
offerEventRef: "event-sept-2024"
userRefs: ["EMP-001", "EMP-002"]
sendMail: false
) {
id
user { id name ref }
status
}
}Update enrollment status
Changes the status of one or more enrollments. Use this to approve, waitlist, or cancel enrollments.
mutation {
updateOfferEventEnrollments(
offerEventEnrollmentIds: ["enrollment-uuid-1", "enrollment-uuid-2"]
status: APPROVED
sendMail: true
) {
id
status
user { name }
}
}Delete enrollments (unenroll)
Removes one or more enrollments entirely.
mutation {
deleteOfferEventEnrollments(
offerEventEnrollmentIds: ["enrollment-uuid-1"]
) {
ok
}
}Self-enrollment (current user)
For scenarios where the authenticated user enrolls themselves:
mutation {
offerEventEnrollCurrentUser(offerEventId: "uuid-event") {
ok
}
}Self-unenrollment
mutation {
offerEventUnenrollCurrentUser(
offerEventId: "uuid-event"
reason: "Schedule conflict"
) {
ok
}
}GraphQL Definitions
Enrollment Mutations
createOfferEventEnrollments(
offerEventId: UUID
offerEventRef: String
userIds: [UUID!]
userRefs: [String!]
groupId: UUID
sendMail: Boolean = true
sendNotification: Boolean = true
): [OfferEventEnrollmentManageable!]!
updateOfferEventEnrollments(
offerEventEnrollmentIds: [UUID!]!
status: OfferEventSubscriptionStatus!
reason: String
sendMail: Boolean = true
sendNotification: Boolean = true
): [OfferEventEnrollmentManageable!]!
deleteOfferEventEnrollments(
offerEventEnrollmentIds: [UUID!]!
): DeleteOfferEventEnrollments
offerEventEnrollCurrentUser(
offerEventId: UUID!
forGroupId: UUID
): OfferEventEnrollCurrentUser
offerEventUnenrollCurrentUser(
offerEventId: UUID!
reason: String
): OfferEventUnenrollCurrentUserEnrollment Status
enum OfferEventSubscriptionStatus {
PENDING
APPROVED
WAITLISTED
CANCELLED
DECLINED
}Notes
- Use
createOfferEventEnrollmentsfor programmatic enrollment — it supports bothidandreffor events and users, and allows bulk enrollment. - Enrollment IDs are needed for updates and deletes. Get them from the create mutation response or from the offer event's enrollment list.
sendMail: falseis recommended for bulk operations to prevent email spam.groupIdcan be passed to enroll all members of a group at once.- The self-enrollment mutations (
offerEventEnrollCurrentUser) are intended for end-user flows, not integrations. - Enrollment webhooks (
OFFER_EVENT_ENROLLED,OFFER_EVENT_ENROLLMENT_STATUS_UPDATED,OFFER_EVENT_UNENROLLED) fire automatically when enrollments change.