What you’ll build
- Hero (title, date, venue, status pills).
- Event stats bar (Revenue / Purchases / Spent / ROAS).
- Campaign cards (one per existing campaign, with pause/resume controls).
- Taste clusters panel.
- “Start setup” CTA → wizard.
Prerequisites
- An
eid(from the Wave list). - An authenticated user with
Permissions.wave.
The call chain
On mount (parallel):| # | Method | Path | Purpose |
|---|---|---|---|
| 1 | GET | /events/{eid} | Event header. |
| 2 | GET | /events/{eid}/attribution_model | Current attribution model. |
| 3 | GET | /events/{eid}/statistics | Stats bar KPIs. |
| 4 | GET | /integrations/facebook/events/{eid}/campaign_results | Branch “with stats” vs “no stats”. |
| 5 | GET | /integrations/facebook/events/{eid}/fb_insights | Impressions / clicks / ad spend. |
| 6 | GET | /events/{eid}/campaigns?page=1&limit=50 | Existing campaign list (paged). |
| 7 | GET | /events/{eid}/clusters | Taste clusters. |
| 8 | GET | /setup_processes/{eid} | Existing draft setup, or 404 if none. |
| 9 | GET | /meta/authorization/status | Meta (Facebook) auth state — used to gate the wizard. |
| 10 | GET | /setup_processes/event_types?... | Setup wizard’s event-type metadata. |
Reading the campaign list
status rolls up multiple platform states. Common values: RUNNING,
PAUSED, COMPLETED, IGNORED.
Per-campaign mutations
| Action | Endpoint |
|---|---|
| Update creative | PUT /campaigns/{eid}/{tc}/{tc_run_id}/creative (body: full creative) |
| Update target audience | PUT /campaigns/{partner_id}/{eid}/{tc}/{tc_run_id}/target_audience (body: full targeting) |
| Ignore / skip | PUT /campaigns/{eid}/{tc}/{tc_run_id}/ignore (body: { reason }) |
| Pause / resume event’s campaigns | PUT /events/{eid}/client_campaign_status?client_campaign_status=PAUSED|RUNNING |
| Poll status-change task | GET /events/{eid}/client_campaign_status/task |
| Toggle automated optimisation | PUT /events/{eid}/campaign_optimisation_status?campaign_optimisation_status=ON|OFF |
| Toggle ad-campaign optimisation | PUT /events/{eid}/ad_campaign_optimisation_status?ad_campaign_optimisation_status=ON|OFF |
| Change attribution model | PUT /events/{eid}/attribution_model (body: { model }) |
| Edit a single published cluster | POST /campaigns_setup (body: { eid, tc, tc_run_id, audience_id, creatives, targeting, saved_audience_id }) |
Reference implementation
Pausing all campaigns for an event
This kicks off a long-running task; poll for status:Gotchas
`/setup_processes/{eid}` 404 is fine
`/setup_processes/{eid}` 404 is fine
No draft yet ⇒ 404. Don’t treat it as an error; just show the “Start
setup” CTA.
Meta auth must be valid before publish
Meta auth must be valid before publish
The wizard’s publish step refuses to call
/boost if Meta auth is
missing. The reference webapp checks /meta/authorization/status and
surfaces a “Reconnect Meta” CTA on the page. Mirror that.Many writes use query-string params
Many writes use query-string params
client_campaign_status, campaign_optimisation_status,
ad_campaign_optimisation_status, and the event-series mutations all
use query-string params, not a JSON body. Easy to send a body and get
a confusing 400.`/campaigns_setup` is a different endpoint than `/setup_processes/{eid}`
`/campaigns_setup` is a different endpoint than `/setup_processes/{eid}`
Don’t mix them up:
/setup_processes/{eid}PUT — edit a draft./campaigns_setupPOST — edit one cluster of a published campaign.
Some endpoints are missing from the OpenAPI spec
Some endpoints are missing from the OpenAPI spec
/events/{eid}/client_campaign_status[/task], /events/{eid}/campaign_optimisation_status,
/events/{eid}/ad_campaign_optimisation_status, /events/{eid}/attribution_model,
and /events/{eid}/available_events_for_series are hit by the reference
webapp but not present in the canonical OpenAPI spec. Confirm with
Future Demand before relying on them.Related
- Campaigns lifecycle — the wizard.
- Wave list — the page above.
- Lookout — Event detail — shared components.
- Polling long-running jobs.