@mbanq/core-sdk-js / commands / GetAccountDocumentsDetails
Function: GetAccountDocumentsDetails()
GetAccountDocumentsDetails(
savingsAccountId,data?):Command<{data?: {createdAtFrom?:string;createdAtTo?:string;name?:string;type?:"statement"|"receipt"|"report"|"passport"; };savingsAccountId:number; },object[]>
Defined in: src/commands/rest/accountStatement.ts:164
Retrieves the details of all documents linked to a savings account.
Parameters
savingsAccountId
number
The ID of the savings account
data?
Optional query parameters for filtering documents
createdAtFrom?
string = ...
Filter documents created from this date (e.g., "2023-01-01+00:00:00")
createdAtTo?
string = ...
Filter documents created up to this date (e.g., "2023-12-31+23:59:00")
name?
string = ...
Name of the document (e.g., "January 01st - July 17st")
type?
"statement" | "receipt" | "report" | "passport" = ...
Filter documents by type (statement, receipt, report, passport)
Returns
Command<{ data?: { createdAtFrom?: string; createdAtTo?: string; name?: string; type?: "statement" | "receipt" | "report" | "passport"; }; savingsAccountId: number; }, object[]>
A Command that when executed returns a list of document details
Example
const getDocsCmd = GetAccountDocumentsDetails(
123,
{ type: "statement", createdAtFrom: "2023-01-01+00:00:00" }
);
const result = await getDocsCmd.execute(config);
result.forEach(doc => console.log(doc.name));