Statements

Request statement

POSThttps://api.firstleeward.com/v0/statements

Requests a statement over a calendar-day period. The statement is returned PENDING and its file is produced asynchronously; a STATEMENT_STATUS_UPDATED webhook follows once it is GENERATED or FAILED. The period may span at most 31 days, must start on or after 2026-06-01, and must end on a day whose rows are final: yesterday from 10:00 UTC, otherwise the day before. At most 5 statements may be pending per project at once.

Authorizations

Authorizationstring · headerrequired

API key as Bearer token, e.g. Bearer YOUR_API_KEY

Headers

Leeward-Versionenum<string>required

API version (YYYY-MM-DD). Available option: 2026-09-18

Idempotency-Keystringrequired

Unique key for safely retrying this request. Up to 255 characters; we recommend a UUIDv4. The first request executes and its response is cached; subsequent requests with the same key replay the cached response (24h retention).

Body

application/json

typestringrequired

What the statement itemises

Available options:CARD_TRANSACTION_FEESCARD_NON_TRANSACTION_FEES
periodobjectrequired
Show child attributes
fromstring<date>required

First calendar day covered, inclusive, UTC

tostring<date>required

Last calendar day covered, inclusive, UTC

fieldsstring[]

Columns to include, in file order. Omit for every column of the type.

formatstringdefault: "CSV"

File format

Available options:CSV

Response

200Statement resource
idstring<uuid>required

Unique statement identifier

typestringrequired

What the statement itemises

Available options:CARD_TRANSACTION_FEESCARD_NON_TRANSACTION_FEES
originstringrequired

Who requested the statement

Available options:CLIENTFIRST_LEEWARD
statusstringrequired

Current statement status

Available options:PENDINGGENERATEDFAILED
periodobjectrequired
Show child attributes
fromstring<date>required

First calendar day covered, inclusive, UTC

tostring<date>required

Last calendar day covered, inclusive, UTC

fieldsstring[] | nullrequired

Columns in the file, in order. null means every column of the type.

formatstringrequired

File format

Available options:CSV
versionstringrequired

API version the statement was requested under. Fixes the column definitions the file follows.

rowCountinteger | nullrequired

Number of data rows in the file, once generated

byteSizeinteger | nullrequired

Size of the file in bytes, once generated

dataAsOfstring | nullrequired

ISO 8601 timestamp of how fresh the source data was when the file was produced, when known

generatedAtstring | nullrequired

ISO 8601 timestamp of when the file became available

createdAtstringrequired

ISO 8601 timestamp of creation

updatedAtstringrequired

ISO 8601 timestamp of last update

400Response for status 400
Option 1 · StatementTypeNotAvailableError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired
Option 2 · StatementUnknownFieldError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired
Option 3 · StatementPeriodInvalidError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired
Option 4 · StatementPeriodTooRecentError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired
Option 5 · StatementPeriodTooEarlyError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired
409Too many statements are pending for this project; retry once one finishes
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired