Get Supplier Product Breakdown
GET/api/reporting/suppliers/:supplier/products
Paginated, sortable per-product breakdown for one supplier (Analytics-tab product table). Each row carries units, purchase/sales volume, profit, margin %, sell-through %, landed unit cost, the landed-cost trend direction (cost_trend), and period-over-period 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.
Filters (Spatie QueryBuilder):
- filter[search]: partial match on product SKU or name
- filter[cost_trend]: landed-unit-cost trend direction — up | down | flat
- filter[margin]: margin sign — positive (margin > 0) | negative (margin < 0)
Sort (sort param, prefix - for DESC). Allowed: units_purchased, units_sold, purchase_volume, sales_volume, profit, margin_pct, sell_through_pct, growth_pct. Default: -purchase_volume
Pagination: page (default 1), per_page (default 10).
Optional:
- growth_basis: spend | sales | profit | margin (default: sales) — drives the growth_pct column
- min_volume, include_archived
Response field cost_trend: up | down | flat — direction of the landed unit cost vs the prior period (always present, defaults to flat).
Request
Responses
- 200
Successful response