What you’ll build
- A form pre-filled with the event’s current values.
- Submit handler that POSTs to the CR API.
- A “changes detected” heuristic that signals to the backend whether recommendations should be refreshed for this event.
Prerequisites
- An
eid. partnerDetails.productfrom your client store (sourced fromlocalStoragein the reference webapp). Drives thepartner_productquery param.- User has Lookout or Wave access.
The call chain
On mount:| # | Method | Path | Host | Purpose |
|---|---|---|---|---|
| 1 | GET | /events/{eid} | CR API | Raw event payload (includes lineups_raw, description — not on the slim main-API view). |
| # | Method | Path | Host | Purpose |
|---|---|---|---|---|
| 2 | PUT | /events/{eid}?event_type={prisma|fdlive}&partner_product={product}&itc_retry={bool} | CR API | Persist the edited event. Body = full event payload. |
URL params on the PUT
| Param | Values | When |
|---|---|---|
event_type | prisma if the event’s category is product, else fdlive | Always. |
partner_product | One of the partner’s registered products (from localStorage.partnerDetails.product) | Always. Mismatch ⇒ 422. |
itc_retry | true if any field that affects recommendations changed (see below), else false | Always. |
Detecting recommendation-relevant changes
When certain fields change, the backend should refresh the event’s taste-cluster recommendations. The reference webapp computes this client-side:itc_retry query param on the PUT. The backend
honours it.
Body shape
The form posts back the full event with whatever the user edited:Reference implementation
fdCr is the CR API axios instance — different baseURL than
your main fd client. See CORS & two-host architecture.
Forcing a recommendation refresh without changes
If a user wants to force a recommendation refresh without changing any event fields, send the save withitc_retry=true and an unchanged payload.
The backend treats the flag as the trigger.
Gotchas
Different host than every other Lookout page
Different host than every other Lookout page
Both the GET (load) and the PUT (save) live on the CR API. Mixing it up
with the main
/v3/events/{eid} (which returns a different, slimmer
shape) is the #1 mistake here.`event_type` and `partner_product` must match
`event_type` and `partner_product` must match
The CR API 422s if
event_type=prisma is sent for a non-product partner,
or if partner_product doesn’t match the partner’s registration. Don’t
derive event_type from a UI toggle — derive it from category.Redirect path depends on the user's products
Redirect path depends on the user's products
The reference webapp redirects to
/events if the user has Lookout
access, otherwise /campaigns. Mirror that — sending Wave-only users
to /events produces an empty-state page.itc_retry should be conservative
itc_retry should be conservative
Don’t send
true on every save — it costs the backend a refresh.
Use the field-comparison heuristic above so only edits that actually
affect recommendations trigger it.Related
- Event detail — where the Edit menu lives.
- Simulation — uses the same CR API host for event creation.
- Bulk event upload — also CR API.
- CORS & two-host architecture.