Download
Generate a data download
POST /download/generate
POST
This endpoint requires authentication. Include your Bearer token in the Authorization header.
Description
POST /download/generate Description: Submits a download generation request. The server validates the input, generates BigQuery queries for the requested data, creates a Download record, and queues a background job. Returns immediately with a 202 Accepted response containing the download and job identifiers. UseGET /download/{id}/status to poll for completion.
Authorization:
- Required role:
useror higher
emails(required): At least one valid email address to notify on completionformat: Output formats (csv, xlsx, pdf). Defaults to xlsx.include: Data sheets to include (raw, aggregates, aggregator). Defaults to aggregates.type: Report type (royalty, accounting, expense). Defaults to royalty.saleType: Filter by sale type (e.g. Download, Stream).- Filter fields (
artists,user,isrc,upc,country,dsp,aggregator) accept either a comma-separated string or an array of strings. Empty arrays and empty strings are ignored.
Code Examples
Authorizations
Body
application/json