Campaign & Tenant Isolation
Initializes isolated apurement campaigns with PostgreSQL row-level security and an append-only cryptographic hash chain in audit.event_log.
An API-driven document extraction, linear-programming matching and regulatory dossier generation service supporting cross-border trade and customs control under BCEAO Regulation R09/CM/UEMOA.
Initializes isolated apurement campaigns with PostgreSQL row-level security and an append-only cryptographic hash chain in audit.event_log.
Extracts structured fields from GUCE customs declarations, commercial invoices, packing lists, transport bills of lading and bank SWIFT/transfer proofs.
Solves invoice-to-bank settlement allocation and currency/tolerance checks via Mixed-Integer Linear Programming (PuLP / HiGHS) and deterministic fuzzy matching.
Routes low-confidence extractions or multi-currency variances to token-verified human review workflows orchestrated via n8n.
Generates multi-sheet Excel reconciliation workbooks and PDF apurement certificates via Gotenberg for regulatory submission.
In production mode, interactive OpenAPI/Swagger browsers are disabled and all /api/v1/* endpoints require a valid X-API-Key header.
| Method & Route | Authentication | Operational Function |
|---|---|---|
GET /healthz |
Public | Liveness probe confirming worker process responsiveness. |
GET /readyz |
Public | Readiness probe verifying PostgreSQL connectivity and schema readiness. |
POST /api/v1/campaigns |
X-API-Key |
Create and configure a new customs/FX apurement campaign. |
POST /api/v1/ingest/* |
X-API-Key |
Ingest and classify customs declarations, invoices and bank transfer proofs. |
POST /api/v1/reconcile/* |
X-API-Key |
Execute deterministic + MILP reconciliation across ingested campaign documents. |
POST /api/v1/hitl/* |
X-API-Key / Signed Token |
Record human-in-the-loop review decisions and overrides. |
POST /api/v1/deliverables/* |
X-API-Key |
Generate audit-ready Excel workbooks and PDF regulatory dossiers. |