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