Runs a report and returns it as a file.
POST
/api/reports/{reportId}/export
deprecated
No permission required.
Takes the same body as a run. The file is streamed in the response, named in its `Content-Disposition` header.
Example request
Every block below sends the same request. Replace {{BASE_URL}} with the address of the API you are calling and {{API_KEY}} with your own key.
The request body is a ReportRunRequestDto. See the Request body section below for its fields.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
reportId
required |
path | string | The report id, from the catalog. |
format
required |
query | ReportFileFormat | The file format: `Csv` (the default) or `Xlsx`. The catalog lists each report's formats. |
suppressNulls
required |
query | boolean | If true, omit properties with null values. |
Request body
application/json
, required
| Field | Type | Description |
|---|---|---|
startDate
required |
string (date) | The first calendar day to include, for example `2026-03-01`. Read as a day in `timeZoneId`, and included whole. |
endDate
required |
string (date) | The last calendar day to include, for example `2026-03-31`. Included whole: the run covers up to the first instant of the next day in `timeZoneId`. Must not be before `startDate`, and the range may cover at most 366 days. Conditional: When EndDate and StartDate meet conditions. |
timeZoneId
required |
string | The IANA time zone the dates are calendar days in, for example `America/Los_Angeles`. Reports that group rows by day group them by this zone's day. Optional: the dates are UTC days when it is omitted. Conditional: When TimeZoneId is not empty. nullablemax length 64 |
merchantId
required |
string (uuid) | Narrows the run to one merchant the caller can read. Optional: the run covers every merchant the caller can read when it is omitted. Refused for a report whose catalog entry does not support a merchant, and for a merchant outside the caller's scope. Conditional: When MerchantId is not null. nullable |
filters
required |
object | The report's filters, keyed by the names its parameters route lists. A filter that allows multiple values takes an array; every other filter takes a single value. Optional. Conditional: When Filters is not null. nullable |
This request body has no documented fields.
Responses
200 OK
Body: string (binary)
Each item has these fields.
| Field | Type | Description |
|---|
This response has no documented body fields.
403 You do not hold the report's permission.
Body: RemoteServiceErrorResponse
Each item has these fields.
| Field | Type | Description |
|---|---|---|
error
required |
RemoteServiceErrorInfo |
This response has no documented body fields.
401 Unauthorized
Body: RemoteServiceErrorResponse
Each item has these fields.
| Field | Type | Description |
|---|---|---|
error
required |
RemoteServiceErrorInfo |
This response has no documented body fields.
400 The request is invalid, the report does not export in that format (`Reports:ExportFormatNotSupported`), names a filter the report does not define (`Reports:UnknownFilter`) or a value that does not fit it (`Reports:InvalidFilterValue`), names a merchant for a report that cannot be narrowed to one (`Reports:MerchantFilterNotSupported`), or would return too many rows (`Reports:RowLimitExceeded`).
Body: RemoteServiceErrorResponse
Each item has these fields.
| Field | Type | Description |
|---|---|---|
error
required |
RemoteServiceErrorInfo |
This response has no documented body fields.
404 The report does not exist or is not available to your tenant (`Reports:ReportNotFound`), or the merchant does not exist or is not one you can read (`Reports:MerchantNotInScope`).
Body: RemoteServiceErrorResponse
Each item has these fields.
| Field | Type | Description |
|---|---|---|
error
required |
RemoteServiceErrorInfo |
This response has no documented body fields.
501 Not Implemented
Body: RemoteServiceErrorResponse
Each item has these fields.
| Field | Type | Description |
|---|---|---|
error
required |
RemoteServiceErrorInfo |
This response has no documented body fields.
500 Internal Server Error
Body: RemoteServiceErrorResponse
Each item has these fields.
| Field | Type | Description |
|---|---|---|
error
required |
RemoteServiceErrorInfo |
This response has no documented body fields.
default The request failed. The body carries the standard error envelope: a machine-readable `error.code`, a human-readable `error.message`, and `error.validationErrors` when the failure was a validation rejection. See the error-code reference in this document's description for the values `error.code` can take.
Body: RemoteServiceErrorResponse
Each item has these fields.
| Field | Type | Description |
|---|---|---|
error
required |
RemoteServiceErrorInfo |
This response has no documented body fields.
429 The request was refused because a rate limit was exceeded. Wait at least the interval `Retry-After` names before retrying, then back off. Limits are tuned per deployment, so read the allowance from the response headers rather than assuming a fixed ceiling.
Body: RateLimitProblemDetails
Each item has these fields.
| Field | Type | Description |
|---|---|---|
type
required |
string | The problem type identifier. Always the same value: the failure is the status code itself, so there is no sub-type for a caller to branch on. nullable |
title
required |
string | A short, human-readable summary of the problem type. nullable |
status
required |
integer (int32) | The HTTP status code, repeated in the body as the problem-details format defines. |
detail
required |
string | A human-readable explanation of this occurrence of the problem. nullable |
retryAfterSeconds
required |
integer (int32) | How long to wait before retrying, in whole seconds, carrying the same figure as the `Retry-After` header. Always at least one: a value of zero would invite an immediate retry that is certain to be rejected again. |
This response has no documented body fields.
Errors
A failed request returns the platform error envelope. The
error reference lists every value
error.code can carry and shows the four response shapes.