{
"_links": {
"aging": "/api/customers/aging/by-id/105",
"overview": "/api/customers/by-id/105/overview",
"self": "/api/customers/by-id/105/statement?from=2026-01-01&to=2026-04-30"
},
"cache": {
"age_seconds": 0,
"cached_at": "2026-05-12T09:12:00-04:00",
"expires_at": "2026-05-12T13:12:00-04:00",
"force_refreshed": false,
"key_hash": "sha1:8c4d2f9a1b...",
"status": "miss",
"ttl_policy": "current_period_4h",
"ttl_remaining_seconds": 14400
},
"closing_balance": 2450,
"customer": {
"code": "10005",
"id": 105,
"name": "Atelier Lac Saint-Jean"
},
"lines": [
{
"_links": {
"detail": "/api/customers/invoice-ar/by-id/2201"
},
"amount_paid": 1500,
"amount_remaining": 0,
"credit": 0,
"date": "2026-01-08",
"debit": 1500,
"description": "Facture janvier",
"due_date": "2026-02-07",
"is_current_day": false,
"is_paid_in_full": true,
"line_index": 1,
"reference": "PO-88810",
"running_balance": 2750,
"source": {
"code": "FAC-2026-00301",
"id": 2201,
"kind": "invoice_ar"
},
"transaction_type": {
"code": "invoice",
"id": 3,
"label": "Facture"
}
},
{
"_links": {
"detail": "/api/customers/payments/by-id/880"
},
"credit": 1500,
"date": "2026-01-22",
"debit": 0,
"description": "Paiement chèque",
"is_current_day": false,
"line_index": 2,
"reference": "CHQ-4421",
"running_balance": 1250,
"source": {
"code": "PMT-2026-0042",
"id": 880,
"kind": "customer_payment"
},
"transaction_type": {
"code": "payment",
"id": 1,
"label": "Paiement"
}
}
],
"metadata": {
"extracted_at": "2026-05-12T09:12:00-04:00",
"organisation_id": "mastodonte",
"scope": "non_archived_only",
"sdk_indexes_used": {
"customer_payment": 8,
"invoice_ar": 6
}
},
"opening_balance": 1250,
"period": {
"from": "2026-01-01",
"to": "2026-04-30"
},
"totals": {
"credits": 7300,
"credits_count": 1,
"debits": 8500,
"deposits_count": 0,
"invoices_count": 6,
"net_change": 1200,
"other_count": 0,
"payments_count": 5
}
}