PATCH /api/v1/department/{id}

Path parameters

  • id string Required
application/json

Body Required

  • name string
  • instituteId string
  • lecturerInchargeID string

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • message string Required

      Response message

    • department object Required
      Hide department attributes Show department attributes object
      • createdAt string(date-time) Required

        The date and time the resource was created

      • updatedAt string(date-time) Required

        The date and time the resource was last updated

      • id string Required

        Item ID

      • name string Required

        Name of the department

      • instituteid string Required

        id of the parent insitute

  • 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
PATCH /api/v1/department/{id}
curl \
 --request PATCH 'http://localhost:3500/api/v1/department/{id}' \
 --header "Content-Type: application/json" \
 --data '{"name":"Department of computer science and IT","instituteId":"efc-ded-ciejd-ed-e","lecturerInchargeID":"string"}'
Request examples
{
  "name": "Department of computer science and IT",
  "instituteId": "efc-ded-ciejd-ed-e",
  "lecturerInchargeID": "string"
}
Response examples (200)
{
  "message": "string",
  "department": {
    "createdAt": "2025-05-04T09:42:00Z",
    "updatedAt": "2025-05-04T09:42:00Z",
    "id": "string",
    "name": "string",
    "instituteid": "string"
  }
}
Response examples (400)
{
  "message": "string",
  "error": "string",
  "statusCode": 42.0
}