Skip to main content

Export Sales Channel Coverage (async)

GET 

/api/reporting/sales-channel-coverage/export

Dispatches an async job (ExportSalesChannelCoverageTrackedJob) that builds the full unpaginated sales channel coverage CSV in the background. Returns immediately with a tracked_job_log_id that the frontend uses to poll progress via the global job tray.

Authentication: Requires Bearer token

Flow:

  1. Client calls this endpoint with the same filters/flags supported by the paginated endpoint.
  2. Server queues the job and returns { data: { tracked_job_log_id }, message }.
  3. Frontend subscribes to the job tray; when job completes, log.results.file contains the filename on the model-exports disk.
  4. Client downloads the file via GET /api/export/download?file={filename}.

CSV columns: SKU, Product Name, Supplier, Type, Stock, Valuation, Total Coverage, plus one column per integration (or instance when by_integration=0) covering the union of channels across all returned rows. Channel columns are computed from the union of all rows in the result set.

Request

Responses

Successful response