Skip to main content

Settings

Manage school configuration including departments, employee categories, positions, and grade configurations.

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


Departments

List Departments

GET /departments

Returns all departments for the current school.

Example

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

Response 200 OK

[
{
"id": "uuid",
"name": "Science",
"createdAt": "2024-01-15T10:30:00Z"
}
]

Create Department

POST /departments

Create a new department.

Request Body

FieldTypeRequiredDescription
namestringYesDepartment name

Response 200 OK — Returns the created DepartmentResponse.


Employee Categories

List Employee Categories

GET /employee-categories

Returns all employee categories (e.g., Academic Staff, Non-Academic Staff).

Example

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

Response 200 OK

[
{
"id": "uuid",
"name": "Academic Staff"
}
]

Positions

List Positions

GET /positions

Returns all job positions defined for the school.

Example

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

Response 200 OK

[
{
"id": "uuid",
"name": "Head Teacher"
}
]

Grade Configurations

List Grade Configs

GET /grade-configs

Returns the grading scale configuration for the school (grade boundaries, letter grades, and remarks).

Example

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

Response 200 OK

[
{
"id": "uuid",
"lower_threshold": 70.0,
"upper_threshold": 100.0,
"letter_grade": "A",
"remarks": "Excellent"
},
{
"id": "uuid",
"lower_threshold": 60.0,
"upper_threshold": 69.9,
"letter_grade": "B",
"remarks": "Very Good"
}
]