-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
758 lines (708 loc) · 20.3 KB
/
Copy pathopenapi.yaml
File metadata and controls
758 lines (708 loc) · 20.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
openapi: "3.1.0"
info:
title: NDSEP — National Data Sovereignty Enforcement Platform
version: "25.0.0"
description: |
The National Data Sovereignty Enforcement Platform (NDSEP) provides a comprehensive
API for managing data protection compliance across Nigeria's regulated sectors.
All tRPC procedures are exposed as REST endpoints under `/api/trpc/{procedure}`.
Authentication uses Manus OAuth with JWT session cookies.
**Sectors Covered:** Banking, AML/CFT, Fintech, Healthcare, Telecom, Energy,
Insurance, Capital Markets, Cross-Border, and 11 more.
**Middleware Stack:** Kafka, Dapr, Fluvio, OpenSearch, Mojaloop, Temporal,
Keycloak, Permify, Redis, APISIX, TigerBeetle, Apache Iceberg Lakehouse.
contact:
name: NDSEP Platform Team
email: platform@ndsep.gov.ng
license:
name: Government of Nigeria — Restricted
url: https://ndsep.gov.ng/license
servers:
- url: https://ndsep.gov.ng/api/trpc
description: Production
- url: https://staging.ndsep.gov.ng/api/trpc
description: Staging
- url: http://localhost:3000/api/trpc
description: Local development
tags:
- name: auth
description: Authentication and session management
- name: banking
description: Banking sector compliance (CBN regulations)
- name: aml
description: Anti-Money Laundering / Counter-Terrorism Financing
- name: fines
description: Enforcement actions and fine management
- name: accreditation
description: DPCO accreditation lifecycle management
- name: dpco
description: Data Protection Compliance Officers registry
- name: kyc
description: Know Your Customer document verification
- name: reporting
description: Regulatory reporting and submissions
- name: monitoring
description: Continuous compliance monitoring
- name: crossBorder
description: Cross-border data transfer monitoring (NDPA Chapter 6)
- name: riskScoring
description: Composite risk scoring engine
- name: incidents
description: Security incident management
- name: billing
description: Platform billing and Stripe integration
- name: institutions
description: Regulated institution registry
- name: correspondents
description: Correspondent bank monitoring
- name: sanctions
description: Sanctions screening and watchlist management
- name: dataResidency
description: Data residency enforcement and geo-fencing
- name: security
description: Security audit and vulnerability management
- name: governance
description: Governance framework alignment
- name: healthcare
description: Healthcare sector compliance (HIPAA + NDPA)
- name: telecom
description: Telecommunications sector compliance (NCC)
- name: system
description: System health and notifications
components:
securitySchemes:
sessionCookie:
type: apiKey
in: cookie
name: ndsep_session
description: JWT session cookie issued after Manus OAuth login
bearerToken:
type: http
scheme: bearer
bearerFormat: JWT
description: Bearer token for API-to-API calls
schemas:
PaginatedResponse:
type: object
properties:
items:
type: array
items: {}
total:
type: integer
page:
type: integer
pageSize:
type: integer
totalPages:
type: integer
ComplianceStatus:
type: string
enum: [compliant, non_compliant, under_review, suspended, revoked]
AccreditationState:
type: string
enum:
- DRAFT
- SUBMITTED
- UNDER_REVIEW
- COMMITTEE_REVIEW
- APPROVED
- REJECTED
- SUSPENDED
- REVOKED
- APPEALING
RiskLevel:
type: string
enum: [low, medium, high, critical]
SectorType:
type: string
enum:
- banking
- fintech
- healthcare
- telecom
- energy
- insurance
- capital_markets
- pension
- microfinance
- payment_service
- mobile_money
- crypto_exchange
- data_broker
- cloud_provider
- government
- education
- retail
- manufacturing
- logistics
- media
Bank:
type: object
required: [id, name, cbn_license_number, compliance_status]
properties:
id:
type: integer
name:
type: string
cbn_license_number:
type: string
bank_type:
type: string
enum: [commercial, merchant, microfinance, development, mortgage]
compliance_status:
$ref: "#/components/schemas/ComplianceStatus"
risk_score:
type: number
minimum: 0
maximum: 100
created_at:
type: string
format: date-time
AmlCase:
type: object
required: [id, case_ref, status, risk_level]
properties:
id:
type: integer
case_ref:
type: string
example: "AML-2026-001234"
subject_name:
type: string
subject_type:
type: string
enum: [individual, corporate, pep, correspondent]
status:
type: string
enum: [open, under_investigation, escalated, closed, referred_to_efcc]
risk_level:
$ref: "#/components/schemas/RiskLevel"
transaction_amount:
type: number
currency:
type: string
default: NGN
created_at:
type: string
format: date-time
Fine:
type: object
required: [id, reference_number, amount, status]
properties:
id:
type: integer
reference_number:
type: string
example: "FINE-2026-00456"
regulated_entity_name:
type: string
violation_type:
type: string
amount:
type: number
description: Amount in kobo (1 NGN = 100 kobo)
currency:
type: string
default: NGN
status:
type: string
enum: [pending, paid, partially_paid, appealing, waived, written_off]
due_date:
type: string
format: date
AccreditationApplication:
type: object
required: [id, org_name, status]
properties:
id:
type: integer
org_name:
type: string
rc_number:
type: string
status:
$ref: "#/components/schemas/AccreditationState"
accreditation_type:
type: string
enum: [new, renewal]
sectors:
type: array
items:
$ref: "#/components/schemas/SectorType"
created_at:
type: string
format: date-time
ComplianceEvent:
type: object
required: [eventType, entityType, entityId, data]
properties:
eventType:
type: string
example: "bank.created"
entityType:
type: string
example: "bank"
entityId:
type: string
sector:
type: string
userId:
type: string
data:
type: object
severity:
$ref: "#/components/schemas/RiskLevel"
timestamp:
type: integer
description: Unix timestamp in milliseconds
HealthStatus:
type: object
properties:
status:
type: string
enum: [healthy, degraded, unhealthy]
services:
type: object
additionalProperties:
type: object
properties:
status:
type: string
latency_ms:
type: integer
last_check:
type: string
format: date-time
Error:
type: object
required: [code, message]
properties:
code:
type: string
enum:
- UNAUTHORIZED
- FORBIDDEN
- NOT_FOUND
- BAD_REQUEST
- INTERNAL_SERVER_ERROR
- TOO_MANY_REQUESTS
message:
type: string
data:
type: object
security:
- sessionCookie: []
paths:
# ─── Authentication ────────────────────────────────────────────────────────
/auth.me:
get:
tags: [auth]
summary: Get current user
operationId: auth.me
responses:
"200":
description: Current authenticated user
content:
application/json:
schema:
type: object
properties:
id:
type: integer
name:
type: string
email:
type: string
role:
type: string
enum: [admin, user]
"401":
description: Not authenticated
/auth.logout:
post:
tags: [auth]
summary: Logout current user
operationId: auth.logout
responses:
"200":
description: Successfully logged out
# ─── Banking ──────────────────────────────────────────────────────────────
/banking.list:
get:
tags: [banking]
summary: List all regulated banks
operationId: banking.list
parameters:
- name: input
in: query
schema:
type: object
properties:
page:
type: integer
default: 1
pageSize:
type: integer
default: 25
search:
type: string
status:
$ref: "#/components/schemas/ComplianceStatus"
responses:
"200":
description: Paginated list of banks
content:
application/json:
schema:
allOf:
- $ref: "#/components/schemas/PaginatedResponse"
- type: object
properties:
items:
type: array
items:
$ref: "#/components/schemas/Bank"
/banking.create:
post:
tags: [banking]
summary: Register a new bank
operationId: banking.create
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [name, cbnLicenseNumber, bankType]
properties:
name:
type: string
cbnLicenseNumber:
type: string
bankType:
type: string
enum: [commercial, merchant, microfinance, development, mortgage]
responses:
"200":
description: Created bank
content:
application/json:
schema:
$ref: "#/components/schemas/Bank"
"401":
$ref: "#/components/responses/Unauthorized"
# ─── AML ──────────────────────────────────────────────────────────────────
/aml.listCases:
get:
tags: [aml]
summary: List AML cases
operationId: aml.listCases
parameters:
- name: input
in: query
schema:
type: object
properties:
page:
type: integer
pageSize:
type: integer
status:
type: string
riskLevel:
$ref: "#/components/schemas/RiskLevel"
responses:
"200":
description: Paginated AML cases
content:
application/json:
schema:
allOf:
- $ref: "#/components/schemas/PaginatedResponse"
- type: object
properties:
items:
type: array
items:
$ref: "#/components/schemas/AmlCase"
# ─── Fines ────────────────────────────────────────────────────────────────
/fines.list:
get:
tags: [fines]
summary: List enforcement fines
operationId: fines.list
responses:
"200":
description: Paginated fines
content:
application/json:
schema:
allOf:
- $ref: "#/components/schemas/PaginatedResponse"
- type: object
properties:
items:
type: array
items:
$ref: "#/components/schemas/Fine"
# ─── Accreditation ────────────────────────────────────────────────────────
/accreditation.submitApplication:
post:
tags: [accreditation]
summary: Submit DPCO accreditation application
operationId: accreditation.submitApplication
security: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [orgName, rcNumber, address, email, sectors, conflictDeclaration]
properties:
orgName:
type: string
rcNumber:
type: string
email:
type: string
format: email
sectors:
type: array
items:
$ref: "#/components/schemas/SectorType"
conflictDeclaration:
type: boolean
responses:
"200":
description: Application submitted
content:
application/json:
schema:
type: object
properties:
applicationId:
type: integer
referenceToken:
type: string
/accreditation.adminListApplications:
get:
tags: [accreditation]
summary: Admin list of all applications
operationId: accreditation.adminListApplications
parameters:
- name: input
in: query
schema:
type: object
properties:
status:
type: string
limit:
type: integer
default: 50
offset:
type: integer
default: 0
responses:
"200":
description: List of applications
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/AccreditationApplication"
/accreditation.adminMakeDecision:
post:
tags: [accreditation]
summary: Make accreditation decision
operationId: accreditation.adminMakeDecision
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [id, decision, reason]
properties:
id:
type: integer
decision:
type: string
enum: [approved, conditionally_approved, rejected]
reason:
type: string
minLength: 5
responses:
"200":
description: Decision recorded
# ─── System Health ────────────────────────────────────────────────────────
/system.health:
get:
tags: [system]
summary: Platform health check
operationId: system.health
security: []
responses:
"200":
description: Health status of all services
content:
application/json:
schema:
$ref: "#/components/schemas/HealthStatus"
/system.notifyOwner:
post:
tags: [system]
summary: Send notification to platform owner
operationId: system.notifyOwner
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [title, content]
properties:
title:
type: string
content:
type: string
responses:
"200":
description: Notification sent
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
# ─── Middleware Worker Health ──────────────────────────────────────────────
/middleware/dapr/health:
get:
tags: [system]
summary: Dapr bridge health (port 8150)
security: []
responses:
"200":
description: Healthy
/middleware/fluvio/health:
get:
tags: [system]
summary: Fluvio relay health (port 8151)
security: []
responses:
"200":
description: Healthy
/middleware/mojaloop/health:
get:
tags: [system]
summary: Mojaloop adapter health (port 8152)
security: []
responses:
"200":
description: Healthy
/middleware/apisix/health:
get:
tags: [system]
summary: APISIX manager health (port 8153)
security: []
responses:
"200":
description: Healthy
/middleware/tigerbeetle/health:
get:
tags: [system]
summary: TigerBeetle ledger health (port 8160)
security: []
responses:
"200":
description: Healthy
/middleware/opensearch/health:
get:
tags: [system]
summary: OpenSearch indexer health (port 8161)
security: []
responses:
"200":
description: Healthy
/middleware/keycloak/health:
get:
tags: [system]
summary: Keycloak validator health (port 8162)
security: []
responses:
"200":
description: Healthy
/middleware/lakehouse/health:
get:
tags: [system]
summary: Lakehouse ingest health (port 8163)
security: []
responses:
"200":
description: Healthy
/middleware/permify/health:
get:
tags: [system]
summary: Permify RBAC sync health (port 8164)
security: []
responses:
"200":
description: Healthy
/middleware/fluvio-consumer/health:
get:
tags: [system]
summary: Fluvio consumer health (port 8165)
security: []
responses:
"200":
description: Healthy
/middleware/opensearch-query/health:
get:
tags: [system]
summary: OpenSearch query service health (port 8166)
security: []
responses:
"200":
description: Healthy
/middleware/dapr-state/health:
get:
tags: [system]
summary: Dapr state bridge health (port 8167)
security: []
responses:
"200":
description: Healthy
components:
responses:
Unauthorized:
description: Authentication required
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
Forbidden:
description: Insufficient permissions
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
NotFound:
description: Resource not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
TooManyRequests:
description: Rate limit exceeded
headers:
Retry-After:
schema:
type: integer
content:
application/json:
schema:
$ref: "#/components/schemas/Error"