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
1
Authenticate
Endpoint:
POST /auth/loginObtain your access_token and refresh_token. All subsequent requests require the Bearer token in the Authorization header.→ Authentication reference2
Create an Institution
Endpoint:
POST /institutionsThe institution is the issuing body. It is required for courses, modules, certificate templates, and certificates. Create this first.→ Institutions reference3
Create 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 reference4
Create 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 reference5
Create a Course
Endpoint:
POST /coursesA course defines the program of study. Requires an institution_uuid. Optionally linked to an organization_uuid.→ Courses reference6
Attach 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 reference7
Create 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 reference8
Upload 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 reference9
Create 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 reference10
Create 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 reference11
Create 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 reference12
Issue 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
*Optional unless you need module-level academic transcripts.
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[user][email]=student@email.com to look up existing students before creating new ones.