Retrieve Documents List
Retrieves a paginated list of all documents across all entity types.
Command Name
RetrieveDocumentsListQuery
Endpoint
POST /api/core/cmd
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
entityType | string | No | Filter by entity type: "Client", "Loan", "Deposit", "Policy" |
entityId | long | No | Filter by specific entity ID |
startDate | string | No | Filter by upload date start (YYYY-MM-DD) |
endDate | string | No | Filter by upload date end (YYYY-MM-DD) |
searchText | string | No | Search in file names, titles, descriptions |
documentType | integer | No | Filter by document type |
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": "RetrieveDocumentsListQuery",
"Data": {
"entityType": "Client",
"startDate": "2024-01-01",
"endDate": "2024-01-31",
"searchText": "passport",
"pageNumber": 1,
"pageSize": 50
}
}
Response Structure
{
"IsSuccessful": true,
"StatusCode": "00",
"Message": "Documents retrieved successfully.",
"Data": {
"items": [
{
"Id": 789,
"EntityType": "Client",
"EntityId": 12345,
"EntityReference": "CL-000123",
"FileName": "passport.pdf",
"FilePath": "documents/clients/12345/passport_3fa85f64.pdf",
"FileExtension": ".pdf",
"Title": "International Passport",
"Description": "Valid passport for KYC verification",
"DocumentNumber": "A12345678",
"DocumentType": 2,
"DocumentTypeDescription": "Passport",
"IssueDate": "2020-01-15",
"ExpiryDate": "2030-01-14",
"UploadedAt": "2024-01-20T14:30:00",
"UploadedBy": "admin@banklingo.com",
"FileSize": "245760",
"IsExpired": false
}
],
"totalRows": 125,
"totalPages": 3,
"pageSize": 50,
"currentPage": 1
},
"HasNext": true,
"HasPrevious": false
}
Use Case Example
Retrieve all expired documents requiring renewal:
{
"Cmd": "RetrieveDocumentsListQuery",
"Data": {
"endDate": "2024-01-20",
"documentType": 1,
"isExport": true
}
}