Available Endpoints
Dashboard & Analytics
GET /api/supervisor-reports/dashboard
Get real-time dashboard data with aggregated metrics, officer performance, and trends.
Report Generation
POST /api/supervisor-reports/generate
Generate and save a report session for a specific period.
Report Sessions
GET /api/supervisor-reports/sessions
Retrieve all saved report sessions with pagination.
GET /api/supervisor-reports/sessions/:id
Get a specific report session by ID.
DELETE /api/supervisor-reports/sessions/:id
Delete a report session.
Credit Officers
GET /api/supervisor-reports/officers
Get all credit officers under a supervisor.
Authentication
All report endpoints require authentication and specific role permissions:- SUPERVISOR: Can access their own team’s data
- ADMIN: Can access any supervisor’s data by providing
supervisorIdparameter
Common Response Structure
All endpoints return JSON responses with appropriate HTTP status codes:200: Success400: Bad request (missing or invalid parameters)401: Unauthorized (missing or invalid token)403: Forbidden (insufficient permissions)500: Internal server error
