1. API Purpose
The Student Management API is the central registry of the Skole platform. It powers all other modules by establishing student identities and linking them to parents, staff, and school-specific data.2. Endpoint Definition
3. Authentication Flow
- Guardians: Access is restricted to children linked to the parentβs
phone_noin the database. - Teachers: Access is restricted to students assigned to them via the
staff_studentjunction table. - Admins: Full access scoped by
skole_id.
4. Request Structure
GET /teachers-app/students
Query Parameters:GET /web-app/students
Query Parameters:PUT /web-app/students/:id
Request Body:POST /web-app/students/:id/archive
URL Parameters:POST /web-app/students/:id/reset-password
Request Body:5. Response Structure
Success: Child Profile Detail (200 OK)
Route:GET /parent-app/student-detail
Success: Teacher Student List (200 OK)
Route:GET /teachers-app/students
Success: Admin Student Registry (200 OK)
Route:GET /web-app/students
Success: Student Updated (200 OK)
Route:PUT /web-app/students/:id
Success: Record Archived (200 OK)
Route:POST /web-app/students/:id/archive
Success: PIN Reset (200 OK)
Route:POST /web-app/students/:id/reset-password
6. Error Responses
7. Security Considerations
- PIN Security: Resetting a PIN requires Admin-level JWT.
- Isolation: Cross-tenant access is blocked via the global
SkoleGuard.
8. Token Usage
9. Token Refresh
N/A.10. Logout / Session Invalidation
N/A.11. Usage Example (cURL)
12. Notes / Special Behaviors
- Lifecycle: Students can move from
registeredtoactive,inactive, and eventuallyarchived. - Roll Numbers: Roll numbers must be unique within a school (
skole_id).