Entity Registration Order
Certificates in DokStamp bind together multiple entities — institution, course, student, file. Each entity depends on others already existing. This page shows the exact order you must follow and which steps are optional.This is the most common source of
422 validation errors for new integrations. Bookmark this page.Dependency map
Step-by-step order
Authenticate
Endpoint:
POST /auth/loginObtain your access_token and refresh_token. All subsequent requests require the Bearer token in the Authorization header.→ Authentication referenceCreate an Institution
Endpoint:
POST /institutionsThe institution is the issuing body. It is required for courses, modules, certificate templates, and certificates. Create this first.→ Institutions referenceCreate an Organization (optional)
Endpoint:
POST /organizationsOrganizations are sub-units of an institution (faculties, departments, campuses). Courses can be linked to an organization, but it is not required.→ Organizations referenceCreate Module(s)
Endpoint:
POST /modulesModules are the building blocks of courses — individual subjects or disciplines. Create all modules you need before creating the course.→ Modules referenceCreate a Course
Endpoint:
POST /coursesA course defines the program of study. Requires an institution_uuid. Optionally linked to an organization_uuid.→ Courses referenceAttach Modules to the Course
Endpoint:
POST /courses/{course_uuid}/attach/modulesModules are not automatically linked to courses. You must explicitly attach them. You can also assign modules to module groups and define ordering.→ Course Modules referenceCreate a Cohort (optional)
Endpoint:
POST /cohortsA cohort is a specific intake or class (e.g., “Class of 2024 — Evening”). Cohorts are linked to a course. Use cohorts when you issue certificates for distinct graduating classes.→ Cohorts referenceUpload the Certificate PDF
Endpoint:
POST /filesUpload the PDF file of the certificate. The response returns a uuid — this is your file_uuid. A file can only be attached to one certificate; it is marked as used on attachment.→ Files referenceCreate a Certificate Template (optional)
Endpoint:
POST /certificate-templatesTemplates define the visual design of certificates (including Canva configuration). They are reusable across many certificates. Skip if you are providing pre-rendered PDFs.→ Certificate Templates referenceCreate a Student
Endpoint:
POST /studentsStudents are independent of institutions and courses — they exist at the tenant level. Create (or look up) the student before issuing a certificate.→ Students referenceCreate an Enrollment (optional)
Endpoint:
POST /enrollmentsAn enrollment links a student to a course (and optionally a cohort). It tracks academic progression, grade, and completion status. Pass the enrollment_uuid on the certificate for full traceability.→ Enrollments referenceIssue the Certificate
Endpoint:
POST /certificatesCombine all the entities above into a certificate. The minimum required fields are institution_uuid, course_uuid, student_uuid, and file_uuid.→ Certificates referenceAt a glance
| Step | Endpoint | Required? | Depends on |
|---|---|---|---|
| 1 | POST /auth/login | Yes | — |
| 2 | POST /institutions | Yes | Tenant |
| 3 | POST /organizations | No | Institution |
| 4 | POST /modules | No* | Institution |
| 5 | POST /courses | Yes | Institution |
| 6 | POST /courses/{id}/attach/modules | No* | Course + Modules |
| 7 | POST /cohorts | No | Course |
| 8 | POST /files | Yes | — |
| 9 | POST /certificate-templates | No | Institution |
| 10 | POST /students | Yes | — |
| 11 | POST /enrollments | No | Student + Course |
| 12 | POST /certificates | Yes | All of the above |
Reusing existing entities
In production, you will not repeat every step for every certificate. Most entities are registered once and reused:- Institution, Organization, Course, Modules — registered once per academic catalog update.
- Students — registered once per person (search before creating to avoid duplicates).
- Cohorts — registered once per graduating class.
- Files — each certificate needs its own unique file upload.
- Certificates — one per student per credential event.
GET /students?where[email]=student@email.com to look up existing students before creating new ones.