Get Supplier Scorecard
GET/api/reporting/suppliers/:supplier/scorecard
Standalone composite scorecard for a supplier over the resolved period — the composite, its band, and the per-dimension breakdown.
The band is one of: excellent, good, needs_attention, poor. When the supplier has fewer received POs than the configured minimum (is_sufficient=false), the band is not_rated and composite is 0.
Live preview: when the optional preview_weights, preview_thresholds and preview_min_po_count parameters are supplied (all three together), the score is computed against a transient, non-persisted settings instance built from those values. Nothing is written to the scorecard settings table. preview_weights must contain all six metric keys and sum to exactly 100.
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 period params:
- growth_basis: spend | sales | profit | margin (default: sales)
- min_volume, include_archived
Optional live-preview params (all three required together when previewing):
- preview_weights[{metric}]: numeric 0-100 — one per metric, summing to 100
- preview_thresholds[{metric}][{i}][min]: numeric; preview_thresholds[{metric}][{i}][score]: integer 1-5
- preview_min_po_count: integer, min 1
preview_weights and preview_thresholds may be passed either as bracketed array params (shown above) or as a single URL-encoded JSON string — the live-preview UI sends them as JSON strings.
Request
Responses
- 200
Successful response