GET /api/v1/unit-offerings

Retrieve all unit offerings with optional filtering by course intake, lecturer, semester, or unit version. Supports search by offering code.

Query parameters

  • courseIntakeId string

    Filter by course intake ID

  • lecturerId string

    Filter by lecturer ID

  • semesterId string

    Filter by semester ID

  • unitVersionId string

    Filter by unit version ID

  • codeSearch string

    Search by unit offering code (partial match)

  • status string

    Filter by status

    Values are ACTIVE, INACTIVE, or COMPLETED.

Responses

  • 200 application/json

    Unit offerings retrieved successfully

    Hide response attributes Show response attributes object
    • message string Required

      Response message

    • total number Required

      Total number of unit offerings

    • offerings array[object] Required

      List of unit offerings

      Hide offerings attributes Show offerings attributes object
      • id string Required

        Unit offering ID

      • Code string Required

        Unit offering code

      • unitVersionId string Required

        Unit version ID

      • courseIntakeId string Required

        Course intake ID

      • lecturerId string Required

        Lecturer ID

      • semesterId string Required

        Semester ID

      • personalizedOutline string

        Personalized outline

      • studentGroupingsEnabled boolean Required

        Whether student groupings are enabled

      • createdAt string Required

        Creation timestamp

      • updatedAt string Required

        Last update 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
  • 401

    Authentication required

  • 403

    Admin or Lecturer privileges required

GET /api/v1/unit-offerings
curl \
 --request GET 'http://localhost:3500/api/v1/unit-offerings'
Response examples (200)
{
  "total": 2,
  "message": "Unit offerings retrieved successfully",
  "offerings": [
    {
      "id": "offering-uuid-1",
      "Code": "CS101-2024-1",
      "lecturerId": "lecturer-uuid",
      "semesterId": "semester-uuid",
      "studentsCount": 25,
      "unitVersionId": "version-uuid",
      "courseIntakeId": "intake-uuid",
      "assignmentsCount": 3
    },
    {
      "id": "offering-uuid-2",
      "Code": "CS102-2024-1",
      "lecturerId": "lecturer-uuid-2",
      "semesterId": "semester-uuid",
      "studentsCount": 22,
      "unitVersionId": "version-uuid-2",
      "courseIntakeId": "intake-uuid",
      "assignmentsCount": 2
    }
  ]
}
Response examples (400)
{
  "message": "string",
  "error": "string",
  "statusCode": 42.0
}