Promote a cohort to a new semester and update enrollments

POST /api/v1/promotion/cohort
application/json

Body Required

  • cohortId string Required

    Cohort ID to promote

  • toSemesterId string Required

    Target Semester ID

Responses

  • 200 application/json

    Cohort promoted; StudentUnit enrollments and statuses updated

  • 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
POST /api/v1/promotion/cohort
curl \
 --request POST 'http://localhost:3500/api/v1/promotion/cohort' \
 --header "Content-Type: application/json" \
 --data '{"cohortId":"123e4567-e89b-12d3-a456-426614174000","toSemesterId":"789e0123-e89b-12d3-a456-426614174000"}'
Request examples
{
  "cohortId": "123e4567-e89b-12d3-a456-426614174000",
  "toSemesterId": "789e0123-e89b-12d3-a456-426614174000"
}
Response examples (200)
{
  "message": "Cohort promoted and enrollments updated",
  "success": true,
  "cohortId": "123e4567-e89b-12d3-a456-426614174000",
  "toSemesterId": "789e0123-e89b-12d3-a456-426614174000",
  "enrolledOfferings": 5
}
Response examples (400)
{
  "message": "string",
  "error": "string",
  "statusCode": 42.0
}