Statements List

Statements List

Certified

List Mercury statements

Retrieve statements for a specific Mercury depository bank account with automatic cursor-based pagination and filtering.

yaml
type: io.kestra.plugin.mercury.statements.List

List all statements for an account into memory

yaml
id: list_mercury_statements
namespace: company.team

tasks:
  - id: list_statements
    type: io.kestra.plugin.mercury.statements.List
    apiToken: "{{ secret('MERCURY_API_TOKEN') }}"
    accountId: "4b54e3d6-72aa-4c07-b3c6-9f4a56a64010"
    fetchType: FETCH

List statements filtered by period start date range

yaml
id: list_statements_filtered
namespace: company.team

tasks:
  - id: list_statements
    type: io.kestra.plugin.mercury.statements.List
    apiToken: "{{ secret('MERCURY_API_TOKEN') }}"
    accountId: "4b54e3d6-72aa-4c07-b3c6-9f4a56a64010"
    start: "2024-01-01"
    end: "2024-03-31"
    fetchType: FETCH

Stream all statements for an account to internal storage

yaml
id: store_mercury_statements
namespace: company.team

tasks:
  - id: store_statements
    type: io.kestra.plugin.mercury.statements.List
    apiToken: "{{ secret('MERCURY_API_TOKEN') }}"
    accountId: "4b54e3d6-72aa-4c07-b3c6-9f4a56a64010"
    fetchType: STORE
Installation

Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:

kestractl plugins get io.kestra.plugin:plugin-mercury --compatible-for $KESTRA_VERSION

For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.

For Kestra CLI, replace LATEST with a specific version or version range to pin the plugin version.

Properties

Account ID

The unique identifier (UUID) of the Mercury bank account whose statements to list. Depository accounts only; credit and treasury accounts are not supported.

Mercury API token

API token for authentication with the Mercury API.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
Defaulthttps://api.mercury.com/api/v1

Mercury API base URL

Base URL for the Mercury API. Override for the Mercury sandbox (https://api-sandbox.mercury.com/api/v1). Must use HTTPS, except for loopback hosts (localhost, 127.0.0.1, ::1) during local testing.

End date filter

Latest date to filter statements by period start date. Format: YYYY-MM-DD. Mercury defaults to the current date if omitted or set to a future date. Mercury enforces a maximum range of 3 months between start and end.

DefaultFETCH
Possible Values
STOREFETCHFETCH_ONENONE

Fetch mode

Controls how results are returned: FETCH to return all rows in memory, FETCH_ONE for the first row, STORE to stream records as ION into internal storage, or NONE to skip collecting outputs.

Default1000

Results per page

Maximum number of statements to return per page. Minimum 1, maximum 1000. Default is 1000.

Possible Values
ASCDESC

Sort order

Sort order of the returned records. Allowed values: ASC or DESC. Defaults to ASC for accounts, cards, and recipients; defaults to DESC for statements.

Default100

Maximum pages to retrieve

Safety cap on the number of pages fetched during pagination. Minimum 1. Default is 100.

Start date filter

Earliest date to filter statements by period start date. Format: YYYY-MM-DD. Mercury enforces a maximum range of 3 months between start and end.

The first statement fetched

The first statement retrieved. Only populated when fetchType is FETCH_ONE.

Definitions
accountNumberstring

Account number

Bank account number for the depository account associated with this statement. Sensitive banking details; never log.

companyLegalAddress

Company legal address

Registered legal address of the company associated with the account. Sensitive personal or business data; never log.

address1string

Address line 1

Primary street address line.

address2string

Address line 2

Secondary street address line (apartment, suite, unit, etc.).

citystring

City

City of the address.

countrystring

Country code

Two-letter ISO 3166-1 alpha-2 country code.

namestring

Address name

Name associated with this address, if present.

postalCodestring

Postal code

Postal or ZIP code.

regionstring

Region

State, province, or region code.

companyLegalNamestring

Company legal name

Legal name of the entity that owns the depository account.

downloadUrlstring

Download URL

Download URL for the statement document. May contain signed or credentialed parameters; never log.

einstring

Employer identification number

Federal Employer Identification Number (EIN) or tax identification number. Sensitive tax details; never log.

endDatestring
Formatdate-time

End date

End date and time of the statement period in UTC.

endingBalancenumber

Ending balance

Ending ledger balance of the account for the statement period in USD.

idstring

Statement ID

Unique identifier (UUID) of the statement.

routingNumberstring

Routing number

American Bankers Association (ABA) routing transit number for the depository account. Sensitive banking details; never log.

startDatestring
Formatdate-time

Start date

Start date and time of the statement period in UTC.

transactionsarray

Transactions

List of transaction summary records included in this statement period.

createdAtstring
Formatdate-time

Creation timestamp

UTC timestamp when the transaction was initiated or created.

idstring

Transaction ID

Unique identifier (UUID) of the transaction.

postedAtstring
Formatdate-time

Posted timestamp

UTC timestamp when the transaction was posted to the ledger, or null if pending.

The statements fetched

List of retrieved statements. Only populated when fetchType is FETCH.

Definitions
accountNumberstring

Account number

Bank account number for the depository account associated with this statement. Sensitive banking details; never log.

companyLegalAddress

Company legal address

Registered legal address of the company associated with the account. Sensitive personal or business data; never log.

address1string

Address line 1

Primary street address line.

address2string

Address line 2

Secondary street address line (apartment, suite, unit, etc.).

citystring

City

City of the address.

countrystring

Country code

Two-letter ISO 3166-1 alpha-2 country code.

namestring

Address name

Name associated with this address, if present.

postalCodestring

Postal code

Postal or ZIP code.

regionstring

Region

State, province, or region code.

companyLegalNamestring

Company legal name

Legal name of the entity that owns the depository account.

downloadUrlstring

Download URL

Download URL for the statement document. May contain signed or credentialed parameters; never log.

einstring

Employer identification number

Federal Employer Identification Number (EIN) or tax identification number. Sensitive tax details; never log.

endDatestring
Formatdate-time

End date

End date and time of the statement period in UTC.

endingBalancenumber

Ending balance

Ending ledger balance of the account for the statement period in USD.

idstring

Statement ID

Unique identifier (UUID) of the statement.

routingNumberstring

Routing number

American Bankers Association (ABA) routing transit number for the depository account. Sensitive banking details; never log.

startDatestring
Formatdate-time

Start date

Start date and time of the statement period in UTC.

transactionsarray

Transactions

List of transaction summary records included in this statement period.

createdAtstring
Formatdate-time

Creation timestamp

UTC timestamp when the transaction was initiated or created.

idstring

Transaction ID

Unique identifier (UUID) of the transaction.

postedAtstring
Formatdate-time

Posted timestamp

UTC timestamp when the transaction was posted to the ledger, or null if pending.

The total number of statements returned

For FETCH this matches the size of rows, for FETCH_ONE 0 or 1, for STORE the count of stored records, and 0 for NONE.

Formaturi

URI of stored results

The URI of the file containing ION-formatted records in internal storage. Only populated when fetchType is STORE.