Skip to main content

Students

Manage student records, enrollment, photos, and promotions.

All endpoints require Authorization: Bearer <token> and X-SCHOOL-ID headers unless noted otherwise.


List Students

GET /students

Returns a paginated list of students for the current school.

Query Parameters

ParameterTypeRequiredDefaultDescription
pageNumberintegerYes0Zero-indexed page number
pageSizeintegerYes50Number of results per page
searchstringNoSearch by student name
admission_numberstringNoFilter by admission number
batch_iduuidNoFilter by cohort batch ID

Example

curl -X GET "https://api.vanillatots.com/students?pageNumber=0&pageSize=25" \
-H "Authorization: Bearer $TOKEN" \
-H "X-SCHOOL-ID: $SCHOOL_ID"

Response 200 OK

{
"page_number": 0,
"page_size": 25,
"total_pages": 6,
"total": 150,
"data": [
{
"id": "uuid",
"first_name": "John",
"last_name": "Doe",
"other_names": "Middle",
"admission_number": "STU-001",
"admission_date": "2024-01-15",
"date_of_birth": "2012-05-20",
"gender": "Male",
"religion": "Christianity",
"blood_group": "O+",
"nationality": "Nigerian",
"state_of_origin": "Benue",
"lga_of_origin": "Makurdi",
"health_info": "None",
"school": "uuid",
"image_url": "https://...",
"user": "uuid",
"username": "john.doe",
"active": true,
"deleted_at": null
}
]
}

Create Student

POST /students

Register a new student in the current school.

Request Body

FieldTypeRequiredDescription
first_namestringYesStudent's first name
last_namestringYesStudent's last name
other_namesstringYesMiddle or other names
admission_numberstringYesUnique admission number
admission_datedateYesDate of admission (YYYY-MM-DD)
date_of_birthdateYesDate of birth (YYYY-MM-DD)
genderstringYesGender
religionstringYesReligion
blood_groupstringYesBlood group
nationalitystringYesNationality
state_of_originstringYesState of origin
lga_of_originstringYesLGA of origin
health_infostringYesHealth information
batchuuidYesCohort batch to enroll into
image_urlstringYesProfile image URL
contactobjectYesParent/guardian contact info

The contact object:

FieldTypeRequiredDescription
owneruuidYesContact owner user ID
email_addressemailYesContact email
phone_numberstringYesContact phone number
physical_addressstringYesContact physical address

Example

curl -X POST https://api.vanillatots.com/students \
-H "Authorization: Bearer $TOKEN" \
-H "X-SCHOOL-ID: $SCHOOL_ID" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Jane",
"last_name": "Smith",
"other_names": "",
"admission_number": "STU-042",
"admission_date": "2024-09-01",
"date_of_birth": "2013-03-15",
"gender": "Female",
"religion": "Islam",
"blood_group": "A+",
"nationality": "Nigerian",
"state_of_origin": "Lagos",
"lga_of_origin": "Ikeja",
"health_info": "Asthmatic",
"batch": "batch-uuid",
"image_url": "",
"contact": {
"owner": "parent-uuid",
"email_address": "parent@email.com",
"phone_number": "+2348012345678",
"physical_address": "123 Main Street, Lagos"
}
}'

Response 200 OK — Returns the created StudentResponse.


Get Student

GET /students/{id}

Retrieve a single student by their UUID.

Path Parameters

ParameterTypeDescription
iduuidStudent ID

Example

curl -X GET https://api.vanillatots.com/students/{id} \
-H "Authorization: Bearer $TOKEN"

Response 200 OK — Returns a StudentResponse object.


Move Student

PUT /students/{id}/move

Transfer a student from one cohort batch to another.

Path Parameters

ParameterTypeDescription
iduuidStudent ID

Request Body

FieldTypeRequiredDescription
studentIduuidYesStudent ID
oldBatchuuidYesCurrent batch ID
newBatchuuidYesTarget batch ID

Example

curl -X PUT https://api.vanillatots.com/students/{id}/move \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"studentId": "student-uuid",
"oldBatch": "old-batch-uuid",
"newBatch": "new-batch-uuid"
}'

Response 200 OK — Returns the updated StudentResponse.


Upload Student Photo

PUT /students/{id}/upload-photo

Upload or update a student's profile photo.

Path Parameters

ParameterTypeDescription
iduuidStudent ID

Query Parameters

ParameterTypeRequiredDescription
filebinaryYesImage file

Response 200 OK — Returns the updated StudentResponse.


Promote Students

PUT /students/promote

Bulk promote students from one cohort batch to another.

Request Body

FieldTypeRequiredDescription
from_batchuuidYesSource batch ID
to_batchuuidYesDestination batch ID
studentsuuid[]YesArray of student IDs to promote

Example

curl -X PUT https://api.vanillatots.com/students/promote \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"request": {
"from_batch": "old-batch-uuid",
"to_batch": "new-batch-uuid",
"students": ["student-uuid-1", "student-uuid-2"]
}
}'

Response 200 OK — Returns an array of updated StudentResponse objects.


Recycle Bin

GET /students/bin

List soft-deleted students.

Example

curl -X GET https://api.vanillatots.com/students/bin \
-H "Authorization: Bearer $TOKEN" \
-H "X-SCHOOL-ID: $SCHOOL_ID"

Response 200 OK — Returns an array of StudentResponse objects.