> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dokstamp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Enrollments

> Link students to courses and cohorts. Enrollments track academic progression and grades.

# Enrollments

An enrollment represents a student's registration in a course. It tracks when the student enrolled, their completion status, and their final grade. Enrollments are optional for certificate issuance but provide full academic traceability when included.

***

## The enrollment object

```json theme={null}
{
  "uuid": "g7h8i9j0-k1l2-3456-mnop-567890123456",
  "completion_status": "completed",
  "grade": 8.75,
  "enrolled_at": "2024-02-01T00:00:00.000000Z",
  "completed_at": "2027-12-20T00:00:00.000000Z",
  "student": {
    "uuid": "f6a7b8c9-d0e1-2345-fghi-456789012345",
    "name": "Maria Fernanda Silva"
  },
  "course": {
    "uuid": "c3d4e5f6-a7b8-9012-cdef-123456789012",
    "name": "Bachelor of Computer Science"
  },
  "cohort": {
    "uuid": "e5f6a7b8-c9d0-1234-efgh-345678901234",
    "code": "BCS-2024-EVE"
  }
}
```

| Field               | Type         | Description                                    |
| ------------------- | ------------ | ---------------------------------------------- |
| `uuid`              | string       | Unique identifier                              |
| `completion_status` | enum         | `enrolled`, `completed`, `dropped`             |
| `grade`             | decimal      | Final grade (0–10, 2 decimal places), nullable |
| `enrolled_at`       | datetime     | Enrollment date                                |
| `completed_at`      | datetime     | Completion/graduation date, nullable           |
| `student`           | object       | The enrolled student                           |
| `course`            | object       | The course                                     |
| `cohort`            | object\|null | The cohort, if applicable                      |

***

## List enrollments

```http theme={null}
GET /enrollments
```

<CodeGroup>
  ```bash cURL theme={null}
  # List all completed enrollments for a course
  curl "https://api.dokstamp.com/enrollments?where[completion_status]=completed&where[course_uuid]=c3d4e5f6-a7b8-9012-cdef-123456789012" \
    -H "Authorization: Bearer {TOKEN}" \
    -H "Accept: application/json" \
    -H "X-Tenant: {TENANT}"
  ```
</CodeGroup>

***

## Create an enrollment

```http theme={null}
POST /enrollments
```

| Parameter           | Type    | Required | Description                                  |
| ------------------- | ------- | -------- | -------------------------------------------- |
| `student_uuid`      | string  | Yes      | Student UUID                                 |
| `course_uuid`       | string  | Yes      | Course UUID                                  |
| `enrolled_at`       | date    | Yes      | Enrollment date (`YYYY-MM-DD`)               |
| `cohort_uuid`       | string  | No       | Cohort UUID                                  |
| `completion_status` | enum    | No       | `enrolled` (default), `completed`, `dropped` |
| `grade`             | decimal | No       | Final grade (min: 0)                         |
| `completed_at`      | date    | No       | Completion date                              |

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.dokstamp.com/enrollments \
    -H "Authorization: Bearer {TOKEN}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "X-Tenant: {TENANT}" \
    -d '{
      "student_uuid": "f6a7b8c9-d0e1-2345-fghi-456789012345",
      "course_uuid": "c3d4e5f6-a7b8-9012-cdef-123456789012",
      "cohort_uuid": "e5f6a7b8-c9d0-1234-efgh-345678901234",
      "enrolled_at": "2024-02-01",
      "completion_status": "completed",
      "grade": 8.75,
      "completed_at": "2027-12-20"
    }'
  ```
</CodeGroup>

***

## Get, update, delete

```http theme={null}
GET    /enrollments/{uuid}
PATCH  /enrollments/{uuid}
PUT    /enrollments/{uuid}
DELETE /enrollments/{uuid}
DELETE /enrollments/batch/destroy
```

<Info>
  The `enrollment_uuid` is an optional field on `POST /certificates`. Including it links the certificate to the specific enrollment record, enabling full traceability from enrollment to credential issuance.
</Info>
