Cowdidocs

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.

GET
/v1/agents/me/customers/{customerId}/insights

Path Parameters

customerId*string

Query Parameters

inactive_threshold_days?integer

Days without a disbursement before a customer is INACTIVE

Formatint32

Response 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"}