Skip to content

Debt Ageing KPIs

See at a glance how overdue your outstanding invoice balances are. Debt ageing KPIs bucket every invoice with a non-zero balance by how many days past its due date it is, giving you a classic aged debt view for credit control.

The category name in the request URL is arAgeing.

Buckets outstanding balances by age. Invoices that are fully paid are excluded; invoices not yet due (or with no due date) appear in the current bucket.

Endpoint

GET /backend/kpi/arAgeing/

Example Request

Terminal window
curl -X GET "https://companyname.callstats.net/backend/kpi/arAgeing/" \
-H "Authorization: Bearer YOUR_KPI_KEY"

Example Response

[
{
"invoice_bucket": "current",
"invoice_customer_count": 1250,
"invoice_count": 1310,
"invoice_outstanding": 38500.000
},
{
"invoice_bucket": "1-30",
"invoice_customer_count": 320,
"invoice_count": 355,
"invoice_outstanding": 10400.000
},
{
"invoice_bucket": "31-60",
"invoice_customer_count": 85,
"invoice_count": 92,
"invoice_outstanding": 3150.000
},
{
"invoice_bucket": "61-90",
"invoice_customer_count": 34,
"invoice_count": 40,
"invoice_outstanding": 1425.000
},
{
"invoice_bucket": "90+",
"invoice_customer_count": 28,
"invoice_count": 45,
"invoice_outstanding": 2340.000
}
]

Adds a dealer split to the age buckets, so you can see where overdue debt is concentrated.

Endpoint

GET /backend/kpi/arAgeing/byDealer/

Example Request

Terminal window
curl -X GET "https://companyname.callstats.net/backend/kpi/arAgeing/byDealer/" \
-H "Authorization: Bearer YOUR_KPI_KEY"

Combine the debt ageing dimensions (bucket, dealer, currency) with groupBy:

Terminal window
# Age buckets split by currency
curl -X GET "https://companyname.callstats.net/backend/kpi/arAgeing/?groupBy=bucket,currency" \
-H "Authorization: Bearer YOUR_KPI_KEY"

The currency dimension is only available on platforms with the multi-currency module active. A currency column is included automatically on multi-currency platforms so totals are never mixed across currencies.

Balances are grouped by days past the invoice due date, measured on the day of the request:

BucketMeaning
currentNot yet due (or no due date)
1-301 to 30 days overdue
31-6031 to 60 days overdue
61-9061 to 90 days overdue
90+More than 90 days overdue

Credit balances count too: any invoice whose balance is not zero appears in its bucket, so overpayments show as negative outstanding amounts.

Refine your results using these filter parameters:

ParameterTypeDescriptionExample
minDatedateInvoices dated on or afterminDate=2026-01-01
maxDatedateInvoices dated on or beforemaxDate=2026-01-31
minDueDatedateInvoices due on or afterminDueDate=2026-02-01
maxDueDatedateInvoices due on or beforemaxDueDate=2026-02-28
dealerstringFilter by dealer namedealer=Direct
dealerCodestringFilter by specific dealer codedealerCode=DEALER01

Aged Debt for One Dealer

Terminal window
curl -X GET "https://companyname.callstats.net/backend/kpi/arAgeing/?dealerCode=DEALER01" \
-H "Authorization: Bearer YOUR_KPI_KEY"

Feed the age buckets straight into a dashboard tile:

Terminal window
curl -X GET "https://companyname.callstats.net/backend/kpi/arAgeing/" \
-H "Authorization: Bearer YOUR_KPI_KEY"

Identify which dealers carry the oldest debt:

Terminal window
curl -X GET "https://companyname.callstats.net/backend/kpi/arAgeing/byDealer/" \
-H "Authorization: Bearer YOUR_KPI_KEY"
  1. Watch the 90+ bucket - Debt rarely improves once it passes 90 days; treat growth here as urgent
  2. Track bucket movement - Poll daily and store snapshots so you can see debt moving between buckets
  3. Split by dealer - Concentrated overdue debt often points to one dealer’s customers rather than a general trend
  4. Pair with collections - Failed Direct Debits from Collection KPIs usually explain sudden bucket growth