Schools
Manage school registration, profiles, and logos.
All endpoints require
Authorization: Bearer <token>. TheX-SCHOOL-IDheader is not required for school-level endpoints.
List Schools
GET /schools
Returns a paginated list of all schools.
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
pageNumber | integer | Yes | 0 | Zero-indexed page |
pageSize | integer | Yes | 50 | Results per page |
Example
curl -X GET "https://api.vanillatots.com/schools?pageNumber=0&pageSize=25" \
-H "Authorization: Bearer $TOKEN"
Response 200 OK
{
"page_number": 0,
"page_size": 25,
"total_pages": 1,
"total": 3,
"data": [
{
"id": "uuid",
"name": "Sunrise Academy",
"abbreviation": "SA",
"imageUrl": "https://...",
"phoneNumber": "+2348012345678",
"emailAddress": "info@sunrise.edu.ng"
}
]
}
Create School
POST /schools
Register a new school. Accepts both application/json and multipart/form-data.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | School name |
physical_address | string | Yes | School location |
email_address | Yes | Contact email | |
phone_number | string | Yes | Contact phone |
abbreviation | string | Yes | Short abbreviation (e.g., "SA") |
Example
curl -X POST https://api.vanillatots.com/schools \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Sunrise Academy",
"physical_address": "42 School Road, Lagos",
"email_address": "info@sunrise.edu.ng",
"phone_number": "+2348012345678",
"abbreviation": "SA"
}'
Response 200 OK — Returns the created SchoolResponse.
Get School
GET /schools/{id}
Retrieve a single school by ID.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | School ID |
Response 200 OK — Returns a SchoolResponse object.
Upload School Logo
PATCH /schools/{schoolId}/upload-logo
Upload or replace the school's logo/badge image.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
schoolId | uuid | School ID |
Request Body — multipart/form-data
| Field | Type | Required | Description |
|---|---|---|---|
logo | binary | Yes | Image file for the school badge |
Example
curl -X PATCH https://api.vanillatots.com/schools/{schoolId}/upload-logo \
-H "Authorization: Bearer $TOKEN" \
-F "logo=@/path/to/logo.png"
Response 200 OK — Returns the updated SchoolResponse.