@mbanq/core-sdk-js / commands / GetAccountsOfClient
Function: GetAccountsOfClient()
GetAccountsOfClient(
clientId,data?):Command<{clientId:number;data?: {showReservedAccount:boolean; }; }, {savingsAccounts:object[]; }>
Defined in: src/commands/rest/account.ts:152
Retrieves a list of accounts associated with a specific client.
Use this API to fetch the accounts of a particular client. Please ensure that the client is present in the system to receive the accounts associated with them.
Parameters
clientId
number
The ID of the client
data?
Optional query parameters
showReservedAccount
boolean = ...
Whether to include reserved account details (defaults to false)
Returns
Command<{ clientId: number; data?: { showReservedAccount: boolean; }; }, { savingsAccounts: object[]; }>
Command object for retrieving client accounts
Example
typescript
const command = GetAccountsOfClient(123, { showReservedAccount: true });
const result = await client.request(command);
console.log(result.savingsAccounts);