View as Markdown

llms.txt

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-10-01 06:25 UTC.

API reference Reports

Runs a report and returns its rows.

POST /api/reports/{reportId}/run deprecated

No permission required.

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.

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
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"
}'

PowerShell
$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 $body

npm install @winkpg/winkpg-api

TypeScript (SDK)
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"
});

TypeScript (raw HTTP)
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

C# (SDK)
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);

C# (raw HTTP)
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

Python (SDK)
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

Python (raw HTTP)
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.
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: ReportRunResultDto Each item has these fields.

Field Type Description
reportId required string The report id that ran. nullable
startUtc required string (date-time) The first instant the run covered, inclusive, in UTC.
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.
timeZoneId required string The time zone the dates were read in, or `null` when they were UTC days. nullable
merchantId required string (uuid) The merchant the run was narrowed to, or `null` when it was not narrowed. nullable
columns required array of ReportColumnDto The columns, in display order. nullable
rows required array of object The rows. Each row is keyed by the `field` of its columns; a row may omit a column that has no value. nullable
rowCount required integer (int32) The number of rows.

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, 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.

Codes declared by Reports

Authentication

    Reconnecting to the server

    Could not reconnect

    This session has ended

    Attempt 1

    Your work on this page is still here. Retrying keeps it; reloading starts the page again.

    The server no longer holds this page's state, so it has to be loaded again.