Document Handling
Document types
| Type | Notes |
|---|---|
PASSPORT | Customer passport scan |
RESIDENCE_PERMIT | Issued permit document |
WORK_PERMIT | Issued work permit |
INSURANCE_POLICY | Policy document |
TAPU | Title deed |
BIOMETRIC | Biometric photo |
BANK_STATEMENT | Financial proof |
RENTAL_CONTRACT | Accommodation proof |
TAX_CERTIFICATE | Tax number or declaration |
DIPLOMA | Qualification certificate |
CRIMINAL_RECORD | Background check |
POWER_OF_ATTORNEY | POA document |
DASK | Earthquake insurance certificate |
OTHER | Catch-all for miscellaneous |
Document statuses
| Status | Meaning |
|---|---|
PENDING | Uploaded, awaiting review |
VERIFIED | Reviewed and accepted by staff |
REJECTED | Rejected — reason recorded in notes |
EXPIRED | Document has passed its validity date |
Upload flow
- Customer uploads document via
app-web(customer portal) - Document record created in DB with status
PENDING - File stored in secure storage (Cloudflare R2)
DOCUMENT_UPLOADEDtimeline event written- Task created for assigned agent to review
Staff review
Staff review documents from the customer workspace documents tab:
- View the document (PDF / image)
- Mark as
VERIFIEDorREJECTEDwith a note - Rejected documents trigger a
DOCUMENT_REJECTEDtimeline event and a customer notification
Expiry tracking
Documents with a validity period (expires_at) are monitored. The system flags documents approaching expiry:
- Passports expiring within 6 months
- Permits within 90 days
- Insurance policies within 60 days
Expired documents are automatically flagged with status EXPIRED by the nightly renewal refresh job.
Storage
Documents are stored in Cloudflare R2 (object storage):
- Access via signed URLs with short expiry (1 hour)
- Never expose direct storage URLs — always generate signed URLs on request
- Files are organized by
customer_id / document_type / filename
Document requirements by workflow
| Workflow | Key documents |
|---|---|
| Residence permit | Passport, biometric photos, rental contract / tapu, health insurance, bank statement |
| Work permit | Passport, diploma, employment contract, employer docs |
| Insurance (travel health) | Passport only |
| Citizenship by investment | Passport, tapu, valuation report, SWIFT transfer proof, criminal record, birth certificate |
| Turquoise Card | Passport, qualification proof, criminal record, financial proof |
Rejected document protocol
When a document is rejected:
- Select
REJECTEDstatus on the document - Add a clear rejection reason in the notes field
- The system writes a
DOCUMENT_REJECTEDtimeline event - Notify the customer via WhatsApp with specific instructions for resubmission
- Create a follow-up task to check for resubmission within 3 business days