GET /api/v1/student/{studentId}/units/courses

Retrieve all courses/units enrolled by a student - Legacy alias for /units

Path parameters

  • studentId string Required

    Unique identifier of the student

Responses

  • 200 application/json

    Student courses retrieved successfully

    Hide response attributes Show response attributes object
    • message string Required

      Success message

    • units array[object] Required

      Student courses/units

      Hide units attributes Show units attributes object
      • id string Required

        Student unit ID

      • unit object Required

        Unit offering information

        Hide unit attributes Show unit attributes object
        • id string Required

          Unit offering ID

        • Code string Required

          Unit code

        • personalizedOutline string

          Personalized outline

        • unitVersion object Required

          Unit version information

          Hide unitVersion attributes Show unitVersion attributes object
          • id string Required

            Unit version ID

          • title string Required

            Unit title

          • description string Required

            Unit description

          • totalMarks number Required

            Total marks

          • examMarks number Required

            Exam marks

          • otherMarks number Required

            Other marks

          • hasLabs boolean Required

            Has labs

        • semester object Required

          Semester information

          Hide semester attributes Show semester attributes object
          • id string Required

            Semester ID

          • name string Required

            Semester name

          • shortCode string Required

            Short code

          • startDate string Required

            Start date

          • endDate string Required

            End date

        • lecturer object Required

          Lecturer information

          Hide lecturer attributes Show lecturer attributes object
          • id string Required

            Lecturer ID

          • userId string Required

            User ID

          • user object Required

            User information

            Hide user attributes Show user attributes object
            • id string Required

              User ID

            • email string Required

              Email address

            • role string Required

              User role

              Values are STUDENT, LECTURER, or ADMIN.

            • status string Required

              User status

              Values are ACTIVE, SUSPENDED, or DELETED.

            • profile object

              User profile

              Hide profile attributes Show profile attributes object
              • id string Required

                Profile ID

              • fullName string Required

                Full name

              • phone string

                Phone number

              • createdAt string Required

                Created timestamp

              • updatedAt string Required

                Updated timestamp

            • createdAt string Required

              Created timestamp

            • updatedAt string Required

              Updated timestamp

        • studentGroupingsEnabled boolean Required

          Student groupings enabled

        • createdAt string Required

          Created timestamp

        • updatedAt string Required

          Updated timestamp

      • status string Required

        Unit status

        Values are ACTIVE, UNDER_REVIEW, PASSED, FAILED, RETAKE, EXTERNAL_REPEAT, NOT_STARTED, PAUSED, UNCATEGORIZED, or PENDING.

      • createdAt string Required

        Created timestamp

      • updatedAt string Required

        Updated timestamp

  • 400 application/json

    Default bad request error 400 response

    Hide response attributes Show response attributes object
    • message string Required

      Response message

    • error string Required
    • statusCode number Required
  • 404

    Student not found

GET /api/v1/student/{studentId}/units/courses
curl \
 --request GET 'http://localhost:3500/api/v1/student/uuid-string/units/courses'
Response examples (200)
{
  "message": "string",
  "units": [
    {
      "id": "uuid-string",
      "unit": {
        "id": "uuid-string",
        "Code": "CS201",
        "personalizedOutline": "string",
        "unitVersion": {
          "id": "uuid-string",
          "title": "Data Structures and Algorithms",
          "description": "Introduction to data structures and algorithms",
          "totalMarks": 100,
          "examMarks": 60,
          "otherMarks": 40,
          "hasLabs": true
        },
        "semester": {
          "id": "uuid-string",
          "name": "Fall 2023",
          "shortCode": "F23",
          "startDate": "2023-09-01T00:00:00.000Z",
          "endDate": "2023-12-31T23:59:59.000Z"
        },
        "lecturer": {
          "id": "uuid-string",
          "userId": "uuid-string",
          "user": {
            "id": "uuid-string",
            "email": "student@example.com",
            "role": "STUDENT",
            "status": "ACTIVE",
            "profile": {
              "id": "uuid-string",
              "fullName": "John Doe",
              "phone": "+1234567890",
              "createdAt": "2025-09-25T10:30:00.000Z",
              "updatedAt": "2025-09-25T10:30:00.000Z"
            },
            "createdAt": "2025-09-25T10:30:00.000Z",
            "updatedAt": "2025-09-25T10:30:00.000Z"
          }
        },
        "studentGroupingsEnabled": false,
        "createdAt": "2025-09-25T10:30:00.000Z",
        "updatedAt": "2025-09-25T10:30:00.000Z"
      },
      "status": "ACTIVE",
      "createdAt": "2025-09-25T10:30:00.000Z",
      "updatedAt": "2025-09-25T10:30:00.000Z"
    }
  ]
}
Response examples (400)
{
  "message": "string",
  "error": "string",
  "statusCode": 42.0
}