{
"_links": {
"aging": "/api/customers/aging/by-id/105",
"detail": "/api/customers/by-id/105",
"self": "/api/customers/by-id/105/overview",
"statement": "/api/customers/by-id/105/statement?from=2025-05-13&to=2026-05-13"
},
"aging": {
"bucket_type": "standard",
"buckets": {
"days_0_30": 1000,
"days_30_60": 750,
"days_60_90": 0,
"days_over_90": 2500
},
"percentages": {
"days_0_30": 23.5,
"days_30_60": 17.6,
"days_60_90": 0,
"days_over_90": 58.8
}
},
"as_of_date": "2026-05-13",
"balance": {
"credit_used_pct": 17,
"days_most_overdue": 213,
"is_past_due": true,
"oldest_open_invoice": {
"amount_remaining": 1850,
"code": "FAC-2025-00198",
"date": "2025-09-12",
"days_past_due": 213,
"due_date": "2025-10-12",
"id": 2150
},
"open_invoices_count": 3,
"total_open": 4250
},
"cache": {
"age_seconds": 0,
"cached_at": "2026-05-13T09:12:00-04:00",
"expires_at": "2026-05-13T13:12:00-04:00",
"force_refreshed": false,
"key_hash": "sha1:1b9f3c4a8e...",
"status": "miss",
"ttl_policy": "current_period_4h",
"ttl_remaining_seconds": 14400
},
"customer": {
"code": "10005",
"credit_limit": 25000,
"id": 105,
"is_active": true,
"is_inactive": false,
"is_on_hold": false,
"name": "Atelier Lac Saint-Jean",
"payment_terms": {
"code": "30",
"id": 12,
"label": "Net 30"
}
},
"last_activity": {
"days_since_last_activity": 13,
"last_invoice": {
"amount": 1500,
"code": "FAC-2026-00301",
"date": "2026-04-22",
"days_ago": 21,
"id": 2201
},
"last_payment": {
"amount": 1500,
"code": "PMT-2026-0042",
"date": "2026-04-30",
"days_ago": 13,
"id": 880
},
"last_transaction_date": "2026-04-30"
},
"metadata": {
"extracted_at": "2026-05-13T09:12:00-04:00",
"is_on_hold_source": "derived_balance_vs_credit_limit",
"organisation_id": "mastodonte",
"scope": "non_archived_only",
"sdk_indexes_used": {
"customer_payment": 8,
"customer_payment_line": 1,
"invoice_ar": 6
}
},
"period": {
"from": "2025-05-13",
"months": 12,
"to": "2026-05-13"
},
"period_kpis": {
"average_days_to_pay": 28.4,
"average_invoice": 2312.5,
"credits_count": 1,
"invoices_count": 8,
"on_time_payment_rate_pct": 75,
"payments_count": 5,
"revenue_current": 18500,
"revenue_growth_pct": 30.28,
"revenue_previous": 14200,
"transactions_count": 14
}
}