{
"_links": {
"all_territories": "/api/invoicing/territory",
"sales_summary": "/api/sales/summary?from=2026-01-01&to=2026-06-30&group_by=month",
"self": "/api/sales/by-territory?from=2026-01-01&to=2026-06-30&limit=50&sort_by=revenue"
},
"cache": {
"age_seconds": 0,
"cached_at": "2026-07-02T10:05:00-04:00",
"expires_at": "2026-07-03T10:05:00-04:00",
"force_refreshed": false,
"key_hash": "sha1:9a7c5e3b1d2f4a6c8e0b1d3f5a7c9e1b2d4f6a8c",
"status": "miss",
"ttl_policy": "historical_24h",
"ttl_remaining_seconds": 86400
},
"filter": {
"limit": 50,
"sort_by": "revenue"
},
"items": [
{
"_links": {
"territory_detail": "/api/invoicing/territory/by-id/2"
},
"avg_invoice": 3197.66,
"customers_count": 29,
"first_invoice_date": "2026-01-05",
"invoices_count": 214,
"last_invoice_date": "2026-06-29",
"rank": 1,
"revenue": 684300,
"share_pct": 54.93,
"territory": {
"code": 10,
"id": 2,
"name": "Montérégie"
}
},
{
"_links": {},
"avg_invoice": 2341.67,
"customers_count": 6,
"first_invoice_date": "2026-02-11",
"invoices_count": 18,
"last_invoice_date": "2026-06-17",
"rank": 4,
"revenue": 42150,
"share_pct": 3.38,
"territory": {
"id": 0,
"name": "(territoire non assigné)"
}
}
],
"metadata": {
"extracted_at": "2026-07-02T10:05:00-04:00",
"organisation_id": "entreprise_exemple",
"scope": "invoicing_only_type_1",
"scope_note": "Ventes du module Facturation, attribuées au territoire de chaque facture ; les factures sans territoire sont regroupées sous « non assigné ».",
"sdk_indexes_used": {
"invoicing": 6
},
"truncated": false
},
"period": {
"from": "2026-01-01",
"to": "2026-06-30"
},
"summary": {
"currency": "CAD",
"customers_count": 57,
"invoices_count": 412,
"revenue_total": 1245800,
"territories_count": 3,
"unassigned_invoices_count": 18,
"unassigned_revenue": 42150
}
}