
Statements Download
CertifiedDownload Mercury statement PDF
Statements Download
Download Mercury statement PDF
Download an official statement PDF for a Mercury depository bank account directly to internal storage.
type: io.kestra.plugin.mercury.statements.DownloadExamples
Download a statement PDF to internal storage
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
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
apiToken *string
Mercury API token
API token for authentication with the Mercury API.
statementId *string
Statement ID
The unique identifier (UUID) of the statement to download.
assets
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.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset 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.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150baseUrl string
https://api.mercury.com/api/v1Mercury 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.
Outputs
fileName string
File name
The sanitized metadata file name derived from the Content-Disposition header, ending with .pdf.
size integer
File size
The size of the downloaded statement PDF file in bytes.
uri string
uriInternal storage URI
The URI of the downloaded PDF file stored in Kestra internal storage.