Flow 1 — Per-event “Add sales”
Triggered from the Event detail page’s action menu. The user picks either manual or file upload mode.Manual mode (/events/{eid}/update-sales/salesSummary)
200 on success with the persisted record. Validation errors come
back as 400 with the standard error envelope.
File-upload mode (/events/{eid}/update-sales/documentUpload)
/downloads/sales_template.xlsx (static asset). Ask
support for partner-specific column variants.
Reference implementation
Authorization and X-Preferred-Partner-Id.
You can use your normal client — just make sure Content-Type is set to
multipart/form-data (or let the browser set it automatically with the
boundary).
Flow 2 — Generic Uploads page (/uploads)
The Uploads page lets users drop multiple files, set a category per file,
and dispatch each to the correct ingest endpoint.
For the sales-data category, the upload routes to:
Response on upload
200 on success. Validation errors come back with:
Clearing previously-ingested sales
From the Event detail’s “Clear sales” menu item, with a confirm modal:204. This deletes all sales-related rows the partner has
ingested for the event (manual + file + adjustment).
Reference implementation — file routing
Gotchas
`progressEvent.total` can be 0
`progressEvent.total` can be 0
On chunked-transfer responses some browsers don’t surface
total.
Guard the percentage calc — the reference webapp doesn’t and shows
NaN%.`sales_edit_export` is dual-purpose
`sales_edit_export` is dual-purpose
Same URL: GET = download, POST = upload. Don’t accidentally call GET
when you meant POST.
Validation errors come back at HTTP 200
Validation errors come back at HTTP 200
For both
transaction_summary and sales_edit_export the inner
validation_errors array can be non-empty even on a 200. Always inspect
the body.DELETE /daily_revenue_summary is irreversible
DELETE /daily_revenue_summary is irreversible
Confirm with the user, and consider exporting first via the GET
counterpart.
Related
- Event detail — where the per-event flows are launched.
- Bulk event upload — adjacent flow.
- File uploads cookbook.