The Dashboard Analytics endpoint provides comprehensive, real-time data about team performance, including aggregated metrics, officer performance breakdown, loan status distribution, and monthly trends.
Get Dashboard
GET /api/supervisor-reports/dashboard
curl "https://api.millenniumpotters.com/api/supervisor-reports/dashboard?periodStart=2024-01-01&periodEnd=2024-01-31" \
-H "Authorization: Bearer YOUR_TOKEN"
Retrieve real-time dashboard data for a supervisor with optional date filtering.
Query Parameters
Optional start date for filtering data (ISO 8601 format). If not provided, all historical data is included.
Optional end date for filtering data (ISO 8601 format). If not provided, data up to the current date is included.
ADMIN only : View dashboard for a specific supervisor. Regular supervisors can only view their own dashboard.
Response
Information about the supervisor. Full name of the supervisor.
Supervisor’s email address.
Aggregated summary metrics across all officers. Total number of credit officers under this supervisor.
Total number of unions managed by the team.
Total number of union members across all unions.
Number of verified union members.
Number of pending (unverified) union members.
Total number of loans in the period.
Number of loans with ACTIVE status.
Number of loans with COMPLETED status.
Number of loans with DEFAULTED or WRITTEN_OFF status.
Total principal amount disbursed across all loans.
Total amount repaid across all loans.
Total outstanding amount (disbursed - repaid).
Collection rate as a percentage (totalRepaid / totalDisbursed * 100).
Performance breakdown for each credit officer. Full name of the credit officer.
Number of unions managed by this officer.
Total union members under this officer.
Number of verified members.
Number of pending members.
Number of completed loans.
Number of defaulted loans.
Total amount disbursed by this officer.
Total amount repaid for this officer’s loans.
Outstanding amount for this officer.
This officer’s collection rate percentage.
Timestamp of the officer’s last activity.
Breakdown of loans by status. Loan status (DRAFT, PENDING_APPROVAL, APPROVED, ACTIVE, COMPLETED, DEFAULTED, WRITTEN_OFF, CANCELED).
Number of loans with this status.
Total principal amount for loans with this status.
Monthly trends for the last 6 months. Month label (e.g., “Jan 2024”).
Total amount disbursed in this month.
Total amount repaid in this month.
Number of new loans created in this month.
Number of new union members added in this month.
Required Permissions
SUPERVISOR : Can view their own team’s dashboard
ADMIN : Can view any supervisor’s dashboard by providing supervisorId
Use Cases
Real-Time Monitoring
Use this endpoint without date filters to get current, real-time data about team performance:
curl "https://api.millenniumpotters.com/api/supervisor-reports/dashboard" \
-H "Authorization: Bearer YOUR_TOKEN"
Period Analysis
Filter by specific date ranges to analyze performance for a particular period:
curl "https://api.millenniumpotters.com/api/supervisor-reports/dashboard?periodStart=2024-01-01T00:00:00Z&periodEnd=2024-03-31T23:59:59Z" \
-H "Authorization: Bearer YOUR_TOKEN"
Admin Oversight
Administrators can view any supervisor’s dashboard:
curl "https://api.millenniumpotters.com/api/supervisor-reports/dashboard?supervisorId=clx123abc" \
-H "Authorization: Bearer ADMIN_TOKEN"
Data Freshness
This endpoint queries the database in real-time and does not use cached data. For frequently accessed reports, consider using the Generate Report endpoint to create a snapshot that can be retrieved quickly.
The dashboard aggregates data across multiple tables (unions, members, loans, repayments)
For large teams with many transactions, response times may vary
Date filtering can improve performance by limiting the data scope
Consider generating report sessions for historical analysis rather than repeatedly calling this endpoint