Docs Guides
Certificates
Design certificates with merge fields, issue them automatically, and let anyone verify them.
Designs#
A design is a page size, orientation, an optional background and a layout of elements. Positions and sizes are fractions of the page (0 to 1), so a design works at any size.
{
"name": "Classic",
"pageSize": "A4",
"orientation": "LANDSCAPE",
"layout": { "elements": [
{ "type": "TEXT", "x": 0.1, "y": 0.3, "width": 0.8, "text": "{{learner.full_name}}", "fontSize": 32, "align": "CENTER", "bold": true },
{ "type": "TEXT", "x": 0.1, "y": 0.5, "width": 0.8, "text": "completed {{course.title}} on {{issued_on}}", "align": "CENTER" }
] }
}
Unknown merge fields are rejected when you save, so a typo can never be printed on a certificate. GET /certificate-templates/merge-fields lists the valid ones.
Issuing#
Set certificateTemplateId (and optionally certificateValidityDays) on the course draft. When a learner completes the course a certificate is issued with:
- a per-tenant
serial(likeNBL-AB12-CD34) - an unguessable verification code
- an expiry, if you set one
Issued certificates are snapshots#
Everything needed to re-render it (layout and resolved fields) is stored at issue time. Editing or archiving a design later never changes a certificate already issued.
Downloading and revoking#
| Who | Call |
|---|---|
| Learner | GET /me/certificates, GET /me/certificates/{id}/pdf |
| Staff or API | GET /certificates, GET /certificates/{id}/pdf, POST /certificates/{id}/revoke |
Revoking records a reason, never deletes. A learner downloading a revoked certificate gets 410.
Public verification#
GET /public/certificates/{code} needs no sign-in. It returns validity, status (VALID, EXPIRED, REVOKED), serial, learner name, course, issuer and dates, and never an email address or internal id. Link to it from your own verification page.
Note
PDFs are set in Inter, embedded in the file. Latin (including accented and Vietnamese), Greek and Cyrillic names and titles all render correctly. Scripts Inter doesn’t cover, such as Chinese, Japanese, Korean, Arabic, Hebrew and Thai, print as ?.