Skip to main content
PATCH
/
api
/
v1
/
school
/
teachers
/
{id}
Update teachers partial
curl --request PATCH \
  --url https://api.example.com/api/v1/school/teachers/{id}/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "first_name": "<string>",
  "last_name": "<string>",
  "id_number": "<string>",
  "phone": "<string>",
  "gender": "Male",
  "email": "jsmith@example.com",
  "is_active": true,
  "ec_number": "<string>",
  "is_deleted": true,
  "subjects": "<unknown>"
}
'
{
  "first_name": "<string>",
  "last_name": "<string>",
  "id_number": "<string>",
  "phone": "<string>",
  "gender": "Male",
  "ec_number": "<string>",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "email": "jsmith@example.com",
  "is_active": true,
  "date_joined": "2023-11-07T05:31:56Z",
  "is_deleted": true,
  "subjects": "<unknown>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_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 teacher.

Body

Auto-populate created_by from request.user when available.

user_id
string<uuid> | null
first_name
string
Required string length: 1 - 255
last_name
string
Required string length: 1 - 255
id_number
string
Required string length: 1 - 255
phone
string
Required string length: 1 - 255
gender
enum<string>
  • Male - Male
  • Female - Female
Available options:
Male,
Female
email
string<email> | null
Maximum string length: 254
is_active
boolean
ec_number
string
Required string length: 1 - 255
is_deleted
boolean
subjects
any

Response

200 - application/json

Auto-populate created_by from request.user when available.

first_name
string
required
Maximum string length: 255
last_name
string
required
Maximum string length: 255
id_number
string
required
Maximum string length: 255
phone
string
required
Maximum string length: 255
gender
enum<string>
required
  • Male - Male
  • Female - Female
Available options:
Male,
Female
ec_number
string
required
Maximum string length: 255
id
string<uuid>
user_id
string<uuid> | null
email
string<email> | null
Maximum string length: 254
is_active
boolean
date_joined
string<date-time>
is_deleted
boolean
subjects
any
created_at
string<date-time>
updated_at
string<date-time>