{
"_links": {
"all_products": "/api/inventory/products",
"sales_summary": "/api/sales/summary?from=2026-01-01&to=2026-04-30&group_by=month",
"self": "/api/sales/top-products?from=2026-01-01&to=2026-04-30&limit=10&sort_by=revenue"
},
"cache": {
"age_seconds": 0,
"cached_at": "2026-05-13T09:12:00-04:00",
"expires_at": "2026-05-14T09:12:00-04:00",
"force_refreshed": false,
"key_hash": "sha1:5c2e8a41d07b9f3e6a1c4d8b2f0e7a9c3b5d1f6e",
"status": "miss",
"ttl_policy": "historical_24h",
"ttl_remaining_seconds": 86400
},
"filter": {
"limit": 10,
"sort_by": "revenue"
},
"items": [
{
"_links": {
"product_detail": "/api/inventory/products/by-id/412"
},
"avg_unit_price": 12.5,
"invoices_count": 49,
"lines_count": 57,
"product": {
"code": "GYP-12",
"id": 412,
"name": "Gypse régulier 1/2 po 4 x 8"
},
"qty_total": 5120,
"rank": 1,
"revenue": 64000,
"share_pct": 21.33
},
{
"_links": {
"product_detail": "/api/inventory/products/by-id/236"
},
"avg_unit_price": 30,
"invoices_count": 70,
"lines_count": 81,
"product": {
"code": "PEI-BL4",
"id": 236,
"name": "Peinture latex blanc 3,78 L"
},
"qty_total": 1010,
"rank": 2,
"revenue": 30300,
"share_pct": 10.1
}
],
"metadata": {
"extracted_at": "2026-05-13T09:12:00-04:00",
"organisation_id": "entreprise_exemple",
"scope": "invoicing_lines_type_1_only",
"scope_note": "Lignes de produit des factures de la période, avant taxes ; lignes de taxes, de transport et d'écriture comptable exclues",
"sdk_indexes_used": {
"invoicing": 6,
"invoicing_line": 6
},
"truncated": true
},
"period": {
"from": "2026-01-01",
"to": "2026-04-30"
},
"summary": {
"currency": "CAD",
"invoices_count": 214,
"lines_count": 1188,
"products_count": 62,
"qty_total": 18450.75,
"revenue_total": 300000,
"unassigned_lines_count": 240,
"unassigned_revenue": 0
}
}