Skip to content

@mbanq/core-sdk-js v0.50.0


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

Function: GetClient()

GetClient(clientId, data?): Command<{ clientId: number; data?: { checkIdentitiesExpiration?: boolean; clientAccountAssociate?: boolean; clientAddress?: boolean; clientIdentifier?: boolean; riskRating?: boolean; staffInSelectedOfficeOnly?: boolean; }; }, { clientAddressData?: objectOutputType<{ city: ZodString; state: ZodString; street: ZodString; zipCode: ZodString; }, ZodAny, "strip">; clientData?: objectOutputType<{ accountNo: ZodString; activationDate: ZodOptional<ZodArray<ZodNumber, "many">>; active: ZodBoolean; activeDepositAccount: ZodNumber; authorizations: ZodOptional<ZodArray<ZodNumber, "many">>; clientClassification: ZodObject<{ id: ZodNumber; name: ZodOptional<ZodString>; }, "strip", ZodTypeAny, { id: number; name?: string; }, { id: number; name?: string; }>; clientKycStatus: ZodObject<{ }, "strip", ZodAny, objectOutputType<{ }, ZodAny, "strip">, objectInputType<{ }, ZodAny, "strip">>; clientNonPersonDetails: ZodObject<{ constitution: ZodObject<{ }, "strip", ZodAny, objectOutputType<{ }, ZodAny, "strip">, objectInputType<{ }, ZodAny, "strip">>; countryOfIncorporation: ZodObject<{ }, "strip", ZodAny, objectOutputType<{ }, ZodAny, "strip">, objectInputType<{ }, ZodAny, "strip">>; mainBusinessLine: ZodObject<{ }, "strip", ZodAny, objectOutputType<{ }, ZodAny, "strip">, objectInputType<{ }, ZodAny, "strip">>; }, "strip", ZodAny, objectOutputType<{ constitution: ZodObject<{ }, "strip", ZodAny, objectOutputType<{ }, ZodAny, "strip">, objectInputType<{ }, ZodAny, "strip">>; countryOfIncorporation: ZodObject<{ }, "strip", ZodAny, objectOutputType<{ }, ZodAny, "strip">, objectInputType<{ }, ZodAny, "strip">>; mainBusinessLine: ZodObject<{ }, "strip", ZodAny, objectOutputType<{ }, ZodAny, "strip">, objectInputType<{ }, ZodAny, "strip">>; }, ZodAny, "strip">, objectInputType<{ constitution: ZodObject<{ }, "strip", ZodAny, objectOutputType<{ }, ZodAny, "strip">, objectInputType<{ }, ZodAny, "strip">>; countryOfIncorporation: ZodObject<{ }, "strip", ZodAny, objectOutputType<{ }, ZodAny, "strip">, objectInputType<{ }, ZodAny, "strip">>; mainBusinessLine: ZodObject<{ }, "strip", ZodAny, objectOutputType<{ }, ZodAny, "strip">, objectInputType<{ }, ZodAny, "strip">>; }, ZodAny, "strip">>; clientTransferOptionData: ZodObject<{ id: ZodNumber; isAchCreditIncomingDisable: ZodBoolean; isAchCreditOutgoingDisable: ZodBoolean; isAchDebitIncomingDisable: ZodBoolean; isAchDebitOutgoingDisable: ZodBoolean; isAllocateToSubAccountDisable: ZodBoolean; isExternalCardCreditDisable: ZodBoolean; isExternalCardDebitDisable: ZodBoolean; isFxpayCreditOutgoingDisable: ZodBoolean; isInternalCreditDisable: ZodBoolean; isInternalCreditOwnDisable: ZodBoolean; isInternalDebitDisable: ZodBoolean; isSwiftCreditIncomingDisable: ZodBoolean; isSwiftCreditOutgoingDisable: ZodBoolean; isWireCreditIncomingDisable: ZodBoolean; isWireCreditOutgoingDisable: ZodBoolean; resourceId: ZodNumber; type: ZodString; }, "strip", ZodAny, objectOutputType<{ id: ZodNumber; isAchCreditIncomingDisable: ZodBoolean; isAchCreditOutgoingDisable: ZodBoolean; isAchDebitIncomingDisable: ZodBoolean; isAchDebitOutgoingDisable: ZodBoolean; isAllocateToSubAccountDisable: ZodBoolean; isExternalCardCreditDisable: ZodBoolean; isExternalCardDebitDisable: ZodBoolean; isFxpayCreditOutgoingDisable: ZodBoolean; isInternalCreditDisable: ZodBoolean; isInternalCreditOwnDisable: ZodBoolean; isInternalDebitDisable: ZodBoolean; isSwiftCreditIncomingDisable: ZodBoolean; isSwiftCreditOutgoingDisable: ZodBoolean; isWireCreditIncomingDisable: ZodBoolean; isWireCreditOutgoingDisable: ZodBoolean; resourceId: ZodNumber; type: ZodString; }, ZodAny, "strip">, objectInputType<{ id: ZodNumber; isAchCreditIncomingDisable: ZodBoolean; isAchCreditOutgoingDisable: ZodBoolean; isAchDebitIncomingDisable: ZodBoolean; isAchDebitOutgoingDisable: ZodBoolean; isAllocateToSubAccountDisable: ZodBoolean; isExternalCardCreditDisable: ZodBoolean; isExternalCardDebitDisable: ZodBoolean; isFxpayCreditOutgoingDisable: ZodBoolean; isInternalCreditDisable: ZodBoolean; isInternalCreditOwnDisable: ZodBoolean; isInternalDebitDisable: ZodBoolean; isSwiftCreditIncomingDisable: ZodBoolean; isSwiftCreditOutgoingDisable: ZodBoolean; isWireCreditIncomingDisable: ZodBoolean; isWireCreditOutgoingDisable: ZodBoolean; resourceId: ZodNumber; type: ZodString; }, ZodAny, "strip">>; clientTypes: ZodArray<ZodAny, "many">; clientVerificationStatus: ZodString; dateOfBirth: ZodArray<ZodNumber, "many">; displayName: ZodString; emailAddress: ZodString; firstname: ZodString; gender: ZodObject<{ id: ZodNumber; }, "strip", ZodTypeAny, { id: number; }, { id: number; }>; id: ZodNumber; imageId: ZodOptional<ZodString>; imagePresent: ZodOptional<ZodBoolean>; isBlockExternalCardsAddition: ZodBoolean; isStaff: ZodBoolean; lastname: ZodString; legalForm: ZodObject<{ code: ZodString; id: ZodNumber; value: ZodString; }, "strip", ZodTypeAny, { code: string; id: number; value: string; }, { code: string; id: number; value: string; }>; mobileCountryCode: ZodString; mobileNo: ZodString; occupation: ZodObject<{ active: ZodBoolean; }, "strip", ZodTypeAny, { active: boolean; }, { active: boolean; }>; officeId: ZodNumber; officeName: ZodString; ofLoanActive: ZodNumber; ofLoanCycle: ZodNumber; onBoardingStatus: ZodOptional<ZodString>; skipAvs: ZodBoolean; status: ZodObject<{ code: ZodString; id: ZodNumber; value: ZodString; }, "strip", ZodTypeAny, { code: string; id: number; value: string; }, { code: string; id: number; value: string; }>; subStatus: ZodObject<{ active: ZodBoolean; mandatory: ZodBoolean; systemDefined: ZodBoolean; }, "strip", ZodTypeAny, { active: boolean; mandatory: boolean; systemDefined: boolean; }, { active: boolean; mandatory: boolean; systemDefined: boolean; }>; timeline: ZodObject<{ activatedByFirstname: ZodOptional<ZodString>; activatedByLastname: ZodOptional<ZodString>; activatedByUsername: ZodOptional<ZodString>; activatedOnDate: ZodOptional<ZodArray<ZodNumber, "many">>; submittedByFirstname: ZodOptional<ZodString>; submittedByLastname: ZodOptional<ZodString>; submittedByUsername: ZodOptional<ZodString>; submittedOnDate: ZodArray<ZodNumber, "many">; }, "strip", ZodTypeAny, { activatedByFirstname?: string; activatedByLastname?: string; activatedByUsername?: string; activatedOnDate?: number[]; submittedByFirstname?: string; submittedByLastname?: string; submittedByUsername?: string; submittedOnDate: number[]; }, { activatedByFirstname?: string; activatedByLastname?: string; activatedByUsername?: string; activatedOnDate?: number[]; submittedByFirstname?: string; submittedByLastname?: string; submittedByUsername?: string; submittedOnDate: number[]; }>; updatedAt: ZodString; }, ZodAny, "strip">; clientIdentifierData?: objectOutputType<{ type: ZodString; value: ZodString; }, ZodAny, "strip">; riskRatingData?: objectOutputType<{ rating: ZodString; riskScore: ZodNumber; }, ZodAny, "strip">; }>

Defined in: src/commands/rest/client.ts:55

Get client details with optional related data

Retrieves comprehensive client information including basic client data and optionally risk rating, addresses, and identifiers. This function can fetch multiple related resources in a single call based on the provided parameters.

Parameters

clientId

number

The unique identifier of the client

data?

Optional query parameters

checkIdentitiesExpiration?

boolean = ...

Check if identities are expired

clientAccountAssociate?

boolean = ...

Include client account associations

clientAddress?

boolean = ...

Include client address data

clientIdentifier?

boolean = ...

Include client identifier data

riskRating?

boolean = ...

Include risk rating data

staffInSelectedOfficeOnly?

boolean = ...

Filter by staff in selected office only

Returns

Command<{ clientId: number; data?: { checkIdentitiesExpiration?: boolean; clientAccountAssociate?: boolean; clientAddress?: boolean; clientIdentifier?: boolean; riskRating?: boolean; staffInSelectedOfficeOnly?: boolean; }; }, { clientAddressData?: objectOutputType<{ city: ZodString; state: ZodString; street: ZodString; zipCode: ZodString; }, ZodAny, "strip">; clientData?: objectOutputType<{ accountNo: ZodString; activationDate: ZodOptional<ZodArray<ZodNumber, "many">>; active: ZodBoolean; activeDepositAccount: ZodNumber; authorizations: ZodOptional<ZodArray<ZodNumber, "many">>; clientClassification: ZodObject<{ id: ZodNumber; name: ZodOptional<ZodString>; }, "strip", ZodTypeAny, { id: number; name?: string; }, { id: number; name?: string; }>; clientKycStatus: ZodObject<{ }, "strip", ZodAny, objectOutputType<{ }, ZodAny, "strip">, objectInputType<{ }, ZodAny, "strip">>; clientNonPersonDetails: ZodObject<{ constitution: ZodObject<{ }, "strip", ZodAny, objectOutputType<{ }, ZodAny, "strip">, objectInputType<{ }, ZodAny, "strip">>; countryOfIncorporation: ZodObject<{ }, "strip", ZodAny, objectOutputType<{ }, ZodAny, "strip">, objectInputType<{ }, ZodAny, "strip">>; mainBusinessLine: ZodObject<{ }, "strip", ZodAny, objectOutputType<{ }, ZodAny, "strip">, objectInputType<{ }, ZodAny, "strip">>; }, "strip", ZodAny, objectOutputType<{ constitution: ZodObject<{ }, "strip", ZodAny, objectOutputType<{ }, ZodAny, "strip">, objectInputType<{ }, ZodAny, "strip">>; countryOfIncorporation: ZodObject<{ }, "strip", ZodAny, objectOutputType<{ }, ZodAny, "strip">, objectInputType<{ }, ZodAny, "strip">>; mainBusinessLine: ZodObject<{ }, "strip", ZodAny, objectOutputType<{ }, ZodAny, "strip">, objectInputType<{ }, ZodAny, "strip">>; }, ZodAny, "strip">, objectInputType<{ constitution: ZodObject<{ }, "strip", ZodAny, objectOutputType<{ }, ZodAny, "strip">, objectInputType<{ }, ZodAny, "strip">>; countryOfIncorporation: ZodObject<{ }, "strip", ZodAny, objectOutputType<{ }, ZodAny, "strip">, objectInputType<{ }, ZodAny, "strip">>; mainBusinessLine: ZodObject<{ }, "strip", ZodAny, objectOutputType<{ }, ZodAny, "strip">, objectInputType<{ }, ZodAny, "strip">>; }, ZodAny, "strip">>; clientTransferOptionData: ZodObject<{ id: ZodNumber; isAchCreditIncomingDisable: ZodBoolean; isAchCreditOutgoingDisable: ZodBoolean; isAchDebitIncomingDisable: ZodBoolean; isAchDebitOutgoingDisable: ZodBoolean; isAllocateToSubAccountDisable: ZodBoolean; isExternalCardCreditDisable: ZodBoolean; isExternalCardDebitDisable: ZodBoolean; isFxpayCreditOutgoingDisable: ZodBoolean; isInternalCreditDisable: ZodBoolean; isInternalCreditOwnDisable: ZodBoolean; isInternalDebitDisable: ZodBoolean; isSwiftCreditIncomingDisable: ZodBoolean; isSwiftCreditOutgoingDisable: ZodBoolean; isWireCreditIncomingDisable: ZodBoolean; isWireCreditOutgoingDisable: ZodBoolean; resourceId: ZodNumber; type: ZodString; }, "strip", ZodAny, objectOutputType<{ id: ZodNumber; isAchCreditIncomingDisable: ZodBoolean; isAchCreditOutgoingDisable: ZodBoolean; isAchDebitIncomingDisable: ZodBoolean; isAchDebitOutgoingDisable: ZodBoolean; isAllocateToSubAccountDisable: ZodBoolean; isExternalCardCreditDisable: ZodBoolean; isExternalCardDebitDisable: ZodBoolean; isFxpayCreditOutgoingDisable: ZodBoolean; isInternalCreditDisable: ZodBoolean; isInternalCreditOwnDisable: ZodBoolean; isInternalDebitDisable: ZodBoolean; isSwiftCreditIncomingDisable: ZodBoolean; isSwiftCreditOutgoingDisable: ZodBoolean; isWireCreditIncomingDisable: ZodBoolean; isWireCreditOutgoingDisable: ZodBoolean; resourceId: ZodNumber; type: ZodString; }, ZodAny, "strip">, objectInputType<{ id: ZodNumber; isAchCreditIncomingDisable: ZodBoolean; isAchCreditOutgoingDisable: ZodBoolean; isAchDebitIncomingDisable: ZodBoolean; isAchDebitOutgoingDisable: ZodBoolean; isAllocateToSubAccountDisable: ZodBoolean; isExternalCardCreditDisable: ZodBoolean; isExternalCardDebitDisable: ZodBoolean; isFxpayCreditOutgoingDisable: ZodBoolean; isInternalCreditDisable: ZodBoolean; isInternalCreditOwnDisable: ZodBoolean; isInternalDebitDisable: ZodBoolean; isSwiftCreditIncomingDisable: ZodBoolean; isSwiftCreditOutgoingDisable: ZodBoolean; isWireCreditIncomingDisable: ZodBoolean; isWireCreditOutgoingDisable: ZodBoolean; resourceId: ZodNumber; type: ZodString; }, ZodAny, "strip">>; clientTypes: ZodArray<ZodAny, "many">; clientVerificationStatus: ZodString; dateOfBirth: ZodArray<ZodNumber, "many">; displayName: ZodString; emailAddress: ZodString; firstname: ZodString; gender: ZodObject<{ id: ZodNumber; }, "strip", ZodTypeAny, { id: number; }, { id: number; }>; id: ZodNumber; imageId: ZodOptional<ZodString>; imagePresent: ZodOptional<ZodBoolean>; isBlockExternalCardsAddition: ZodBoolean; isStaff: ZodBoolean; lastname: ZodString; legalForm: ZodObject<{ code: ZodString; id: ZodNumber; value: ZodString; }, "strip", ZodTypeAny, { code: string; id: number; value: string; }, { code: string; id: number; value: string; }>; mobileCountryCode: ZodString; mobileNo: ZodString; occupation: ZodObject<{ active: ZodBoolean; }, "strip", ZodTypeAny, { active: boolean; }, { active: boolean; }>; officeId: ZodNumber; officeName: ZodString; ofLoanActive: ZodNumber; ofLoanCycle: ZodNumber; onBoardingStatus: ZodOptional<ZodString>; skipAvs: ZodBoolean; status: ZodObject<{ code: ZodString; id: ZodNumber; value: ZodString; }, "strip", ZodTypeAny, { code: string; id: number; value: string; }, { code: string; id: number; value: string; }>; subStatus: ZodObject<{ active: ZodBoolean; mandatory: ZodBoolean; systemDefined: ZodBoolean; }, "strip", ZodTypeAny, { active: boolean; mandatory: boolean; systemDefined: boolean; }, { active: boolean; mandatory: boolean; systemDefined: boolean; }>; timeline: ZodObject<{ activatedByFirstname: ZodOptional<ZodString>; activatedByLastname: ZodOptional<ZodString>; activatedByUsername: ZodOptional<ZodString>; activatedOnDate: ZodOptional<ZodArray<ZodNumber, "many">>; submittedByFirstname: ZodOptional<ZodString>; submittedByLastname: ZodOptional<ZodString>; submittedByUsername: ZodOptional<ZodString>; submittedOnDate: ZodArray<ZodNumber, "many">; }, "strip", ZodTypeAny, { activatedByFirstname?: string; activatedByLastname?: string; activatedByUsername?: string; activatedOnDate?: number[]; submittedByFirstname?: string; submittedByLastname?: string; submittedByUsername?: string; submittedOnDate: number[]; }, { activatedByFirstname?: string; activatedByLastname?: string; activatedByUsername?: string; activatedOnDate?: number[]; submittedByFirstname?: string; submittedByLastname?: string; submittedByUsername?: string; submittedOnDate: number[]; }>; updatedAt: ZodString; }, ZodAny, "strip">; clientIdentifierData?: objectOutputType<{ type: ZodString; value: ZodString; }, ZodAny, "strip">; riskRatingData?: objectOutputType<{ rating: ZodString; riskScore: ZodNumber; }, ZodAny, "strip">; }>

Command object that executes the API request and returns client data

Example

typescript
// Get basic client data
const command = GetClient(123);
const client = await client.request(command);

// Get client with risk rating and addresses
const fullCommand = GetClient(123, {
  riskRating: true,
  clientAddress: true
});
const fullClient = await client.request(fullCommand);

Released under the MIT License.