Skip to main content

Cohorts

A cohort represents a specific intake or graduating class for a course — for example, “Evening Class 2024/1” or “Remote Cohort — March 2025”. Cohorts are optional but allow you to group enrollments and certificates by graduating class.

The cohort object

{
  "uuid": "e5f6a7b8-c9d0-1234-efgh-345678901234",
  "code": "BCS-2024-EVE",
  "modality": "hybrid",
  "start_date": "2024-02-01T00:00:00.000000Z",
  "end_date": "2027-12-31T00:00:00.000000Z",
  "course": {
    "uuid": "c3d4e5f6-a7b8-9012-cdef-123456789012",
    "name": "Bachelor of Computer Science"
  }
}
FieldTypeDescription
uuidstringUnique identifier
codestringUnique cohort code
modalityenumpresential, remote, hybrid
start_datedatetimeCohort start date
end_datedatetimeCohort end date (expected graduation)

List cohorts

GET /cohorts
curl "https://api.dokstamp.eu/cohorts?where[course_uuid]=c3d4e5f6-a7b8-9012-cdef-123456789012" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Accept: application/json" \
  -H "X-Tenant: {TENANT}"

Create a cohort

POST /cohorts
ParameterTypeRequiredDescription
course_uuidstringYesParent course UUID
codestringYesUnique cohort code
modalityenumNopresential, remote, hybrid
start_datedatetimeNoCohort start date
end_datedatetimeNoExpected end/graduation date
curl -X POST https://api.dokstamp.eu/cohorts \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Tenant: {TENANT}" \
  -d '{
    "course_uuid": "c3d4e5f6-a7b8-9012-cdef-123456789012",
    "code": "BCS-2024-EVE",
    "modality": "hybrid",
    "start_date": "2024-02-01T00:00:00Z",
    "end_date": "2027-12-31T00:00:00Z"
  }'

Get, update, delete

GET    /cohorts/{uuid}
PATCH  /cohorts/{uuid}
PUT    /cohorts/{uuid}
DELETE /cohorts/{uuid}
DELETE /cohorts/batch/destroy