DELETE /api/v1/unit-offerings/{id}

Delete a unit offering. Only allowed if there are no enrolled students or existing assessments. Admin privileges required.

Path parameters

  • id string Required

    Unit offering ID

Responses

  • 200 application/json

    Unit offering deleted successfully

  • 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 application/json

    Admin privileges required

  • 404 application/json

    Unit offering not found

  • 409 application/json

    Cannot delete offering with enrolled students or assessments

DELETE /api/v1/unit-offerings/{id}
curl \
 --request DELETE 'https://api.echoplain.social/api/v1/unit-offerings/unit-offering-uuid'
Response examples (200)
{
  "message": "Unit offering deleted successfully",
  "success": true
}
Response examples (400)
{
  "message": "string",
  "error": "string",
  "statusCode": 42.0
}
Response examples (403)
{
  "error": "Forbidden",
  "message": "Insufficient permissions. Admin role required.",
  "statusCode": 403
}
Response examples (404)
{
  "error": "Not Found",
  "message": "Unit offering not found",
  "statusCode": 404
}
Response examples (409)
{
  "error": "Conflict",
  "message": "Cannot delete unit offering with enrolled students or existing assessments. Consider archiving instead.",
  "statusCode": 409
}