Classrooms
Manage physical or logical classroom definitions within a school.
All endpoints require
Authorization: Bearer <token>andX-SCHOOL-IDheaders.
List Classrooms
GET /classrooms
Returns all classrooms for the current school.
Example
curl -X GET https://api.vanillatots.com/classrooms \
-H "Authorization: Bearer $TOKEN" \
-H "X-SCHOOL-ID: $SCHOOL_ID"
Response 200 OK
[
{
"id": "uuid",
"name": "JSS 1A",
"school": "school-uuid"
}
]
Create Classroom
POST /classrooms
Create a new classroom.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Classroom name (e.g., "JSS 1A") |
level | string | Yes | Education level (e.g., "Junior Secondary") |
Example
curl -X POST https://api.vanillatots.com/classrooms \
-H "Authorization: Bearer $TOKEN" \
-H "X-SCHOOL-ID: $SCHOOL_ID" \
-H "Content-Type: application/json" \
-d '{
"name": "JSS 1B",
"level": "Junior Secondary"
}'
Response 200 OK — Returns the created ClassroomResponse.
Get Classroom
GET /classrooms/{id}
Retrieve a single classroom by ID.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | uuid | Classroom ID |
Response 200 OK — Returns a ClassroomResponse object.