Skip to main content
PATCH
/
api
/
v1
/
school
/
departments
/
{id}
Update departments partial
curl --request PATCH \
  --url https://api.example.com/api/v1/school/departments/{id}/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "hod": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "subject": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "is_deleted": true,
  "teachers": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ]
}
'
{
  "name": "<string>",
  "hod": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "subject": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "teachers": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "is_deleted": true,
  "updated_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

A UUID string identifying this department.

Body

Auto-populate created_by from request.user when available.

name
string
Required string length: 1 - 255
hod
string<uuid>
subject
string<uuid>
is_deleted
boolean
teachers
string<uuid>[]

Response

200 - application/json

Auto-populate created_by from request.user when available.

name
string
required
Maximum string length: 255
hod
string<uuid>
required
subject
string<uuid>
required
teachers
string<uuid>[]
required
id
string<uuid>
is_deleted
boolean
updated_at
string<date-time>
created_at
string<date-time>