Overview
The API is a RESTful HTTP API. Requests and responses use JSON, and HTTPS is required. Every endpoint lives under /api on the same address you use to open Shulevo.
Base URL
https://<your Shulevo address>/api
Interactive reference
Every endpoint, its parameters, and its response shape are listed in the OpenAPI reference served by the app itself at /api/docs.
Content Type
All POST, PUT, and PATCH requests must include the header:
Content-Type: application/json
Authentication
Sign in with an email and password to receive a JWT access token, valid for 24 hours, and a refresh token, valid for 30 days. Send the access token on every other request:
Authorization: Bearer <token>
{
"email": "[email protected]",
"password": "your_password"
}
{
"token": "eyJhbGciOi...",
"refreshToken": "9f2c...",
"user": { "id": 12, "name": "…", "role": "admin", "school_id": 3 }
}
If the account has two-factor authentication on, the response is instead { "requires2fa": true, "tempToken": "…" }. Finish signing in with:
{
"tempToken": "…",
"totpCode": "123456"
}
Returns the same token, refreshToken, and user as a normal sign-in.
{
"refreshToken": "9f2c..."
}
Roles & Plans
Every request is checked twice:
- Role — the signed-in user's role (Head Teacher, Teacher, Bursar, Parent, and so on) decides what they may see and change. A teacher, for example, only reaches their own classes.
- Plan — each module belongs to a plan. Calling a module your school's plan does not include returns
403with"code": "FEATURE_LOCKED"and the name of the feature.
All data is scoped to the signed-in user's school; one school can never read another's records.
Errors
The API uses standard HTTP status codes. Error responses carry a JSON body with a human-readable error message, and some add a machine-readable code.
| Status | Meaning |
|---|---|
| 200 | OK — request succeeded |
| 201 | Created — record created |
| 400 | Bad Request — invalid or missing fields |
| 401 | Unauthorised — missing, expired, or invalid token |
| 403 | Forbidden — your role or plan does not allow this |
| 404 | Not Found — the record does not exist in your school |
| 429 | Too Many Requests — rate limit exceeded |
| 500 | Internal Server Error — something went wrong on our end |
{
"error": "year is required"
}
Rate Limits
Limits apply per signed-in user (or per IP address before sign-in):
- All requests: 2,000 per 15 minutes
- Changes (POST, PUT, PATCH, DELETE): 200 per minute
- Sign-in attempts: 20 failed attempts per 15 minutes
When a limit is exceeded you receive a 429 response. The standard RateLimit headers say how long to wait before retrying.
Common Endpoints
A few of the endpoints most integrations start with. See the interactive reference for parameters, request bodies, and every other module.
| Endpoint | What it does |
|---|---|
| GET /students | List learners; filter with class and status |
| GET /students/{id} | One learner's record |
| GET /classes | The school's classes and streams |
| GET /marks | Marks, filtered by learner, class, subject, term, and year |
| GET /attendance | Daily attendance records |
| GET /attendance/summary | Attendance totals and rates |
| GET /transactions | Fee payments and other transactions |
| GET /transactions/outstanding-fees | Learners with fee balances |