{
"_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-05-31"
},
"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:8c4d2f9a1b7e3c5d6a0f2b4c8e1d3a5f7b9c0e2d",
"status": "miss",
"ttl_policy": "current_period_4h",
"ttl_remaining_seconds": 14400
},
"closing_balance": 2450,
"customer": {
"code": "C-1005",
"id": 105,
"name": "Construction Exemple inc."
},
"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": "Travaux de janvier",
"due_date": "2026-02-07",
"is_current_day": false,
"is_paid_in_full": true,
"line_index": 1,
"reference": "BC-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": 2750,
"date": "2026-01-22",
"debit": 0,
"is_current_day": false,
"line_index": 2,
"reference": "CHQ-4421",
"running_balance": 0,
"source": {
"code": "PMT-2026-0042",
"id": 880,
"kind": "customer_payment"
},
"transaction_type": {
"code": "payment",
"id": 1,
"label": "Paiement"
}
},
{
"_links": {
"detail": "/api/customers/invoice-ar/by-id/2262"
},
"amount_remaining": 2600,
"credit": 0,
"date": "2026-03-15",
"debit": 2600,
"description": "Travaux de mars",
"due_date": "2026-04-14",
"is_current_day": false,
"is_paid_in_full": false,
"line_index": 3,
"reference": "BC-89077",
"running_balance": 2600,
"source": {
"code": "FAC-2026-00388",
"id": 2262,
"kind": "invoice_ar"
},
"transaction_type": {
"code": "invoice",
"id": 3,
"label": "Facture"
}
},
{
"_links": {
"detail": "/api/customers/invoice-ar/by-id/2270"
},
"amount_paid": 150,
"amount_remaining": 0,
"credit": 150,
"date": "2026-03-20",
"debit": 0,
"description": "Crédit pour retour de matériel",
"is_current_day": false,
"is_paid_in_full": true,
"line_index": 4,
"reference": "BC-89077",
"running_balance": 2450,
"source": {
"code": "FAC-2026-00395",
"id": 2270,
"kind": "invoice_ar"
},
"transaction_type": {
"code": "credit",
"id": 2,
"label": "Crédit"
}
}
],
"metadata": {
"extracted_at": "2026-05-12T09:12:00-04:00",
"organisation_id": "construction_exemple",
"scope": "non_archived_only",
"sdk_indexes_used": {
"customer_payment": 8,
"invoice_ar": 6
}
},
"opening_balance": 1250,
"period": {
"from": "2026-01-01",
"to": "2026-05-31"
},
"totals": {
"credits": 2900,
"credits_count": 1,
"debits": 4100,
"deposits_count": 0,
"invoices_count": 2,
"net_change": 1200,
"other_count": 0,
"payments_count": 1
}
}