Get Supplier Analytics
GET/api/reporting/suppliers/:supplier/analytics
Full per-supplier analytics for the Analytics tab: headline KPIs (purchase volume, sales volume, units purchased/sold, profit, margin %), the composite scorecard, a dual-line current-vs-previous trend chart, and the hottest/coolest products ranked by growth.
Authentication: Requires Bearer token (scope: reports)
Path parameters:
- supplier: the Supplier ID
Required parameters:
- period_mode: yoy | qoq | mom | custom
When period_mode=custom, date_from and date_to (YYYY-MM-DD or m/d/Y) are both required.
Optional:
- growth_basis: spend | sales | profit | margin (default: sales) — drives the trend metric and product mover ranking
- min_volume: numeric (default: 1000)
- include_archived: boolean (default: false)\n\nThe response also includes
product_heatmap(a period-aware per-product growth heatmap — the supplier's top products by volume, each cell a period-over-period change that follows theperiod_modeselector) andcalendar_year_volume(per calendar year for the trailing 5 years: non-draft PO spend with units/PO counts plus non-draft sales revenue with units/order counts; the current year is year-to-date and is independent ofperiod_mode).
Request
Responses
- 200
Successful response