← Return to credit workspace
STANDALONE MODULE / EVALUATION CONTRACT

Credit File Assembly API

Local case storage, document extraction, assembly checks and officer review. No KYC deployment, bank connection or language model is required.

Download OpenAPI specification ↓

Evaluation boundary

Use fictional data only. Bound to loopback with matching Host and Origin validation. There is no institutional authentication, encryption at rest, tenant isolation or verified reviewer identity. This is not a production bank endpoint. Case details, extracted text and original files persist in local SQLite.

API calls

MethodPathPurpose
GET/api/configModule configuration; no KYC dependency
GET/api/casesList locally stored cases
POST/api/casesCreate an independent credit case
POST/api/sampleLoad fictional sample evidence
GET/api/cases/{caseId}Retrieve case, evidence metadata and history
POST/api/cases/{caseId}/detailsSave officer-verified borrower and financial inputs
POST/api/cases/{caseId}/configConfigure case evidence requirements; KYC reference is optional
POST/api/cases/{caseId}/kyc-referenceAttach an officer-entered reference; not authenticated approval
POST/api/cases/{caseId}/documentsUpload and locally extract evidence
POST/api/cases/{caseId}/documents/{documentId}Confirm document review/reconciliation, or remove evidence
GET/api/cases/{caseId}/documents/{documentId}Download original evidence bytes
POST/api/cases/{caseId}/processCompute deterministic checks, clear prior review and model draft
POST/api/cases/{caseId}/reviewRecord human disposition; acceptance blocked by findings
POST/api/cases/{caseId}/advisoryExplicit optional loopback model draft; no change to checks or approval
GET/api/cases/{caseId}/memoDownload printable HTML memorandum
GET/api/cases/{caseId}/exportDownload ZIP of memorandum, record and original evidence

Request sequence

  1. Create a case with an empty JSON object.
  2. Upload documents to their node, then verify extracted inputs and document review.
  3. Include the current integer version in every case mutation. A stale version returns409; reload rather than blindly retrying.
  4. Run checks and inspect findings/cited illustrative sources.
  5. Record a disposition. Acceptance is rejected while blocking findings remain.
  6. Export the evidence ZIP. Any input/evidence/settings change clears the prior assessment/review.

Uploads & extraction

Base64 JSON uploads:10MB per file,50MB and30 documents per case. Text PDF extraction uses pypdf, with a30-page limit. Optional Apple Vision image/scanned-PDF extraction is local to this Mac (10 scanned PDF pages). Source page references accompany labelled-field suggestions. Reviewing/correcting extraction does not verify document authenticity.

Optional integrations

KYC is disabled by default. Enabling a KYC reference accepts only an officer-entered source and case ID; it does not call a KYC API or trust an external approval. An optional loopback Ollama adapter sends only check facts and illustrative source texts. No bank identifiers or raw documents enter that prompt. A model cannot clear findings, record a review or approve a facility.

Rules and calculations

The four ASSEMBLY source records are illustrative file-assembly requirements, not a regulatory corpus or bank-approved lending policy. Ratios use Decimal arithmetic; missing/non-positive denominators return unavailable. No automatic credit threshold is invented. Accepting a file does not sanction credit or write a facility to core banking.

Modularity

Domain, extraction, store, optional adapters and export are separate Python modules. Each is owned by the credit assembler. Removing or stopping the KYC application does not affect this module.

Tool-selecting evidence agent

Select Run evidence agent in the workspace. Private Qwen chooses evidence inspection, deterministic checks and reference retrieval tools. Execution is asynchronous, with real tool events and a cited advisory draft. Human approval remains separate; the agent has no customer, account or credit authorisation tools.

Use fictional data. Public deployments require the same session cookie when polling. Credit requests require the current case version. KYC accepts only a minimised evidence summary. Illustrative references do not establish regulatory compliance.