Skip to content

@mbanq/core-sdk-js v0.50.0


@mbanq/core-sdk-js / commands / DownloadAccountStatement

Function: DownloadAccountStatement() ​

DownloadAccountStatement(params): Command<{ params: { documentId: string; savingsAccountId: number; }; }, { contentType?: string; data: Blob; fileName?: string; }>

Defined in: src/commands/rest/accountStatement.ts:93

Downloads a document associated with a specific savings account. This API returns a binary file as a raw byte stream.

Parameters ​

params ​

The path parameters

documentId ​

string = ...

The UUID of the document to download

savingsAccountId ​

number = ...

The ID of the savings account

Returns ​

Command<{ params: { documentId: string; savingsAccountId: number; }; }, { contentType?: string; data: Blob; fileName?: string; }>

A Command that when executed returns the document as a Blob with metadata

Example ​

typescript
const downloadCmd = DownloadAccountStatement({
  savingsAccountId: 12,
  documentId: "45ac4379-7185-471b-a103-916d25dc648d"
});
const result = await downloadCmd.execute(config);
// result.data is a Blob containing the file
// result.fileName contains the extracted filename (if available)
// result.contentType contains the MIME type (if available)

Released under the MIT License.