Skip to main content

Academic Sessions

Manage academic year sessions (e.g., 2024/2025).

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


List Academic Sessions

GET /academic-sessions

Returns all academic sessions for the current school.

Example

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

Response 200 OK

[
{
"id": "uuid",
"sessionId": "2024/2025",
"isCurrent": true,
"startDate": "2024-09-01",
"endDate": "2025-07-31"
}
]

Create Academic Session

POST /academic-sessions

Create a new academic session.

Request Body

FieldTypeRequiredDescription
session_idstringYesSession identifier (e.g., "2024/2025")
is_currentbooleanYesWhether this is the active session

Example

curl -X POST https://api.vanillatots.com/academic-sessions \
-H "Authorization: Bearer $TOKEN" \
-H "X-SCHOOL-ID: $SCHOOL_ID" \
-H "Content-Type: application/json" \
-d '{
"session_id": "2025/2026",
"is_current": false
}'

Response 200 OK — Returns the created AcademicSessionResponse.