Skip to main content

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

http://localhost:5000

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 session
  • GET /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

CodeDescription
200Success
302Redirect (typically after login or when unauthorized)
401Unauthorized - Login required
403Forbidden - Insufficient permissions

Data Storage

The API uses JSON file-based storage:
  • data/usuarios.json - User credentials and email addresses
  • data/registros.json - Attendance records with timestamps and locations

Automated Features

The system includes an automated scheduler that sends reminder emails at 8:00 AM daily to users who haven’t checked in yet.

Build docs developers (and LLMs) love