Statements Download

Statements Download

Certified

Download Mercury statement PDF

Download an official statement PDF for a Mercury depository bank account directly to internal storage.

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

Download a statement PDF to internal storage

yaml
id: download_statement_pdf
namespace: company.team

tasks:
  - id: download_statement
    type: io.kestra.plugin.mercury.statements.Download
    apiToken: "{{ secret('MERCURY_API_TOKEN') }}"
    statementId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

List and download statements for an account

yaml
id: list_and_download_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

  - id: download_statements
    type: io.kestra.plugin.core.flow.ForEach
    values: "{{ outputs.list_statements.rows }}"
    tasks:
      - id: download_item
        type: io.kestra.plugin.mercury.statements.Download
        apiToken: "{{ secret('MERCURY_API_TOKEN') }}"
        statementId: "{{ fromJson(taskrun.value).id }}"
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

Mercury API token

API token for authentication with the Mercury API.

Statement ID

The unique identifier (UUID) of the statement to download.

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.

File name

The sanitized metadata file name derived from the Content-Disposition header, ending with .pdf.

File size

The size of the downloaded statement PDF file in bytes.

Formaturi

Internal storage URI

The URI of the downloaded PDF file stored in Kestra internal storage.