Skip to main content
POST
List report files

Authorizations

x-stash-hmac-signature
string
header
required

Versioned HMAC-SHA256 signature authenticating server-to-server SDK requests (your backend calling Stash), as opposed to client-side SDK operations. Recommended over the deprecated X-Stash-Api-Key for the best security. Header format: v1;{appId};{unixMillisTimestamp};{base64Signature} (semicolon-delimited). {base64Signature} is the base64-encoded HMAC-SHA256 of the string {unixMillisTimestamp}.{requestBody} using your app ingress secret (the ingress secret is shown base64-encoded in Studio; base64-decode it to the raw bytes used as the HMAC key), where {requestBody} is the request body exactly as you send it for POST and PUT requests (the compact canonical request JSON is also accepted) and empty for GET requests. A signature over the exact bytes verifies for bodies of up to 18 KiB (18,432 bytes); a larger body may be refused with 401 even when correctly signed. The timestamp must be within 5 minutes of Stash server time. Your appId is your immutable app identifier, shown in Stash Studio under Project Settings > App details; your ingress secret is under Project Settings > API Secrets.

Path Parameters

shopId
string
required

Shop identifier from Stash Studio. Must equal the shop in the x-stash-hmac-signature header.

Body

application/json

Request to list a shop's report files for a range of UTC days. The shop is taken from the path. Signed over the request body exactly as sent.

reportType
enum<string>
default:REPORT_TYPE_UNSPECIFIED
required
  • REPORT_TYPE_UNSPECIFIED: Refused with INVALID_ARGUMENT.
  • REPORT_TYPE_SETTLED: One file per UTC settlement day; rows are dated by settlement and reconcile with the payout.
  • REPORT_TYPE_CHARGE: One file per UTC day. Each row is dated by its own Transaction Date: a payment by its charge time, a refund or dispute step by its own time. Includes unsettled and failed charges.
Available options:
REPORT_TYPE_UNSPECIFIED,
REPORT_TYPE_SETTLED,
REPORT_TYPE_CHARGE
reportFormat
enum<string>
default:REPORT_FORMAT_UNSPECIFIED
required

The file format of a report file. Every format holds the same rows and columns.

  • REPORT_FORMAT_UNSPECIFIED: Refused with INVALID_ARGUMENT.
  • REPORT_FORMAT_CSV: Comma-separated values with a header row.
  • REPORT_FORMAT_JSONL: JSON Lines: one JSON object per row. A field with no value is left out of the object, not written as null.
  • REPORT_FORMAT_PARQUET: Apache Parquet.
Available options:
REPORT_FORMAT_UNSPECIFIED,
REPORT_FORMAT_CSV,
REPORT_FORMAT_JSONL,
REPORT_FORMAT_PARQUET
startDate
string
required

First UTC day of the range, inclusive, as YYYY-MM-DD. The range [start_date, end_date] is at most 31 days.

endDate
string
required

Last UTC day of the range, inclusive, as YYYY-MM-DD. Must not be before start_date.

Response

A successful response.

The shop's report files for the requested days, with one signed link each.

downloadUrlExpiresAt
string<date-time>
required

When every download_url in this response stops working (RFC 3339, UTC), 15 minutes after the response. Set on every successful response, also when files is empty.

firstDate
string
required

The first UTC day, as YYYY-MM-DD, that has a file of the requested type and format for the shop, even when it is outside the range. Days before it never get a file; a later day with no entry is not written yet.

files
Report File · object[]

One entry for each day in the range that has a file, in date order. A day with no transactions has an entry whose file has no transaction rows: a CSV file still has its header row, and a JSONL file is 0 bytes. A day before first_date, or a day the export has not written yet, has no entry.