What you’ll build
- Hero (title, date, venue, status pills, action menu).
- Demand prediction (benchmark + prediction curve, with a Capacity / Tickets toggle).
- Daily revenue chart (with a Revenue / Tickets toggle, client-side).
- Ticket categories + ticket type charts.
- Side actions: edit, flag, archive, add sales, clear sales, edit series.
Prerequisites
- An
eid(from the Events list or a deep link). - Tenant-level
partnerIdset in your client.
The call chain
The reference FE fires these on mount (several in parallel). This is not an exhaustive list — it reflects the primary loads:| # | Method | Path | Purpose |
|---|---|---|---|
| 1 | GET | /events/{eid} | Hero: title, date, venue_name, hall_name, city, frontend_status, category. 404 → not-found. |
| 2 | GET | /events/{eid}/lookout_prediction_benchmark?type=capacity | Benchmark vs prediction. |
| 3 | GET | /events/{eid}/lookout_prediction?type=capacity | Demand prediction curve. |
| 4 | GET | /daily_revenue_summary/?event_id=¤cy=&start_date=1900-01-01&end_date=2100-01-01 | Daily revenue + manual adjustments. |
| 5 | GET | /events/{eid}/tickets | Ticket category + type charts. |
| 6 | GET | /events/{eid}/series?limit=1000 | Sibling events in the series. |
| 7 | GET | /events/{eid}/campaigns | Campaigns for the event (and any series members). |
| 8 | GET | /events/{eid}/attribution_model | Current attribution model. |
| 9 | GET | /integrations/facebook/events/{eid}/campaign_results | Campaign stats (Statistics tab / Wave). |
| 10 | GET | /integrations/facebook/events/{eid}/fb_insights | Impressions / clicks / ad spend. |
The reference FE on Event Detail does not call
/events/{eid}/statistics
(an fetchEventStatistics helper exists but is unused), and does not
render a taste-clusters panel here (fetchTopClusters isn’t called). The
KPI values on the Wave Statistics tab come from campaign_results +
fb_insights, not /statistics. If you want a KPI bar driven by
/events/{eid}/statistics, treat it as a separate integrator choice —
it’s a valid API, just not what the reference FE wires here.Demand prediction — endpoints and contract
type query param is required:
capacity— percentage mode (values are shares; multiply by 100 for display).ticket_count— absolute values mode.
Benchmark response
now and prediction carries value and benchmark. There is
no today field and no state field.
Prediction curve response
tickets_sold_actual, tickets_sold_predicted, and mapped_date.
(The older norm_tickets_sold_* fields no longer apply.)
Ticket categories
Daily revenue
currency comes from the user/tenant setting (the reference FE reads
userCurrency from browser storage), not from a currency field on the
event (there isn’t one). The canonical “all time” window uses
start_date=1900-01-01 and end_date=2100-01-01.Status updates (flag / archive) — the two-step sequence
Other interactions
| Interaction | API calls |
|---|---|
| Open in Wave | navigate to /campaigns/{eid} (no API) |
| Edit (event) | navigate to /events/edit/{eid} — see Event editor |
| Edit event series (modal) | GET /events/{eid}/series?limit=1000; GET /events/{eid}/available_events_for_series?limit=1000; save POST /events/{eid}/series?event_series=...; remove DELETE /events/{eid}/series?event_series=... |
| Add sales | navigate to the update-sales flow — see Sales uploads |
| Clear sales | DELETE /daily_revenue_summary?eid={eid} (FE treats 200 as success) |
| Toggle flagged | setFrontendStatus(eid, "FLAGGED" | "DEFAULT") |
| Archive | setFrontendStatus(eid, "HIDDEN"). The reference FE typically stays on the current URL after archive (history.push of the current pathname), not a hard redirect to /events. |
| Change attribution model | PUT /events/{eid}/attribution_model → refetch campaign_results + fb_insights |
| Capacity / Tickets toggle | re-request lookout_prediction* with type=capacity | ticket_count |
| Revenue / Tickets toggle (daily chart) | none (client-side only) |
Gotchas
lookout_prediction*, not benchmark / sales-graph
lookout_prediction*, not benchmark / sales-graph
The endpoints are
/events/{eid}/lookout_prediction_benchmark and
/events/{eid}/lookout_prediction, each requiring type=capacity or
type=ticket_count.No scale auto-detection
No scale auto-detection
Scale is the Capacity/Tickets toggle + fixed ×100 for capacity mode.
Don’t infer fraction-vs-percent from the data.
`/events/{eid}/tickets` is fired twice
`/events/{eid}/tickets` is fired twice
Once per chart in the reference FE. Dedupe with a shared fetch.
Currency is not on the event
Currency is not on the event
Read it from the user/tenant setting, not
event.currency (which
doesn’t exist).Facebook integration calls are always fired
Facebook integration calls are always fired
Even for non-Meta partners. Handle empty / 404 responses gracefully.
HIDDEN maps to RUNNING on the CR API, not CANCELLED
HIDDEN maps to RUNNING on the CR API, not CANCELLED
Related
- Events list — the page above.
- Event editor — what the Edit menu opens.
- Sales uploads — Add sales actions.
- Wave — Attribution — campaign_results + model.