{
// Required Fields
"username": "student2",
"email": "student2@gmail.com",
"password": "student2",
"first_name": "student2",
"second_name": "student2",
"gender": "m",
"birth_date": "2002-02-02",
"user_type": 2, // 1 => Admin, 2 => Instructor, 3 => Student
"department": 1, // Student Must be in exists department
"level": 1, // Student Must be in exists level
"courses": [
1
],
// Optional Fields
"third_name": "student2",
"fourth_name": "student2",
"last_name": "student2",
"city": "Cairo",
"address": "Address",
"phone": "+201111111111",
"is_active": true,
"is_staff": false,
"is_superuser": false
}
curl --location --request POST 'http://127.0.0.1:80/api/accounts/students/' \
--header 'Content-Type: application/json' \
--data-raw '{
// Required Fields
"username": "student2",
"email": "student2@gmail.com",
"password": "student2",
"first_name": "student2",
"second_name": "student2",
"gender": "m",
"birth_date": "2002-02-02",
"user_type": 2, // 1 => Admin, 2 => Instructor, 3 => Student
"department": 1, // Student Must be in exists department
"level": 1, // Student Must be in exists level
"courses": [
1
],
// Optional Fields
"third_name": "student2",
"fourth_name": "student2",
"last_name": "student2",
"city": "Cairo",
"address": "Address",
"phone": "+201111111111",
"is_active": true,
"is_staff": false,
"is_superuser": false
}'
{
"url": "http://127.0.0.1:80/api/accounts/students/6/",
"id": 6,
"username": "student1",
"email": "student1@gmail.com",
"first_name": "student1",
"second_name": "student1",
"third_name": "student1",
"fourth_name": "student1",
"last_name": "student1",
"gender": "m",
"birth_date": "2002-02-02",
"city": "Cairo",
"address": "Address",
"phone": "+201111111111",
"department": {
"id": 1,
"title": "Network"
},
"level": 1,
"courses": [
{
"id": 1,
"title": "django"
}
],
"is_active": true,
"is_staff": false,
"is_superuser": false,
"date_joined": "2024-03-16T20:56:46.449109Z",
"user_type": 3
}