Get the caller's agent dashboard
Roll up the caller's directly assigned customers into totals and a repayment rate. Requires the org:agents:read permission. inactive_threshold_days sets when a customer without a recent disbursement counts as INACTIVE, and repayment_window_days sets the window behind repayment_rate. Returns 404 when the caller is not an agent in the granted organization.
Authorization
oauth2 Create a client with POST /v1/oauth/clients, then exchange its credentials for an access token. AUTHORIZATION_CODE clients act on behalf of a signed-in user and always use PKCE; CLIENT_CREDENTIALS clients act as themselves. A client may only be granted scopes its creator already holds — read the grantable list from GET /v1/oauth/clients/scopes.
In: header
Query Parameters
Days without a disbursement before a customer is INACTIVE. Defaults to 60.
int32Days back from today, from 1 to 365, over which to compute repayment_rate. Defaults to 90.
int32Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/agents/me/dashboard?inactive_threshold_days=60&repayment_window_days=90"{ "total_customer_count": 42, "active_customer_count": 34, "inactive_customer_count": 5, "overdue_customer_count": 3, "repayment_rate": 0.83, "repayment_window_days": 90, "inactive_threshold_days": 60}{ "code": "BAD_REQUEST", "description": "Bad Request"}{ "code": "UNAUTHORISED", "description": "Unauthorised"}{ "code": "FORBIDDEN", "description": "Forbidden"}{ "code": "BAD_REQUEST", "description": "Invalid input"}{ "code": "RATE_LIMIT_EXCEEDED", "description": "Too Many Requests"}{ "code": "INTERNAL_ERROR", "description": "Internal Server Error"}Get customer insights GET
Get aggregate insights for one customer: account count, overdue installments, outstanding balance, and activity status. Requires the `org:agents:read` permission. Available for a customer assigned to the caller or to an agent the caller supervises. `inactive_threshold_days` sets when the customer counts as `INACTIVE` rather than `ACTIVE`. Returns 404 when the caller is not an agent, the customer has no active assignment, or the assigned agent is outside the caller's visibility.
Get an agent GET
Get one agent by user ID. Requires the `org:agents:read` permission. The caller can always read their own agent record; any other agent must be in the caller's supervised subtree, unless the caller holds `org:agents.all:read`. Returns 404 when the agent does not exist or is outside the caller's visibility.