Skip to main content
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

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

periodStart
string
Optional start date for filtering data (ISO 8601 format). If not provided, all historical data is included.
periodEnd
string
Optional end date for filtering data (ISO 8601 format). If not provided, data up to the current date is included.
supervisorId
string
ADMIN only: View dashboard for a specific supervisor. Regular supervisors can only view their own dashboard.

Response

supervisor
object
Information about the supervisor.
summary
object
Aggregated summary metrics across all officers.
officerPerformance
array
Performance breakdown for each credit officer.
loanStatusDistribution
array
Breakdown of loans by status.
Monthly trends for the last 6 months.

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.

Performance Considerations

  • 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

Build docs developers (and LLMs) love