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