Update an existing unit offering. Can modify lecturer, semester, code, outline, or other properties. Cannot update if there are conflicts.
Body
Required
-
Update the unit version this offering is based on
-
Course intake ID (links to cohort intake)
-
Lecturer assigned to teach this unit offering
-
Semester when this unit is offered
-
Unique code for this unit offering (e.g., CS101-2024-1)
-
Customized outline for this specific offering
-
Whether to enable student groupings for collaborative work
Default value is
false.
PATCH
/api/v1/unit-offerings/{id}
curl \
--request PATCH 'http://localhost:3500/api/v1/unit-offerings/unit-offering-uuid' \
--header "Content-Type: application/json" \
--data '{"unitVersionId":"uuid-string-here","courseIntakeId":"uuid-string-here","lecturerId":"uuid-string-here","semesterId":"uuid-string-here","Code":"CS101-2024-1","personalizedOutline":"Modified outline with additional topics...","studentGroupingsEnabled":false}'
Request examples
{
"unitVersionId": "uuid-string-here",
"courseIntakeId": "uuid-string-here",
"lecturerId": "uuid-string-here",
"semesterId": "uuid-string-here",
"Code": "CS101-2024-1",
"personalizedOutline": "Modified outline with additional topics...",
"studentGroupingsEnabled": false
}
Response examples (200)
{
"message": "Unit offering updated successfully",
"success": true,
"offering": {
"id": "offering-uuid",
"Code": "CS101-2024-1-UPDATED",
"updatedAt": "2024-09-15T14:30:00Z",
"lecturerId": "new-lecturer-uuid",
"personalizedOutline": "Updated outline with new topics"
}
}
Response examples (400)
{
"error": "Bad Request",
"message": "Failed to update unit offering",
"statusCode": 400
}
Response examples (404)
{
"error": "Not Found",
"message": "Unit offering not found",
"statusCode": 404
}
Response examples (409)
{
"error": "Conflict",
"message": "Unit offering with code 'CS101-2024-1' already exists",
"statusCode": 409
}