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.
Signed in, you can send this request to your own sandbox merchant from the console and read the answer. Sign in to try it.
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 >= StartDate. |
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, or because something a later retry can clear stopped it. A rate limit refusal carries an `application/problem+json` body: 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. Any other refusal carries the standard error envelope as `application/json`, and its `error.code` names the cause.
Body: RemoteServiceErrorResponse
Each item has these fields.
| Field | Type | Description |
|---|---|---|
error
required |
RemoteServiceErrorInfo |
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.