API ReferenceAgents
Get insights for one of my customers
Aggregate insights (account count, overdue installments, total outstanding, last installment, derived activity status) for a customer assigned to you or to an agent you supervise.
Path Parameters
customerId*string
Query Parameters
inactive_threshold_days?integer
Days without a disbursement before a customer is INACTIVE
Format
int32Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/agents/me/customers/string/insights?inactive_threshold_days=60"{ "customer_user_id": "de115842-addf-4f11-bee7-4b415ab13852", "account_count": 0, "active_account_count": 0, "overdue_installment_count": 0, "total_outstanding_amount": { "value": 100000, "currency": "KES" }, "last_installment_at": "2019-08-24T14:15:22Z", "activity_status": "ACTIVE"}{ "code": "BAD_REQUEST", "description": "Bad Request"}{ "code": "UNAUTHORISED", "description": "Unauthorised"}{ "code": "WAITING_LIST", "description": "User is in the waiting list"}{ "code": "TOO_MANY_REQUESTS", "description": "Too Many Requests"}{ "code": "INTERNAL_SERVER_ERROR", "description": "Internal Server Error"}Deactivate agent DELETE
Permanently deactivate an agent. The agent must have no active customer assignments. Admin only.
List my team's customers GET
List customers assigned to you and the agents you manage. Supports search by customer name, phone number, or email. Use exclude_agent_user_id to hide your own customers (useful when looking for customers to transfer).