Generate a campaign report
const url = 'https://portal.staging.arago-tech.com/reporting/campaigns/example/export';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"date_range":{"from":"2024-01-01T00:00:00Z","to":"2025-01-01T00:00:00Z"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://portal.staging.arago-tech.com/reporting/campaigns/example/export \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "date_range": { "from": "2024-01-01T00:00:00Z", "to": "2025-01-01T00:00:00Z" } }'Starts the asynchronous generation of a CSV report covering a campaign, optionally over a date range, and returns the identifier of the report being generated. The report is generated in the background: it cannot be downloaded until the generation completes.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”The unique identifier of the campaign in hexadecimal format
Request Body
Section titled “Request Body”Starts the asynchronous generation of a campaign CSV report
object
The event date range covered by the report, narrowed to the campaign’s own start and end dates. Optional: omitted, the report covers the campaign’s whole history.
object
Filter items with date on or after this timestamp
Example
2024-01-01T00:00:00ZFilter items with date strictly before this timestamp. Must be after ‘from’ when both are provided.
Example
2025-01-01T00:00:00ZResponses
Section titled “ Responses ”A successful response.
The identifier of the report being generated
object
The unique identifier of the report in hexadecimal format, to download it once the generation completes
Example
{ "id": "63e2d42a27ad5f2b345ca789"}Bad request
object
Example
{ "error": { "code": "BAD_REQUEST", "details": [ { "code": "MAX_ITEMS", "field": "line_items", "message": "value must contain no more than 3000 item(s)", "params": { "max": "3000" } } ], "message": "Bad request" }}Unauthorized
object
Example
{ "error": { "code": "UNAUTHORIZED", "message": "Unauthorized" }}Internal server error
object
Example
{ "error": { "code": "INTERNAL_ERROR", "message": "Internal server error" }}default
Section titled “default”An unexpected error response.
object
object
Examplegenerated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}