GET /api/v1/dashboard-data
Retrieve dashboard data by type.Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
type | string | No | summary | Data type to retrieve (see table below) |
days | integer | No | 7 | Lookback window in days (1-365), used by time-based types |
modelId | string | No | — | Algorithm model ID (only for model_metrics_trend) |
groupBy | string | No | channel for offer_performance_grouped, null for score_distribution | Grouping dimension. Accepts channel, category, or segment for offer_performance_grouped; channel, offer, or category for score_distribution |
filterId | string | No | — | Filter by dimension ID (only for score_distribution) |
segmentId | string | No | — | Restrict the result to customers in the given segment. Accepted by acceptance_rate, offer_performance, offer_performance_grouped, channel_effectiveness, daily_trend, revenue_trend, selection_frequency, and why_not_ranked. Returns {"data": [], "warning": "..."} when the segment does not exist or the segment view has not been materialized yet. |
channelId | string | No | — | Restrict selection_frequency to decisions made on a specific channel. |
categoryId | string | No | — | Restrict selection_frequency to offers in a specific category. |
decisionFlowId | string | No | — | Restrict selection_frequency to decisions produced by a specific decision flow. |
offerId | string | Required for why_not_ranked | — | Target offer for the why-not analysis. |
baselineDays | integer | No | same as days | For anomaly_candidates — the length of the prior-period window compared against the current window. |
Data Types
| Type | Description |
|---|---|
summary | High-level counts: active offers, channels, experiments, journeys, triggers, pending approvals |
acceptance_rate | Acceptance rate per offer (impressions vs positive outcomes) over days window |
offer_performance | Top 20 active offers with impressions, conversions, revenue, and conversion rate |
channel_effectiveness | Impressions, conversions, and effectiveness rate per channel |
budget_burn | Budget allocation utilization: allocated, spent, remaining, burn rate |
funnel | Offer funnel stages: total offers, active, with creatives, total creatives |
attribution_summary | Attribution results grouped by model with conversion counts and total value |
daily_trend | 7-day trend of impressions and conversions |
model_metrics_trend | AUC trend and feature importance from algorithm models (accepts modelId) |
latency_trend | 7-day p50/p99 latency percentiles from run execution data |
offer_performance_grouped | Offer performance grouped by channel or category (accepts groupBy) |
revenue_trend | Daily revenue trend from interaction summaries over days window |
policy_impact | Active suppressions grouped by policy type with counts |
score_distribution | Propensity score histogram from decision traces (accepts groupBy and filterId) |
degraded_scoring | Count of degraded scoring events (fallback scoring used due to model errors or timeouts) |
selection_frequency | Per-offer eligible / scored / selected counts, selection rate, average rank, and rank distribution over the window |
anomaly_candidates | Core-metric anomalies (acceptance rate, revenue, degraded scoring rate) vs a prior-period baseline — stateless; no alert firing |
why_not_ranked | For a target offerId, breakdown of how often the offer was eligible but not selected and the top reasons |
Response — summary
Response — acceptance_rate
Response — offer_performance
Response — channel_effectiveness
Response — budget_burn
Response — funnel
Response — attribution_summary
Response — daily_trend
Response — model_metrics_trend
Response — latency_trend
Response — offer_performance_grouped
Response — revenue_trend
Response — policy_impact
Response — score_distribution
score_distribution type accepts groupBy values of channel, offer, or category to break down scores by dimension. Use filterId to show only scores for a specific dimension value.
Response — degraded_scoring
totalCount is the total number of scored requests in the period.
Response — selection_frequency
DecisionTrace.scoringResults[] and selectedOffers[] across the window. The trace sample is capped at 10,000 rows per call for latency. rankDistribution is a 10-element array covering ranks 1..10; ranks beyond 10 are not tracked. Supports optional channelId, categoryId, decisionFlowId, and segmentId filters.
Example:
Response — anomaly_candidates
info at |z| >= 2 or |%| >= 15, warning at |z| >= 3 or |%| >= 30, critical at |z| >= 4 or |%| >= 50. Metrics covered: acceptance_rate (overall, per-offer, per-channel), revenue (per-offer), and degraded_scoring_rate (overall). This endpoint is stateless — it does not fire alerts; it surfaces candidates that a scheduler in a later phase may escalate.
Example:
Response — why_not_ranked
sampleCap) and attributes every miss to one of: contact-policy block, qualification rejection, or scored-but-outranked. When the offer was scored but not selected, the winning offer in that decision is counted toward the beatenBy list (top 5). The offerId query parameter is required; optional segmentId narrows the analysis to customers in that segment.
Example:
Segment dimension on existing performance endpoints
acceptance_rate, offer_performance, offer_performance_grouped, channel_effectiveness, daily_trend, and revenue_trend all accept an optional segmentId query parameter. When provided, the underlying aggregation is restricted to interactions from customers in the segment’s materialized view.
offer_performance_grouped&groupBy=segment fans the result out by active segment instead of channel/category; each offer row is decorated with segmentId and segmentName.
If the segment is unknown or its view has not been materialized yet, the endpoint returns {"data": [], "warning": "..."} instead of an error, so dashboards can render a friendly notice.
Error codes
| Code | Reason |
|---|---|
400 | Unknown type value. |
403 | Insufficient role permissions. |
Role requirements
| Method | Minimum role |
|---|---|
| GET | viewer |