The API reference isn't available right now
This instance couldn't load its API specification. The reference returns as soon as the specification is readable again.
Back to the API reference
No such operation
This instance documents no operation under that identifier. It may have been renamed, or it may belong to a feature this installation hasn't enabled.
Back to the API reference
This reference may be out of date
This instance couldn't reach its API specification on the last attempt, so this page shows the copy fetched before that. Anything added or changed since then is missing here, and the reference updates itself as soon as the specification is readable again. Last fetched 2026-11-12 05:58 UTC.
API reference
/
Reports
Runs a report and returns its rows.
POST
/api/reports/{reportId}/run
deprecated
No permission required.
Requires API key scope:
reports
()
The range is calendar days read in `timeZoneId`, from the start of `startDate` to the
end of `endDate`; the response echoes the UTC window that was covered. A run that would
return more than 10,000 rows is refused rather than truncated.
Signed in, you can send this request to your own sandbox merchant from the console
and read the answer.
Sign in to try it .
On this page
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.
Code sample language >_
cURL PS
PowerShell TS
TypeScript C#
C# Py
Python
Copythe install command for cURL
Copied
Copy failed
cURL CopycURL
Copied
Copy failed
curl -X POST "{{BASE_URL}}/api/reports/{reportId}/run" \
-H "api-key: {{API_KEY}}" \
-H "Content-Type: application/json" \
-d '{
"startDate": "2026-01-01",
"endDate": "2026-01-01"
}'
Copythe install command for PowerShell
Copied
Copy failed
PowerShell CopyPowerShell
Copied
Copy failed
$headers = @{
'api-key' = '{{API_KEY}}'
}
$body = @'
{
"startDate": "2026-01-01",
"endDate": "2026-01-01"
}
'@
$response = Invoke-RestMethod -Method POST -Uri '{{BASE_URL}}/api/reports/{reportId}/run' `
-Headers $headers -ContentType 'application/json' -Body $bodynpm install @winkpg/winkpg-api
Copythe install command for TypeScript (SDK)
Copied
Copy failed
TypeScript (SDK) CopyTypeScript (SDK)
Copied
Copy failed
import { Configuration, ReportsApi } from '@winkpg/winkpg-api';
const api = new ReportsApi(new Configuration({
basePath: '{{BASE_URL}}',
apiKey: '{{API_KEY}}',
}));
const { data } = await api.reportsRun("REPORT_ID", {
"startDate": "2026-01-01",
"endDate": "2026-01-01"
});
Copythe install command for TypeScript (raw HTTP)
Copied
Copy failed
TypeScript (raw HTTP) CopyTypeScript (raw HTTP)
Copied
Copy failed
const response = await fetch('{{BASE_URL}}/api/reports/{reportId}/run', {
method: 'POST',
headers: {
"api-key": "{{API_KEY}}",
"Content-Type": "application/json",
},
body: JSON.stringify({
"startDate": "2026-01-01",
"endDate": "2026-01-01"
}),
});
const data = await response.json();dotnet add package WinkPg.Api.Client
Copythe install command for C# (SDK)
Copied
Copy failed
C# (SDK) CopyC# (SDK)
Copied
Copy failed
using WinkPg.Api.Client.Api;
using WinkPg.Api.Client.Client;
using System.Text.Json;
var config = new Configuration { BasePath = "{{BASE_URL}}" };
config.AddApiKey("api-key", "{{API_KEY}}");
var api = new ReportsApi(config);
var body = JsonSerializer.Deserialize<ReportRunRequestDto>("""
{
"startDate": "2026-01-01",
"endDate": "2026-01-01"
}
""");
var result = await api.ReportsRunAsync("REPORT_ID", body);
Copythe install command for C# (raw HTTP)
Copied
Copy failed
C# (raw HTTP) CopyC# (raw HTTP)
Copied
Copy failed
using System.Text;
using var http = new HttpClient { BaseAddress = new Uri("{{BASE_URL}}") };
var request = new HttpRequestMessage(new HttpMethod("POST"), "/api/reports/{reportId}/run");
request.Headers.Add("api-key", "{{API_KEY}}");
request.Content = new StringContent("""
{
"startDate": "2026-01-01",
"endDate": "2026-01-01"
}
""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();pip install winkpg-api
Copythe install command for Python (SDK)
Copied
Copy failed
Python (SDK) CopyPython (SDK)
Copied
Copy failed
import winkpg_api
configuration = winkpg_api.Configuration(host="{{BASE_URL}}")
configuration.api_key["ApiKey"] = "{{API_KEY}}"
with winkpg_api.ApiClient(configuration) as client:
api = winkpg_api.ReportsApi(client)
body = winkpg_api.ReportRunRequestDto.from_dict({
"startDate": "2026-01-01",
"endDate": "2026-01-01"
})
result = api.reports_run("REPORT_ID", body)pip install requests
Copythe install command for Python (raw HTTP)
Copied
Copy failed
Python (raw HTTP) CopyPython (raw HTTP)
Copied
Copy failed
import requests
headers = {
"api-key": "{{API_KEY}}",
"Content-Type": "application/json",
}
body = {
"startDate": "2026-01-01",
"endDate": "2026-01-01"
}
response = requests.request(
"POST",
"{{BASE_URL}}/api/reports/{reportId}/run",
headers=headers,
json=body,
)
response.raise_for_status()
data = response.json()
Parameters
Name
In
Type
Description
reportId
required
path
string
The report id, from the catalog.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
suppressNulls
required
query
boolean
If true, omit properties with null values.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
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.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
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.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
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.
nullable max length 64
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
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
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
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
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
This request body has no documented fields.
Responses
Response status
200
OK
OK
Body:
ReportRunResultDto
ReportRunResultDto
Each item has these fields.
Field
Type
Description
reportId
required
string
The report id that ran.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
startUtc
required
string (date-time)
The first instant the run covered, inclusive, in UTC.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
endUtc
required
string (date-time)
The end of the window the run covered, exclusive, in UTC: the first instant of the day after
the last requested day.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
timeZoneId
required
string
The time zone the dates were read in, or `null` when they were UTC days.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
merchantId
required
string (uuid)
The merchant the run was narrowed to, or `null` when it was not narrowed.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
columns
required
array of ReportColumnDto
array of ReportColumnDto
The columns, in display order.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
Fields of each ReportColumnDto:
Field
Type
Description
field
required
string
The key the column's value is stored under in each row. Stable once published.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
label
required
string
The column's display label.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
fieldType
required
ReportColumnFieldType
ReportColumnFieldType
The type of the column's values.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
String
Text. Integer
A whole number. Decimal
A number with a fractional part, such as an amount. Boolean
true or false. DateTime
An ISO 8601 date and time. Date
An ISO 8601 calendar date. Guid
A GUID. Other
Any other value. Read it as text.
format
required
string
A display format hint, for example `C` for currency or `d` for a short date, when the
report provides one. Values in rows are never pre-formatted.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
isVisible
required
boolean
Whether the column is shown by default.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
aggregates
required
array of ColumnAggregateType
array of ColumnAggregateType
The totals the report shows for this column, when it shows any.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
Sum
Sum of all values in the column. Average
Average of all values in the column. Count
Count of rows (non-null values). Min
Minimum value in the column. Max
Maximum value in the column.
This body has no documented fields.
rows
required
array of object
array of
The rows. Each row is keyed by the `field` of its columns; a row may omit a column that
has no value.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
rowCount
required
integer (int32)
The number of rows.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
This response has no documented body fields.
429
Too Many Requests
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
RemoteServiceErrorResponse
Each item has these fields.
Field
Type
Description
error
required
RemoteServiceErrorInfo
RemoteServiceErrorInfo
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
This response has no documented body fields.
Errors
400 401 403 404 500 501 default
400
Bad Request
The request is invalid, 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`). 401
Unauthorized
Unauthorized. The request carried no API key or signed-in session, or the key it carried is invalid, revoked or expired. 403
Forbidden
You do not hold the report's permission. 404
Not Found
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`). 500
Internal Server Error
Internal server error. The platform failed unexpectedly while handling the request. If it keeps failing, contact support and quote the correlation id, which the response carries in the `X-Correlation-Id` header and as `error.data.correlationId`. 501
Not Implemented
Not implemented. The operation is declared but has no implementation on this deployment, so no request to it can succeed. Retrying does not help. 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. The error reference lists the values `error.code` can take. 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. The error reference lists the values `error.code` can take.
Body:
RemoteServiceErrorResponse
RemoteServiceErrorResponse
Each item has these fields.
Field
Type
Description
error
required
RemoteServiceErrorInfo
RemoteServiceErrorInfo
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
Fields of RemoteServiceErrorInfo:
Field
Type
Description
code
required
string
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
message
required
string
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
details
required
string
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
data
required
object
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
validationErrors
required
array of RemoteServiceValidationErrorInfo
array of RemoteServiceValidationErrorInfo
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
This body has no documented fields.
This response has no documented body fields.
Next steps