{
"_links": {
"all_sales_reps": "/api/invoicing/salesrep",
"sales_summary": "/api/sales/summary?from=2026-01-01&to=2026-06-30&group_by=month",
"self": "/api/sales/by-sales-rep?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:4b6d8f0a2c4e6a8b0d2f4a6c8e0a2b4d6f8a0c2e",
"status": "miss",
"ttl_policy": "historical_24h",
"ttl_remaining_seconds": 86400
},
"filter": {
"limit": 50,
"sort_by": "revenue"
},
"items": [
{
"_links": {
"sales_rep_detail": "/api/invoicing/salesrep/by-id/4"
},
"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,
"sales_rep": {
"code": 12,
"id": 4,
"name": "Julie Fictive"
},
"share_pct": 54.93
},
{
"_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,
"sales_rep": {
"id": 0,
"name": "(représentant non assigné)"
},
"share_pct": 3.38
}
],
"metadata": {
"extracted_at": "2026-07-02T10:05:00-04:00",
"organisation_id": "entreprise_exemple",
"scope": "invoicing_only_type_1_primary_rep",
"scope_note": "Ventes du module Facturation, attribuées au représentant principal de chaque facture ; les factures sans représentant 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,
"sales_reps_count": 3,
"unassigned_invoices_count": 18,
"unassigned_revenue": 42150
}
}