API-to-Process Cross-Reference
Purpose: Show which API endpoints are called by which business processes
Service Integration Map
aib-compliance Service
Endpoints: GET /clients, POST /sanctions-screen, POST /edd, GET /kyc-review, POST /kyc-review/{id}/approve
Used by:
- PROC-001 (KYC Onboarding): GET /clients → verify kyc_status, POST /kyc-review → approve/reject
- PROC-003 (Sanctions): POST /sanctions-screen (auto-triggered)
- PROC-006 (KYC Periodic Review): POST /kyc-review → re-review
- PROC-007 (PEP/EDD): POST /edd → initiate EDD
- PROC-002 (AML Investigation): POST /edd (escalate high-risk alert)
aib-aml Service
Endpoints: POST /alerts, POST /investigation-cases, POST /str-reports, POST /fiu-feedback
Used by:
- PROC-002 (AML Investigation): POST /alerts → create, POST /investigation-cases → open case, POST /str-reports → file STR, POST /fiu-feedback → record FIU response
aib-trading Service
Endpoints: POST /orders, PATCH /orders/{id}, POST /trades, POST /settlements, GET /positions, POST /best-execution-policy
Used by:
- PROC-004 (Order Pre-Trade Gate): POST /orders (4-check validation)
- PROC-005 (Trading→Settlement): POST /trades → execute, POST /settlements → schedule, PATCH /settlements → update status
- PROC-009 (Settlement Reconciliation): GET /settlements → daily matching, PATCH /settlements → mark matched or failed
- PROC-011 (Portal Statements): GET /positions → aggregate for QIR
aib-identity Service
Endpoints: GET /clients, POST /clients/{id}/contacts, POST /clients/{id}/authorized-signatories, POST /clients/{id}/dsr
Used by:
- PROC-001 (KYC Onboarding): GET /clients → lookup
- PROC-012 (Client Exit & Retention): Close account, trigger data purge after 10 years
- PROC-011 (Portal Statements): POST /contacts → email delivery
aib-operations Service
Endpoints: POST /payments, POST /payments/{id}/authorize, POST /nostro/{id}/reconciliation, POST /fee-invoices/{id}/charge
Used by:
- PROC-008 (Payment & Dual Auth): POST /payments → initiate, POST /payments/{id}/authorize (Officer 1 + Officer 2)
- PROC-009 (Settlement Reconciliation): POST /nostro/{id}/reconciliation → daily reconciliation
- PROC-011 (Portal Statements): POST /fee-invoices → charge fees
aib-reporting Service
Endpoints: POST /qir, POST /emir-trades, GET /fatca-reports, GET /crs-reports, POST /icaap-snapshot
Used by:
- PROC-011 (Portal Statements): POST /qir → generate + post to client portal
- PROC-005 (Trading→Settlement): POST /emir-trades (triggered by trade.executed event, T+1 deadline)
- End-of-year/half-year: GET /fatca-reports, GET /crs-reports (regulatory filing)
- ICAAP: POST /icaap-snapshot (annual, before 30 April submission)
aib-risk Service
Endpoints: POST /kri-readings, POST /rcsa-events, POST /credit-assessments, POST /credit-committee/{id}/decision
Used by:
- Daily operations: POST /kri-readings (before 9am, escalate if red)
- Quarterly: POST /rcsa-events (self-assessment)
- PROC-008 (Payments): POST /credit-assessments → credit limit check
- Credit granting: POST /credit-committee → decision
aib-audit Service
Endpoints: GET /audit-log
Used by:
- All PROCs (implicit): Every mutation triggers audit log entry
- Compliance investigations: GET /audit-log (query by table, date range, actor)
- FMA inspection: GET /audit-log/str/{id}/tipped-off-checks (verify immutability)
Process Integration Matrix
| PROC | Primary API | Secondary APIs | Event Trigger | SLA |
|---|---|---|---|---|
| PROC-001 (KYC) | aib-compliance | aib-identity | client.created | 2–5 days |
| PROC-002 (AML) | aib-aml | aib-compliance | bank_transaction.created | Real-time screen, 5-day STR |
| PROC-003 (Sanctions) | aib-compliance | aib-aml | client.created or manual | Immediate freeze, 48h FIU |
| PROC-004 (Pre-Trade) | aib-trading | None | order submission | 50ms gate |
| PROC-005 (Trading) | aib-trading | aib-reporting | trade.executed | T+2 settlement |
| PROC-006 (KYC Review) | aib-compliance | None | 2–3yr anniversary | 30-day response |
| PROC-007 (PEP/EDD) | aib-compliance | None | pep_record.created | 10-day decision |
| PROC-008 (Payment) | aib-operations | aib-aml | payment request | 4-hour dual auth |
| PROC-009 (Settlement) | aib-trading | None | daily reconciliation | 99.5% match by EOD |
| PROC-010 (DORA) | aib-operations | None | ict_incident detected | 4h/72h/30d FMA |
| PROC-011 (Statements) | aib-reporting | aib-operations, aib-identity | Month/quarter-end | T+10 delivery |
| PROC-012 (Exit) | aib-identity | None | account_close | 10-year retention |
Event Flow (Async)
bank_transaction.created
→ aib-aml: POST /alerts (real-time screening)
→ if alert.severity >= 'high': aib-compliance: POST /edd (escalate)
→ if edd approved: aib-trading allows orders
→ if edd rejected: freeze account
trade.executed
→ aib-trading: POST /settlements (schedule T+2)
→ aib-reporting: POST /emir-trades (T+1 deadline)
→ settlement.matched → aib-operations: position update
settlement.matched
→ update position → aib-reporting: aggregate for QIR
settlement.failed (fail_days >= 3)
→ escalate to aib-operations: buy-in assessment
→ CSDR Art. 7 penalty accrual
kyc_review.completed
→ trigger: account opening eligible
→ aib-identity: POST /accounts (account creation)Dependency Resolution (Microservice Architecture)
Synchronous calls (blocking):
- aib-trading → aib-compliance (pre-trade suitability check)
- All → aib-identity (master data lookup)
Asynchronous calls (event-driven):
- aib-operations → aib-aml (AML screen on each transaction)
- aib-trading → aib-reporting (EMIR submission on trade.executed)
- aib-compliance → aib-aml (EDD escalation on PEP hit)
No circular dependencies: Verified in aib-service-dependency-graph.md