Introduction
The Checawaa API is a Flask-based REST API that provides attendance tracking and monitoring capabilities. The API uses session-based authentication via Flask-Login and supports location-based check-ins.Base URL
Authentication
All endpoints except/login require authentication. The API uses Flask-Login for session management with cookie-based authentication.
After successfully logging in via the /login endpoint, your session cookie will be automatically included in subsequent requests.
Endpoints Overview
Authentication
POST /login- Authenticate a user and create a sessionGET /logout- End the current user session
Location Tracking
POST /update-location- Submit location data for attendance tracking
Monitoring & Reporting
GET /monitor- View attendance dashboard (admin only)GET /send-reminders- Manually trigger reminder emails (admin only)GET /reporte-pdf- Generate PDF attendance report
HTTP Response Codes
| Code | Description |
|---|---|
| 200 | Success |
| 302 | Redirect (typically after login or when unauthorized) |
| 401 | Unauthorized - Login required |
| 403 | Forbidden - Insufficient permissions |
Data Storage
The API uses JSON file-based storage:data/usuarios.json- User credentials and email addressesdata/registros.json- Attendance records with timestamps and locations