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.

Schulungsteilnehmer

Overview

While the standard way to give users access to a training is through Offers and Enrollments, you can also add participants directly to a training. This is useful for:

  • Bulk-assigning users to trainings via an integration
  • Adding users to mandatory trainings without a registration flow
  • Managing trainer assignments

Add participants to a training

Adds one or more users as participants to a training. Supports both id and ref for trainings and users.

mutation {
  addUsersToTraining(
    trainingRef: "safety-2024"
    userRefs: ["EMP-001", "EMP-002", "EMP-003"]
    sendInvites: false
    role: PARTICIPANT
  ) {
    addedIds
    addedRefs
    alreadyAddedIds
    alreadyAddedRefs
    failedIds
    failedRefs
  }
}

Parameters

ParameterTypeDescription
trainingIdUUIDTraining UUID (use this OR trainingRef)
trainingRefStringTraining external ref (use this OR trainingId)
userIds[UUID!]User UUIDs (use this OR userRefs)
userRefs[String!]User external refs (use this OR userIds)
sendInvitesBooleanSend notification to users (default: true)
roleTrainingRolePARTICIPANT (default) or TRAINER

Remove participants from a training

Removes one or more users from a training.

mutation {
  removeUsersFromTraining(
    trainingRef: "safety-2024"
    userRefs: ["EMP-003"]
  ) {
    removedIds
    removedRefs
    alreadyRemovedIds
    alreadyRemovedRefs
    idsLinkedViaObject
    refsLinkedViaObject
    failedIds
    failedRefs
  }
}
Users who are linked to the training via a group or offer enrollment cannot be removed directly. These are returned in idsLinkedViaObject / refsLinkedViaObject. Remove the user from the group or enrollment instead.

Add trainers

You can add users as trainers by setting role: TRAINER:

mutation {
  addUsersToTraining(
    trainingId: "uuid-here"
    userIds: ["trainer-uuid"]
    role: TRAINER
  ) {
    addedIds
    failedIds
  }
}

When to use direct assignment vs. enrollment

ScenarioRecommended approach
Users register themselvesUse Offers & Enrollments
Admin assigns users one by oneUse Offers & Enrollments
Bulk-assign users from HRM systemUse addUsersToTraining (simpler)
Mandatory training for all usersUse addUsersToTraining (no registration needed)
Track attendance and enrollment statusUse Offers & Enrollments (more control)
Assign trainer to a learning journeyUse addUsersToTraining with role: TRAINER

Notes

  • Both id and ref work for identifying trainings and users.
  • The response clearly reports which users were added, already present, or failed.
  • Use sendInvites: false for bulk operations to avoid notification spam.
  • Users added directly can always be removed directly. Users added via groups or enrollments must be removed through those mechanisms.
  • The role parameter accepts PARTICIPANT or TRAINER.