{
"invoice": {
"id": 2287,
"number": "18596",
"type": {
"id": 3,
"code": "invoice",
"label": "Facture"
},
"customer": {
"id": 105,
"code": "CONSTEX",
"name": "Construction Exemple inc."
}
},
"invoice_date": "2026-07-08",
"due_date": "2026-08-07",
"amount_invoiced": 6323.63,
"filter": {
"include_archived": false
},
"summary": {
"allocations_count": 2,
"total_allocated": 6250,
"total_discount": 73.63,
"amount_invoiced": 6323.63,
"is_fully_allocated": true,
"remaining_to_allocate": 0,
"first_allocation_date": "2026-08-01",
"last_allocation_date": "2026-09-02",
"currency": "CAD"
},
"items": [
{
"allocation": {
"line_id": 18742,
"unique_code": "28411"
},
"allocation_date": "2026-08-01",
"amount_applied": 3000,
"discount_applied": 0,
"amount_total": 3000,
"transaction_type": {
"id": 3,
"code": "invoice",
"label": "Facture"
},
"is_current_day": false,
"payment": {
"id": 4521,
"number": "6312",
"payment_type": {
"id": 1,
"code": "payment",
"label": "Paiement"
},
"payment_date": "2026-08-01",
"reference": "Chèque 77834",
"is_archived": false
},
"_links": {
"payment_detail": "/api/customers/payments/by-id/4521",
"payment_invoices_paid": "/api/customers/payments/by-id/4521/invoices-paid"
}
},
{
"allocation": {
"line_id": 19210,
"unique_code": "28977"
},
"allocation_date": "2026-09-02",
"amount_applied": 3250,
"discount_applied": 73.63,
"amount_total": 3323.63,
"transaction_type": {
"id": 3,
"code": "invoice",
"label": "Facture"
},
"is_current_day": false,
"payment": {
"id": 4688,
"number": "6401",
"payment_type": {
"id": 1,
"code": "payment",
"label": "Paiement"
},
"payment_date": "2026-09-02",
"is_archived": false
},
"_links": {
"payment_detail": "/api/customers/payments/by-id/4688",
"payment_invoices_paid": "/api/customers/payments/by-id/4688/invoices-paid"
}
}
],
"metadata": {
"organisation_id": "construction_demo",
"extracted_at": "2026-10-07T14:05:19-04:00",
"sdk_indexes_used": {
"customer_payment_line": 1,
"customer_payment": "get_card",
"invoice_ar": "get_card"
},
"scope": "non_archived_only"
},
"cache": {
"status": "miss",
"key_hash": "sha1:42fff9afc807971ab25b997909bbf4d440387da8",
"cached_at": "2026-10-07T14:05:19-04:00",
"expires_at": "2026-10-07T18:05:19-04:00",
"age_seconds": 0,
"ttl_remaining_seconds": 14400,
"ttl_policy": "current_period_4h",
"force_refreshed": false
},
"_links": {
"self": "/api/customers/invoice-ar/by-id/2287/payment-allocations?include_archived=false",
"invoice_detail": "/api/customers/invoice-ar/by-id/2287",
"customer_overview": "/api/customers/by-id/105/overview",
"customer_unpaid_invoices": "/api/customers/by-id/105/unpaid-invoices"
}
}