Certificate

English only

Use Cases

Certificates are official documents that participants receive after successfully completing a training or e-learning course. In Pluvo, certificates are issued based on a predefined template (design). These are then automatically or via a mutation assigned to users. Certificates subsequently appear as a PortfolioItem.

Retrieve available certificates (templates)

Use this query to retrieve available certificates and their id. You'll then use this id when issuing via a mutation.

query {
  certificates {
    edges {
      node {
        id
        name
        title
      }
    }
  }
}

Issue certificate to user(s)

Use the generateCertificate mutation to assign an existing certificate to one or more users. You can optionally link a training and provide a specific issue date.

mutation {
  generateCertificate(
    id: "uuid-certificate-template"
    title: "Project Management Certificate"
    userIds: ["uuid-user"]
    trainingId: "uuid-training"
    issueDate: "2024-01-01T00:00:00Z"
  ) {
    bulkGenerate {
      succeededIds
      failedIds
    }
  }
}

GraphQL Definitions

Query

certificates(first: Int, after: String, last: Int, before: String): CertificateConnection

This query returns a list of available certificates (templates) as a connection, following the GraphQL Relay-specific pattern. This provides support for cursor-based pagination via first, after, last, and before.

Structure

type CertificateConnection {
  pageInfo: PageInfo!
  edges: [CertificateEdge]!
  count: Int
}

type CertificateEdge {
  node: Certificate
  cursor: String!
}

type PageInfo {
  hasNextPage: Boolean!
  hasPreviousPage: Boolean!
  startCursor: String
  endCursor: String
}

Example with pagination

query {
  certificates(first: 10) {
    edges {
      node {
        id
        name
        title
      }
      cursor
    }
    pageInfo {
      hasNextPage
      endCursor
    }
    count
  }
}

You can use endCursor as the after value for the next page, and in this way browse through all certificates.

Mutation

generateCertificate(
  id: UUID!,
  title: String,
  userIds: [UUID!]!,
  trainingId: UUID,
  issueDate: DateTime
): GenerateCertificate

Issues the specified certificate to one or more users.

Types

type Certificate {
  id: UUID!
  name: String
  title: String
}

type GenerateCertificate {
  bulkGenerate: BulkAction!
}

type BulkAction {
  succeededIds: [UUID!]!
  failedIds: [UUID!]!
}

Notes

  • Use exclusively the generateCertificate mutation to assign certificates.
  • Creating a certificate via createPortfolioItem is not correct and is not recommended.
  • Certificates automatically appear in the user's portfolio once they are generated.
  • Use the webhook EVENT_CERTIFICATE_ACHIEVED to receive notifications of automatic issuance.
Close notification