Skip to main content

Documents Overview

The Documents API enables uploading, storing, and retrieving documents attached to various banking entities such as clients, loans, deposits, and insurance policies. Files are stored in MinIO object storage with metadata tracked in the database.

Base Endpoint

POST /api/core/cmd

Available Commands

Commands

Queries

Key Features

  • Multi-Entity Support: Attach documents to clients, loans, deposits, and policies
  • MinIO Storage: Scalable, secure object storage backend
  • Metadata Tracking: Track document types, expiry dates, and upload history
  • File Organization: Automatic organization by entity type and ID
  • Base64 Encoding: Simple file upload via base64-encoded content
  • Search & Filter: Find documents by entity, date, type, or content

Document Types (Examples)

ValueDescription
1National ID
2Passport
3Driver's License
4Utility Bill
5Bank Statement
6Contract
7Other

Storage Architecture

File Organization

documents/
├── clients/{clientId}/
├── loans/{loanId}/
├── deposits/{depositId}/
└── policies/{policyId}/

Supported File Types

CategoryExtensionsMax Size
DocumentsPDF, DOC, DOCX10 MB
ImagesPNG, JPG, JPEG, GIF5 MB
SpreadsheetsXLS, XLSX, CSV10 MB
ArchivesZIP, RAR20 MB

Best Practices

  1. Standardize File Names: Use clear, consistent naming conventions
  2. Add Descriptions: Include meaningful descriptions for easy identification
  3. Set Expiry Dates: Always set expiry dates for time-sensitive documents
  4. Document Type Consistency: Use standardized document types
  5. Regular Audits: Periodically review and purge obsolete documents
  6. Optimize File Sizes: Compress large files before upload
  7. Batch Operations: Use export functionality for bulk retrieval