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. In this API documentation, you'll see how to enroll users, unenroll them, and retrieve enrollment information.
Check if a user is enrolled in a specific event, including status and date.
query {
enrollment(userId: "uuid-user", offerEventId: "uuid-event") {
id
status
enrolledAt
}
}
Provides an overview of all events for which a user is enrolled.
query {
enrollments(userId: "uuid-user") {
id
offerEvent {
id
title
}
status
}
}
Enrolls a user in a specific offer-event. You can optionally specify the status directly (ENROLLED
, WAITLISTED
, etc.).
mutation {
enrollUserInOfferEvent(
enrollment: {
userId: "uuid-user"
offerEventId: "uuid-event"
status: ENROLLED
}
) {
enrollment {
id
status
}
}
}
Removes an enrollment or changes the status to CANCELLED
.
mutation {
unenrollUserFromOfferEvent(
userId: "uuid-user"
offerEventId: "uuid-event"
) {
success
}
}
Enrollment
Provides the enrollment status of a user for a specific event.
type Enrollment {
id: ID!
userId: ID!
offerEventId: ID!
status: EnrollmentStatus!
enrolledAt: DateTime!
}
EnrollmentStatus
enum EnrollmentStatus {
ENROLLED
WAITLISTED
CANCELLED
DECLINED
}
enrollment(userId: UUID!, offerEventId: UUID!): Enrollment
enrollments(userId: UUID): [Enrollment!]!
enrollUserInOfferEvent(enrollment: EnrollUserInput!): EnrollUserPayload
unenrollUserFromOfferEvent(userId: UUID!, offerEventId: UUID!): UnenrollUserPayload
WAITLISTED
is used when the event is full but a waitlist is active.CANCELLED
and DECLINED
distinguish between active and passive cancellation.