What you’ll build
- A 4-tile KPI strip.
- A “Flagged” tile that only appears when count > 0.
- An “Upcoming events” panel — paginated list, click-to-open drawer/detail.
Prerequisites
- An authenticated user. See Authentication.
X-Preferred-Partner-Idset. See Partner & Client.
The call chain
On mount, fire these three in parallel:| # | Method | Path | Purpose |
|---|---|---|---|
| 1 | GET | /events/statistics | Tenant-wide KPIs: { total, open, running, closed, revenue, spent, roas, purchases, currency }. Drives Revenue / ROAS / Running events. |
| 2 | GET | /campaigns/statistics | { total, running, open, closed, ignored }. Drives Running campaigns. |
| 3 | GET | /events/flagged/ | Flagged events. Only the count is rendered. |
| # | Method | Path | Purpose |
|---|---|---|---|
| 4 | GET | /events/?page=1&limit=50&until=<+1y>&since=<-3y>&frontend_status=DEFAULT&frontend_status=FLAGGED&exclude_products=false | Paged list for the table. |
| # | Method | Path | Purpose |
|---|---|---|---|
| 5 | GET | /events/{eid} | Event detail. |
| 6 | GET | /events/{eid}/series?limit=1000 | Sibling events. |
Payload — /events/statistics
null — render — defensively. The reference webapp uses
Intl.NumberFormat with currency as the unit.
Payload — /campaigns/statistics
Reference implementation
fetchEvents you’ll build
for the Events list — pass these default
filters:
Gotchas
Trailing slashes matter
Trailing slashes matter
/events/flagged/ keeps the trailing slash. Without it you’ll get a 404
on some deployments.Statistics may be partially null
Statistics may be partially null
On freshly-provisioned partners or partners without any ingested sales,
revenue, roas, and currency come back as null. Render —.The Flagged tile only renders when count > 0
The Flagged tile only renders when count > 0
The reference webapp hides it otherwise. Don’t show an empty tile.
`exclude_products=false` vs `true`
`exclude_products=false` vs `true`
The Dashboard sends
false (include products). The Events page sends
true (exclude). The Wave list sends nothing. Don’t copy-paste the
wrong default.Related
- Events list — the next page down.
- Event detail — what the row-click opens.
- Pagination cookbook — for the upcoming-events panel.