Phase C · Information Systems Architecture
AIB Compliance Service API
Version: 1.0
Status: Draft
Last Updated: 2026-06-08
Overview
aib-compliance owns client KYC lifecycle, document verification, sanctions screening, PEP flagging, and EDD workflows.
Primary Tables: client, ubo, document, kyc_review, pep_record, sanctions_screen
Calls: none (source service)
Called By: aib-trading (mandate validation), aib-aml (EDD escalation)
SLA Targets
| Metric | Target | Notes |
|---|---|---|
| KYC Review Endpoint | P95: 200ms | High-frequency pre-trade gate |
| Sanctions Screening | P95: 500ms | Real-time, external API latency |
| Document Verification | P95: 1s | Depends on image ML processing |
| Throughput (KYC checks) | 10,000 req/sec | Peak onboarding period |
| Availability | 99.95% | SPG Art. 7 compliance critical |
OpenAPI 3.0 Specification
openapi: 3.0.3
info:
title: AIB Compliance Service API
version: 1.0.0
description: KYC, document verification, sanctions screening, PEP flagging, EDD workflows
contact:
name: AIB Architecture
license:
name: Internal
servers:
- url: https://api.aib.internal/compliance/v1
description: Production
paths:
/clients/{client_id}:
get:
summary: Retrieve client KYC status and details
operationId: getClient
parameters:
- name: client_id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: Client found
content:
application/json:
schema:
$ref: '#/components/schemas/ClientResponse'
'404':
description: Client not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
tags:
- Clients
x-sla:
p95_latency_ms: 150
timeout_ms: 500
/clients:
post:
summary: Initiate KYC onboarding for new client
operationId: createClient
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ClientCreateRequest'
responses:
'201':
description: Client created, KYC workflow initiated
content:
application/json:
schema:
$ref: '#/components/schemas/ClientResponse'
'400':
description: Invalid input (e.g., invalid jurisdiction)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
tags:
- Clients
x-sla:
p95_latency_ms: 300
timeout_ms: 1000
/clients/{client_id}/kyc/review:
get:
summary: Get current KYC review status
operationId: getKycReview
parameters:
- name: client_id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: KYC review details
content:
application/json:
schema:
$ref: '#/components/schemas/KycReviewResponse'
'404':
description: KYC review not found
tags:
- KYC
x-sla:
p95_latency_ms: 100
post:
summary: Approve or reject KYC review (compliance officer)
operationId: updateKycReview
parameters:
- name: client_id
in: path
required: true
schema:
type: string
format: uuid
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/KycReviewUpdateRequest'
responses:
'200':
description: KYC review updated
content:
application/json:
schema:
$ref: '#/components/schemas/KycReviewResponse'
'400':
description: Invalid status transition
'403':
description: Insufficient permissions (only compliance officer)
tags:
- KYC
x-sla:
p95_latency_ms: 200
/clients/{client_id}/documents:
post:
summary: Upload and verify KYC document (ID, proof of address, etc.)
operationId: uploadDocument
parameters:
- name: client_id
in: path
required: true
schema:
type: string
format: uuid
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
doc_type:
type: string
enum: [passport, national_id, driving_license, proof_of_address, proof_of_funds]
file:
type: string
format: binary
responses:
'201':
description: Document uploaded and verification initiated
content:
application/json:
schema:
$ref: '#/components/schemas/DocumentResponse'
'400':
description: Invalid document type or file format
'413':
description: File too large (max 10MB)
tags:
- Documents
x-sla:
p95_latency_ms: 500
get:
summary: List all documents for a client
operationId: listDocuments
parameters:
- name: client_id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: List of documents
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/DocumentResponse'
tags:
- Documents
x-sla:
p95_latency_ms: 150
/clients/{client_id}/sanctions-screen:
post:
summary: Run real-time sanctions screening (OFAC, UN, EU lists)
operationId: runSanctionsScreen
parameters:
- name: client_id
in: path
required: true
schema:
type: string
format: uuid
requestBody:
content:
application/json:
schema:
type: object
properties:
force_refresh:
type: boolean
default: false
description: Force re-screen even if recent clean screen exists
responses:
'200':
description: Sanctions screen result
content:
application/json:
schema:
$ref: '#/components/schemas/SanctionsScreenResponse'
'400':
description: Invalid client data (missing name/DOB for screening)
tags:
- Sanctions
x-sla:
p95_latency_ms: 500
timeout_ms: 2000
/clients/{client_id}/sanctions-screen/{screen_id}:
get:
summary: Retrieve specific sanctions screen result
operationId: getSanctionsScreen
parameters:
- name: client_id
in: path
required: true
schema:
type: string
format: uuid
- name: screen_id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: Sanctions screen details
content:
application/json:
schema:
$ref: '#/components/schemas/SanctionsScreenResponse'
tags:
- Sanctions
x-sla:
p95_latency_ms: 100
/clients/{client_id}/pep-record:
get:
summary: Get PEP status and cooling-off period
operationId: getPepRecord
parameters:
- name: client_id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: PEP record (if flagged) or empty if not PEP
content:
application/json:
schema:
$ref: '#/components/schemas/PepRecordResponse'
tags:
- PEP
x-sla:
p95_latency_ms: 100
/clients/{client_id}/ubo:
post:
summary: Register Ultimate Beneficial Owner (UBO) for corporate client
operationId: createUbo
parameters:
- name: client_id
in: path
required: true
schema:
type: string
format: uuid
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UboCreateRequest'
responses:
'201':
description: UBO registered
content:
application/json:
schema:
$ref: '#/components/schemas/UboResponse'
'400':
description: Invalid ownership % or UBO already exists
tags:
- UBO
x-sla:
p95_latency_ms: 200
get:
summary: List UBOs for a corporate client
operationId: listUbos
parameters:
- name: client_id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: List of UBOs
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/UboResponse'
tags:
- UBO
x-sla:
p95_latency_ms: 100
/clients/{client_id}/edd:
post:
summary: Initiate Enhanced Due Diligence (EDD) review for high-risk client
operationId: initiateEdd
parameters:
- name: client_id
in: path
required: true
schema:
type: string
format: uuid
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
reason:
type: string
enum: [pep_hit, sanctions_hit, high_risk_jurisdiction, aml_alert_escalation]
notes:
type: string
responses:
'201':
description: EDD initiated, awaiting senior officer review
content:
application/json:
schema:
$ref: '#/components/schemas/EddResponse'
tags:
- EDD
x-sla:
p95_latency_ms: 300
get:
summary: Get EDD status for client
operationId: getEdd
parameters:
- name: client_id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: EDD details (or empty if no EDD in progress)
content:
application/json:
schema:
$ref: '#/components/schemas/EddResponse'
tags:
- EDD
x-sla:
p95_latency_ms: 100
/clients/{client_id}/edd/{edd_id}/approve:
post:
summary: Senior officer approves EDD review
operationId: approveEdd
parameters:
- name: client_id
in: path
required: true
schema:
type: string
format: uuid
- name: edd_id
in: path
required: true
schema:
type: string
format: uuid
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
approved:
type: boolean
notes:
type: string
responses:
'200':
description: EDD decision recorded
'403':
description: Only senior officer can approve EDD
tags:
- EDD
x-sla:
p95_latency_ms: 200
components:
schemas:
ClientResponse:
type: object
properties:
client_id:
type: string
format: uuid
client_type:
type: string
enum: [individual, corporate]
kyc_status:
type: string
enum: [pending, under_review, approved, rejected, terminated]
kyc_tier:
type: string
enum: [basic, standard, enhanced]
risk_class:
type: string
enum: [low, medium, high, critical]
next_review_date:
type: string
format: date
created_at:
type: string
format: date-time
last_updated_at:
type: string
format: date-time
ClientCreateRequest:
type: object
required:
- first_name
- last_name
- client_type
- country_of_residence
properties:
first_name:
type: string
last_name:
type: string
client_type:
type: string
enum: [individual, corporate]
country_of_residence:
type: string
date_of_birth:
type: string
format: date
profession:
type: string
KycReviewResponse:
type: object
properties:
kyc_review_id:
type: string
format: uuid
client_id:
type: string
format: uuid
review_type:
type: string
enum: [initial, periodic, trigger_based]
status:
type: string
enum: [initiated, documents_pending, under_review, approved, rejected]
next_review_due:
type: string
format: date
reviewed_by:
type: string
description: Compliance officer who approved
created_at:
type: string
format: date-time
KycReviewUpdateRequest:
type: object
required:
- status
- reviewed_by
properties:
status:
type: string
enum: [approved, rejected]
notes:
type: string
description: Rejection reason or approval notes
DocumentResponse:
type: object
properties:
document_id:
type: string
format: uuid
doc_type:
type: string
verification_status:
type: string
enum: [pending, verified, failed, requires_resubmission]
verified_at:
type: string
format: date-time
retain_until:
type: string
format: date
SanctionsScreenResponse:
type: object
properties:
screen_id:
type: string
format: uuid
status:
type: string
enum: [pass, hit, review_required]
decision:
type: string
enum: [clear, blocked, escalated_to_compliance]
hit_details:
type: array
items:
type: object
properties:
list_name:
type: string
enum: [OFAC, UN, EU, FATF, FIU_LI]
match_score:
type: number
description:
type: string
screened_at:
type: string
format: date-time
PepRecordResponse:
type: object
properties:
pep_status:
type: string
enum: [not_pep, current_pep, former_pep, cooling_off]
pep_category:
type: string
enum: [head_of_state, government_official, military, judicial, central_bank, other]
cooling_off_until:
type: string
format: date
nullable: true
UboCreateRequest:
type: object
required:
- first_name
- last_name
- ownership_pct
properties:
first_name:
type: string
last_name:
type: string
ownership_pct:
type: number
minimum: 25
maximum: 100
country_of_residence:
type: string
UboResponse:
type: object
properties:
ubo_id:
type: string
format: uuid
client_id:
type: string
format: uuid
ownership_pct:
type: number
pep_status:
type: string
created_at:
type: string
format: date-time
EddResponse:
type: object
properties:
edd_id:
type: string
format: uuid
client_id:
type: string
format: uuid
reason:
type: string
status:
type: string
enum: [initiated, under_review, approved, rejected]
approved_by:
type: string
nullable: true
approved_at:
type: string
format: date-time
nullable: true
ErrorResponse:
type: object
properties:
error_code:
type: string
error_message:
type: string
request_id:
type: string
format: uuid
timestamp:
type: string
format: date-timeIntegration Points
Calls to Other Services
- None — source service for KYC data
Called By
aib-trading: Validate mandate eligibility (GET/clients/{client_id}?check_kyc_status=true)aib-aml: Escalate AML alert to EDD (POST/clients/{client_id}/edd)
Event Publishing
client.created— triggers AML baseline screeningkyc_review.completed→client.approved— triggers account opening eligibilitypep_record.created— triggers EDD initiationsanctions_screen.hit— triggers compliance officer notification
Error Handling
| Status | Scenario | Action |
|---|---|---|
| 400 | Missing required fields, invalid client_type | Reject, return field-level errors |
| 403 | Non-compliance officer tries to approve KYC | Reject, log attempted escalation |
| 404 | Client not found | Return 404, do not create auto |
| 409 | Duplicate UBO (same % ownership) | Return conflict, client must delete first |
| 500 | Sanctions screening API timeout | Retry with exponential backoff, max 2 retries; escalate if persistent |
Regulatory Compliance
| Regulation | Requirement | Implementation |
|---|---|---|
| SPG Art. 7 | KYC documentation verification | Document upload + verification status tracking |
| SPG Art. 8 | Periodic KYC review (2–3 years) | kyc_review.next_review_due triggers batch job |
| SPG Art. 2 lit. n | PEP cooling-off period (12 months) | pep_record.cooling_off_until enforced at account-opening gate |
| SPG Art. 18 | Sanctions screening at onboarding | POST /sanctions-screen mandatory before KYC approval |
| EU 5AMLD | UBO disclosure for ≥25% ownership | POST /clients/{id}/ubo with ownership_pct validation |
Referenced by
- agentAgent — Credit Officer (agent:aib-credit-officer)
- agentAgent — Payments Officer (agent:aib-payments)
- refAPI-to-Process Cross-Reference
- refPhase 1–3 Verification Checklist
- refRegulatory Framework × Artifact Mapping
- refTOGAF ADM Phase Breakdown
- ServiceAIB AML Service API
- ServiceAIB Trading Service API
- ProcessPROC-001: KYC Onboarding (SPG Art. 7–8)
- ProcessPROC-003: Sanctions Screening & Freeze Lifecycle
- ProcessPROC-006: KYC Periodic Review Cycle
- ProcessPROC-007: PEP/EDD Deep Dive Workflow
- ScreenSCR-AML — AML & Sanctions Screens
- ScreenSCR-AUD — Audit & Governance Screens
- ScreenSCR-CLM — Client Lifecycle & Onboarding Screens
- ScreenSCR-KYC — KYC & Due Diligence Screens
- ScreenSCR-TRD — Trading & Settlement Screens
- DocAIB Application Build PRD
- DocAIB Cloud Infrastructure Research — Best-in-Class Secure Cloud for a Liechtenstein/EEA Private Bank
- DocAIB Data Ownership Matrix (RACI)
- DocAIB Non-Functional Requirements & SLO Register
- DocAIB Solution Building Block (SBB) Catalog
- GovernanceAIB Agent Security & Threat Model
- GovernanceAIB Security Threat Model (STRIDE)
- GovernanceAIB TIBER-EU Threat-Led Penetration Testing Program