@mbanq/core-sdk-js / commands / ListClientDocument
Function: ListClientDocument()
ListClientDocument(
data):Command<{data: {clientId:number;fields?:string;unmaskValue?:boolean; }; },objectOutputType<{clientId:ZodNumber;description:ZodOptional<ZodString>;documentKey:ZodUnion<[ZodString,ZodNumber]>;documentStatus:ZodOptional<ZodString>;documentType:ZodObject<{id:ZodNumber;isMasked:ZodOptional<ZodBoolean>;name:ZodString; },"strip",ZodTypeAny, {id:number;isMasked?:boolean;name:string; }, {id:number;isMasked?:boolean;name:string; }>;expiryDate:ZodOptional<ZodUnion<[ZodString,ZodArray<ZodNumber,"many">]>>;id:ZodNumber;issuedBy:ZodOptional<ZodString>;issuedDate:ZodOptional<ZodString>;nationality:ZodOptional<ZodObject<{id:ZodNumber;name:ZodString; },"strip",ZodTypeAny, {id:number;name:string; }, {id:number;name:string; }>>;status:ZodString; },ZodAny,"strip">[]>
Defined in: src/commands/rest/clientIdentifier.ts:74
List client documents (identifiers)
Retrieves a list of all identity documents associated with a specific client. Optionally unmask sensitive values and filter by specific fields.
Parameters
data
clientId
number = ...
The unique identifier of the client
fields?
string = ...
Comma-separated list of fields to include in the response
unmaskValue?
boolean = ...
Whether to unmask sensitive values in the response
Returns
Command<{ data: { clientId: number; fields?: string; unmaskValue?: boolean; }; }, objectOutputType<{ clientId: ZodNumber; description: ZodOptional<ZodString>; documentKey: ZodUnion<[ZodString, ZodNumber]>; documentStatus: ZodOptional<ZodString>; documentType: ZodObject<{ id: ZodNumber; isMasked: ZodOptional<ZodBoolean>; name: ZodString; }, "strip", ZodTypeAny, { id: number; isMasked?: boolean; name: string; }, { id: number; isMasked?: boolean; name: string; }>; expiryDate: ZodOptional<ZodUnion<[ZodString, ZodArray<ZodNumber, "many">]>>; id: ZodNumber; issuedBy: ZodOptional<ZodString>; issuedDate: ZodOptional<ZodString>; nationality: ZodOptional<ZodObject<{ id: ZodNumber; name: ZodString; }, "strip", ZodTypeAny, { id: number; name: string; }, { id: number; name: string; }>>; status: ZodString; }, ZodAny, "strip">[]>
Command object that executes the API request and returns client documents
Example
// Get all client documents
const command = ListClientDocument({ clientId: 123 });
const documents = await client.request(command);
// Get documents with unmasked values
const unmaskedCommand = ListClientDocument({
clientId: 123,
unmaskValue: true
});
const unmaskedDocs = await client.request(unmaskedCommand);