Retrieve Client Comments
Retrieves all comments for a specific client.
Command Name
RetrieveClientCommentListQuery
Endpoint
POST /api/core/cmd
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
clientId | long | Yes | Client ID |
pageNumber | integer | No | Page number (default: 1) |
pageSize | integer | No | Items per page (default: 20) |
isExport | boolean | No | Export all results (default: false) |
Request Example
{
"Cmd": "RetrieveClientCommentListQuery",
"Data": {
"clientId": 12345,
"pageNumber": 1,
"pageSize": 50
}
}
Alternative: Use RetrieveCommentsListQuery
You can also use the generic command:
{
"Cmd": "RetrieveCommentsListQuery",
"Data": {
"entity": "Client",
"entityId": 12345,
"pageSize": 50
}
}
Response Structure
{
"IsSuccessful": true,
"StatusCode": "00",
"Message": "15/15 records returned.",
"Data": {
"items": [
{
"Id": 1001,
"ClientId": 12345,
"Comment": "Customer expressed interest in savings products.",
"ClientName": "John Doe",
"ClientEndodedKey": "CLIENT-12345",
"ClientCode": "CL-000123",
"AssociatedEntity": "Client",
"AssociatedEntityId": 12345,
"AssociatedEntityNumber": "CL-000123",
"DateCreated": "2025-12-15T10:30:00Z",
"UserName": "jane.doe@banklingo.com"
}
],
"PageNumber": 1,
"PageSize": 15,
"TotalPages": 1,
"TotalRecords": 15
}
}
Code Example
async function getClientComments(clientId: number, pageSize: number = 20) {
const response = await fetch('/api/core/cmd', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({
Cmd: 'RetrieveClientCommentListQuery',
Data: { clientId, pageSize }
})
});
return await response.json();
}
// Usage
const comments = await getClientComments(12345, 50);
Related Commands
- Add Comment - Add a comment to a client
- Retrieve Comments List - Generic comment query with more filters