-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwsapi_v2.json
3332 lines (3332 loc) · 101 KB
/
wsapi_v2.json
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
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"basePath": "/v2",
"definitions": {
"AccountDescriptor": {
"example": {
"AdminMode": "registered",
"DataMode": "unregistered",
"Email": "dan.forsberg@isecure.fi",
"Name": "Dan Forsberg",
"Phone": "+358404835507",
"export": "allowed"
},
"properties": {
"AdminMode": {
"description": "`admin` mode status",
"enum": [
"registered",
"unregistered"
],
"type": "string"
},
"Certs": {
"items": {
"$ref": "#/definitions/CertDescriptor"
},
"type": "array"
},
"DataMode": {
"description": "`data` mode status",
"enum": [
"registered",
"unregistered"
],
"type": "string"
},
"Email": {
"description": "Email address as the account username",
"type": "string"
},
"Export": {
"description": "Status for certificate and private key export allowance. See ConfigCerts.",
"enum": [
"disabled",
"allowed"
],
"type": "string"
},
"Name": {
"description": "Full name of registrant",
"type": "string"
},
"Phone": {
"description": "Phone number with country code and `+` in front",
"type": "string"
}
},
"required": [
"Name",
"Email",
"Phone",
"Export",
"Certs"
],
"type": "object"
},
"CertDescriptor": {
"example": {
"CertName": "osuuspankki_customer_signing_cert",
"Expires": "Oct 28 06:30:08 2017 GMT",
"Issuer": "CUSTOMER TEST OP-Pohjola WS CA",
"PEM": "-----BEGIN CERTIFICATE-----\nMIIF+DCCA+CgAwIBAgIDEaBdMA0GCS...x0t6Cnd5lyGKg=\n-----END CERTIFICATE-----",
"Serial": "11A05D",
"Subject": "1000038023"
},
"properties": {
"CertName": {
"description": "Certificate common name",
"type": "string"
},
"Expires": {
"description": "Date of expiry",
"type": "string"
},
"Issuer": {
"description": "Certificate issuer",
"type": "string"
},
"PEM": {
"description": "Certificate in PEM format",
"type": "string"
},
"Serial": {
"description": "Certificate serial number",
"type": "string"
},
"Subject": {
"description": "Certificate subject",
"type": "string"
}
},
"required": [
"CertName",
"Expires",
"Subject",
"Issuer",
"Serial",
"PEM"
],
"type": "object"
},
"CertsAndKeys": {
"properties": {
"Certificate": {
"description": "Certificate in PEM format",
"type": "string"
},
"EncryptedPrivateKey": {
"description": "PGP encrypted ascii armored private key",
"type": "string"
}
},
"required": [
"Certificate",
"EncryptedPrivateKey"
],
"type": "object"
},
"ConfigCertsReq": {
"example": {
"Export": "disabled"
},
"properties": {
"Export": {
"description": "Set export to `disabled` to disallow certificate and private key pair exporting",
"type": "string"
}
},
"required": [
"Export"
],
"type": "object"
},
"DeleteKeyReq": {
"example": {
"PgpKeyId": "DBCBE671"
},
"properties": {
"PgpKeyId": {
"description": "8 chars hexadecimal PGP Key Id (see e.g. gpg --list-keys)",
"type": "string"
}
},
"required": [
"PgpKeyId"
],
"type": "object"
},
"DeleteKeyResp": {
"example": {
"ResponseCode": "..",
"ResponseText": ".."
},
"properties": {
"PgpKeys": {
"description": "List of PGP keys in API",
"items": {
"$ref": "#/definitions/PgpKeyDescriptor"
},
"type": "array"
},
"ResponseCode": {
"description": "Two digit response code in string format",
"type": "string"
},
"ResponseText": {
"description": "Human readable response text",
"type": "string"
}
},
"required": [
"ResponseCode",
"ResponseText",
"PgpKeys"
],
"type": "object"
},
"DownloadFileResp": {
"example": {
"Content": "xxxxxxxx",
"ResponseCode": "..",
"ResponseText": ".."
},
"properties": {
"Content": {
"description": "Downloaded file content as from bank (e.g. in Base64 form)",
"type": "string"
},
"ResponseCode": {
"description": "Two digit response code in string format",
"type": "string"
},
"ResponseText": {
"description": "Human readable response text",
"type": "string"
}
},
"required": [
"ResponseCode",
"ResponseText",
"Content"
],
"type": "object"
},
"EnrollCertReq": {
"example": {
"Code": "8642603384107437",
"Company": "ISECURE OY",
"WsUserId": "..."
},
"properties": {
"Code": {
"description": "Full PIN code from bank (e.g. combined from SMS and letter)",
"type": "string"
},
"Company": {
"description": "Company name as registered with bank (e.g. full capital letters, see contract). **NOTE**: The value of this field is not compared with the account company name set during registration because the format for cert enrollment differs between banks.",
"type": "string"
},
"WsUserId": {
"description": "*SEPA WebService*s channel user id as in contract with bank",
"type": "string"
}
},
"required": [
"Code",
"Company",
"WsUserId"
],
"type": "object"
},
"ErrorResponse": {
"properties": {
"RequestId": {
"description": "Service side request id for problem tracing purposes",
"type": "string"
},
"ResponseCode": {
"description": "Two digit response code in string format",
"type": "string"
},
"ResponseText": {
"description": "Human readable response text",
"type": "string"
}
},
"type": "object"
},
"ExportCertResp": {
"example": {
"ResponseCode": "..",
"ResponseText": ".."
},
"properties": {
"CertsAndKeys": {
"description": "List of certificate and encrypted private key pairs",
"items": {
"$ref": "#/definitions/CertsAndKeys"
},
"type": "array"
},
"ResponseCode": {
"description": "Two digit response code in string format",
"type": "string"
},
"ResponseText": {
"description": "Human readable response text",
"type": "string"
}
},
"required": [
"ResponseCode",
"ResponseText",
"CertsAndKeys"
],
"type": "object"
},
"FileDescriptor": {
"example": {
"FileReference": "227166",
"FileTimestamp": "2017-05-20T03:36:21.148+03:00",
"FileType": "VA",
"ServiceId": "N/A",
"Status": "NEW",
"TargetId": "MLP"
},
"properties": {
"FileReference": {
"description": "File reference id, use e.g. when downloading the file",
"type": "string"
},
"FileTimestamp": {
"description": "Creation time stamp of the file from bank",
"type": "string"
},
"FileType": {
"description": "Bank specific file type",
"type": "string"
},
"ServiceId": {
"description": "Bank specific service id (e.g. bank account number)",
"type": "string"
},
"Status": {
"description": "File download status",
"type": "string"
},
"TargetId": {
"description": "Bank specific target id",
"type": "string"
}
},
"required": [
"FileType",
"Status",
"FileTimestamp",
"FileReference"
],
"type": "object"
},
"ImportCertReq": {
"example": {
"Certificate": "...",
"Company": "ISECURE OY",
"EncCertificate": "...",
"EncPrivatekey": "...",
"PrivateKey": "...",
"WsUserId": "..."
},
"properties": {
"Certificate": {
"description": "Certificate in PEM format",
"type": "string"
},
"Company": {
"description": "Company name as registered with bank (e.g. full capital letters without Oy, see contract)",
"type": "string"
},
"EncCertificate": {
"description": "Certificate in PEM format (encryption certificate for DanskeBank)",
"type": "string"
},
"EncPrivatekey": {
"description": "Private key in PEM format (encryption certificate for DanskeBank)",
"type": "string"
},
"PrivateKey": {
"description": "Private key in PEM format",
"type": "string"
},
"WsUserId": {
"description": "*SEPA WebService*s channel user id as in contract with bank",
"type": "string"
}
},
"required": [
"Company",
"WsUserId",
"PrivateKey",
"Certificate"
],
"type": "object"
},
"InitLoginResp": {
"example": {
"Challenge": "9Ty4zrnJGqNH0i1+I0OTKHjTs03Ymd4tBH70FTiYNhA=|1494962070679|2646b71b-9b51-4d11-bf5e-cca5617bcfde",
"ResponseCode": "..",
"ResponseText": ".."
},
"properties": {
"Challenge": {
"description": "Challenge copied from API response",
"type": "string"
},
"ResponseCode": {
"description": "Two digit response code in string format",
"type": "string"
},
"ResponseText": {
"description": "Human readable response text",
"type": "string"
}
},
"required": [
"ResponseCode",
"ResponseText",
"Challenge"
],
"type": "object"
},
"InitRegisterResp": {
"example": {
"Challenge": "9Ty4zrnJGqNH0i1+I0OTKHjTs03Ymd4tBH70FTiYNhA=|1494962070679|2646b71b-9b51-4d11-bf5e-cca5617bcfde",
"ResponseCode": "..",
"ResponseText": ".."
},
"properties": {
"Challenge": {
"description": "Challenge copied from API response",
"type": "string"
},
"ResponseCode": {
"description": "Two digit response code in string format",
"type": "string"
},
"ResponseText": {
"description": "Human readable response text",
"type": "string"
}
},
"required": [
"ResponseCode",
"ResponseText",
"Challenge"
],
"type": "object"
},
"ListAccountsResp": {
"example": {
"ResponseCode": "..",
"ResponseText": ".."
},
"properties": {
"Accounts": {
"description": "List of accounts under the API key",
"items": {
"$ref": "#/definitions/AccountDescriptor"
},
"type": "array"
},
"ResponseCode": {
"description": "Two digit response code in string format",
"type": "string"
},
"ResponseText": {
"description": "Human readable response text",
"type": "string"
}
},
"required": [
"ResponseCode",
"ResponseText",
"Accounts"
],
"type": "object"
},
"ListCertsResp": {
"example": {
"ResponseCode": "..",
"ResponseText": ".."
},
"properties": {
"Certs": {
"description": "List of certificates",
"items": {
"$ref": "#/definitions/CertDescriptor"
},
"type": "array"
},
"ResponseCode": {
"description": "Two digit response code in string format",
"type": "string"
},
"ResponseText": {
"description": "Human readable response text",
"type": "string"
}
},
"required": [
"ResponseCode",
"ResponseText",
"Certs"
],
"type": "object"
},
"ListFilesResp": {
"example": {
"ResponseCode": "..",
"ResponseText": ".."
},
"properties": {
"FileDescriptors": {
"description": "List of downloadable files from bank",
"items": {
"$ref": "#/definitions/FileDescriptor"
},
"type": "array"
},
"ResponseCode": {
"description": "Two digit response code in string format",
"type": "string"
},
"ResponseText": {
"description": "Human readable response text",
"type": "string"
}
},
"required": [
"ResponseCode",
"ResponseText",
"FileDescriptors"
],
"type": "object"
},
"ListKeysResp": {
"example": {
"ResponseCode": "..",
"ResponseText": ".."
},
"properties": {
"PgpKeys": {
"description": "List of PGP keys in API",
"items": {
"$ref": "#/definitions/PgpKeyDescriptor"
},
"type": "array"
},
"ResponseCode": {
"description": "Two digit response code in string format",
"type": "string"
},
"ResponseText": {
"description": "Human readable response text",
"type": "string"
}
},
"required": [
"ResponseCode",
"ResponseText",
"PgpKeys"
],
"type": "object"
},
"LoginMFAReq": {
"example": {
"Code": "123456",
"Session": "..."
},
"properties": {
"Code": {
"description": "Code from SMS",
"type": "string"
},
"Session": {
"description": "Session token from login response",
"type": "string"
}
},
"required": [
"Code",
"Session"
],
"type": "object"
},
"LoginMFAResp": {
"example": {
"AccessToken": "eyJraWQiO...CzzcdcdAdEzKIcJPR7Fda0A",
"ApiKey": "4vN6hGHrav31smM0Ha1k15MDlZKOEGn43UToWTt2",
"ExpiresIn": "3600",
"IdToken": "eyJraWQiOiJ...jExlzbFU4GlGtml7AWQHDYi05IpA",
"ResponseCode": "..",
"ResponseText": ".."
},
"properties": {
"AccessToken": {
"description": "Access token\n- **Only** present when Email verification is required",
"type": "string"
},
"ApiKey": {
"description": "Integrator API Key\n- **Not** present when Email verification is required",
"type": "string"
},
"ExpiresIn": {
"description": "Session expiration time\n- **Not** present when Email verification is required",
"type": "string"
},
"IdToken": {
"description": "ID token\n- **Not** present when Email verification is required",
"type": "string"
},
"ResponseCode": {
"description": "Two digit response code in string format",
"type": "string"
},
"ResponseText": {
"description": "Human readable response text",
"type": "string"
}
},
"required": [
"ResponseCode",
"ResponseText"
],
"type": "object"
},
"LoginReq": {
"example": {
"ChResp": "ezwXceQ63fV9oWTSJBAE2Zq1Cw5tBIJe+7+Rl8jrgbk=|1475429754114|4017bda8-0a15-4154-a8b7-88069b05cb4e",
"Encrypted": "..."
},
"properties": {
"ChResp": {
"description": "Challenge copied from API response",
"type": "string"
},
"Encrypted": {
"description": "RSA encrypted password and timestamp",
"type": "string"
}
},
"required": [
"ChResp",
"Encrypted"
],
"type": "object"
},
"LoginResp": {
"example": {
"AccessToken": "eyJraWQiO...CzzcdcdAdEzKIcJPR7Fda0A",
"ApiKey": "4vN6hGHrav31smM0Ha1k15MDlZKOEGn43UToWTt2",
"ExpiresIn": "3600",
"IdToken": "eyJraWQiOiJ...jExlzbFU4GlGtml7AWQHDYi05IpA",
"ResponseCode": "..",
"ResponseText": "..",
"Session": "xxxxxxxx"
},
"properties": {
"AccessToken": {
"description": "Access token\n- **Not** present on MFA login initiation, i.e. `admin` mode\n- **Only** present when Email verification is required",
"type": "string"
},
"ApiKey": {
"description": "Integrator API Key\n- **Not** present on MFA login initiation, i.e. `admin` mode)",
"type": "string"
},
"ExpiresIn": {
"description": "Session expiration time\n- **Not** present on MFA login initiation, i.e. `admin` mode)",
"type": "string"
},
"IdToken": {
"description": "ID token\n- **Not** present on MFA login initiation, i.e. `admin` mode",
"type": "string"
},
"ResponseCode": {
"description": "Two digit response code in string format",
"type": "string"
},
"ResponseText": {
"description": "Human readable response text",
"type": "string"
},
"Session": {
"description": "Session token\n- **Only** present on MFA login initiation, i.e. `admin` mode)",
"type": "string"
}
},
"required": [
"ResponseCode",
"ResponseText"
],
"type": "object"
},
"PasswordResetReq": {
"example": {
"ChResp": "ezwXceQ63fV9oWTSJBAE2Zq1Cw5tBIJe+7+Rl8jrgbk=|1475429754114|4017bda8-0a15-4154-a8b7-88069b05cb4e",
"Code": "123456",
"Encrypted": "..."
},
"properties": {
"ChResp": {
"description": "Challenge copied from API response",
"type": "string"
},
"Code": {
"description": "Code from SMS",
"type": "string"
},
"Encrypted": {
"description": "RSA encrypted NEW password and timestamp",
"type": "string"
}
},
"required": [
"Code",
"ChResp",
"Encrypted"
],
"type": "object"
},
"PgpKeyDescriptor": {
"example": {
"PgpKeyId": "3A3A59B2",
"PgpKeyPurpose": "authorize"
},
"properties": {
"PgpKeyId": {
"description": "Short version of a PGP Key id idenfiying the key, e.g. `3A3A59B2`",
"type": "string"
},
"PgpKeyPurpose": {
"description": "PGP Key purpose",
"enum": [
"export",
"authorize"
],
"type": "string"
}
},
"required": [
"PgpKeyId"
],
"type": "object"
},
"RegisterReq": {
"example": {
"ApiKey": "hzYAVO9Sg98nsNh81M84O2kyXVy6K1xwHD8",
"ChResp": "ezwXceQ63fV9oWTSJBAE2Zq1Cw5tBIJe+7+Rl8jrgbk=|1475429754114|4017bda8-0a15-4154-a8b7-88069b05cb4e",
"Company": "ISECure Oy",
"Encrypted": "...",
"Name": "Dan Forsberg",
"Phone": "+358404835507"
},
"properties": {
"ApiKey": {
"description": "Integrator API Key, or `0` if not already known (e.g. initial integrator registration)",
"type": "string"
},
"ChResp": {
"description": "Challenge copied from API response",
"type": "string"
},
"Company": {
"description": "Company name",
"type": "string"
},
"Encrypted": {
"description": "RSA encrypted password and timestamp",
"type": "string"
},
"Name": {
"description": "Full name of registrant",
"type": "string"
},
"Phone": {
"description": "Phone number with country code and `+` in front",
"type": "string"
}
},
"required": [
"Name",
"Phone",
"Company",
"ApiKey",
"ChResp",
"Encrypted"
],
"type": "object"
},
"RegisterResp": {
"example": {
"ApiKey": "4vN6hGHrav31smM0Ha1k15MDlZKOEGn43UToWTt2",
"ResponseCode": "..",
"ResponseText": ".."
},
"properties": {
"ApiKey": {
"description": "Integrator API Key",
"type": "string"
},
"ResponseCode": {
"description": "Two digit response code in string format",
"type": "string"
},
"ResponseText": {
"description": "Human readable response text",
"type": "string"
}
},
"required": [
"ResponseCode",
"ResponseText",
"ApiKey"
],
"type": "object"
},
"Response": {
"properties": {
"ResponseCode": {
"description": "Two digit response code in string format",
"type": "string"
},
"ResponseText": {
"description": "Human readable response text",
"type": "string"
}
},
"required": [
"ResponseCode",
"ResponseText"
],
"type": "object"
},
"ShareCertsResp": {
"example": {
"ResponseCode": "..",
"ResponseText": "..",
"SharedFrom": "string",
"SharedTo": "string"
},
"properties": {
"ResponseCode": {
"description": "Two digit response code in string format",
"type": "string"
},
"ResponseText": {
"description": "Human readable response text",
"type": "string"
},
"SharedFrom": {
"description": "_ExtEmail_ account that this account shares certs from",
"items": {
"type": "string"
},
"type": "array"
},
"SharedTo": {
"description": "_ExtEmail_ account that this account shares certs for",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"ResponseCode",
"ResponseText",
"SharedTo",
"SharedFrom"
],
"type": "object"
},
"UnshareCertsResp": {
"example": {
"ResponseCode": "..",
"ResponseText": "..",
"SharedFrom": "string",
"SharedTo": "string"
},
"properties": {
"ResponseCode": {
"description": "Two digit response code in string format",
"type": "string"
},
"ResponseText": {
"description": "Human readable response text",
"type": "string"
},
"SharedFrom": {
"description": "_ExtEmail_ account that this account shares certs from",
"items": {
"type": "string"
},
"type": "array"
},
"SharedTo": {
"description": "_ExtEmail_ account that this account shares certs for",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"ResponseCode",
"ResponseText",
"SharedTo",
"SharedFrom"
],
"type": "object"
},
"UploadFileReq": {
"example": {
"FileContents": "...",
"FileName": "testfile",
"FileType": "KTL",
"Signature": "string"
},
"properties": {
"FileContents": {
"description": "Base64 encoded file contents",
"type": "string"
},
"FileName": {
"description": "Upload file name",
"type": "string"
},
"FileType": {
"description": "Bank specific file type",
"type": "string"
},
"Signature": {
"description": "Detached PGP signature(s) made with registered PGP key(s)",
"type": "string"
}
},
"required": [
"FileContents",
"FileType",
"FileName",
"Signature"
],
"type": "object"
},
"UploadKeyReq": {
"example": {
"PgpKey": "...",
"PgpKeyPurpose": "authorize"
},
"properties": {
"PgpKey": {
"description": "ASCII armored PGP Key",
"type": "string"
},
"PgpKeyPurpose": {
"description": "PGP key purpose, i.e. `export` (exporting cert private key) or `authorize` (upload content authorization verification).",
"type": "string"
}
},
"required": [
"PgpKey",
"PgpKeyPurpose"
],
"type": "object"
},
"VerifyEmailReq": {
"example": {
"AccessToken": "eyJraWQiO...CzzcdcdAdEzKIcJPR7Fda0A",
"Code": "123456"
},
"properties": {
"AccessToken": {
"description": "Access token from login response",
"type": "string"
},
"Code": {
"description": "Code from email",
"type": "string"
}
},
"required": [
"Code",
"AccessToken"
],
"type": "object"
},
"VerifyPhoneReq": {
"example": {
"Code": "123456"
},
"properties": {
"Code": {
"description": "Code from SMS",
"type": "string"
}
},
"required": [
"Code"
],
"type": "object"
}
},
"host": "ws-api.test.isecure.fi",
"info": {
"contact": {
"email": "dan.forsberg@isecure.fi",
"name": "ISECure Oy",
"url": "https://www.isecure.fi/"
},
"description": "The API provides secure file exchange with all common banks in Finland via *SEPA WebServices* channel on the API side towards the banks, including certificate enrollment (PKI) with automatic renewals.\n\nThe API specification in OpenAPI v2 format can be found on GitHub [isecurefi/wsapi-v2](https://github.com/isecurefi/wsapi-v2). Command line CLI and beefed-up PHP SDK are also available on GitHub [isecurefi/wscli-php](https://github.com/isecurefi/wscli-php).\n\n```\n% export SESSION=~/.wscli/settings.yaml\n% wscli session login -c $SESSION\n% export APIKEY=`yq -r .settings.apikey $SESSION`\n% export IDTOKEN=`yq -r .settings.idtoken $SESSION`\n%\n% curl -H Authorization:$IDTOKEN \\ \n -H x-api-key:$APIKEY \\ \n https://ws-api.isecure.fi/v2/files/danskebank\n```\n\nAPI provides simple role based access control (RBAC) and user account management, password recovery, and SMS based Multi Factor Authentication based on AWS Cognito Your User Pool managed service.\n\n*NOTE: The API endpoint for production is the same as for test, but without `test.` in the URL. Production and test APIs are deployd on separate AWS accounts*.\n\n*NOTE: The API is run on AWS API Gateway and with AWS Lambda backend. When Lambda functions are cold, there is a small delay in response time. Additionally, banks have considerable delays in their processings, especially with certificate enrollments.*\n\n### Service enrollment\n\nEvery integrator (partner) has own *API Key* and every user account belongs to one integrator. *API Key* is bound with service subscription. In other words, enrolling fresh *API Key* requires service agreement before file transfers are allowed on production accounts.\n\nIf user registers with `0` *API Key* (i.e. no *API Key*) she gets a fresh *API Key* and becomes the *API Key* owner. The *API Key* owner account can list all users under the same *API Key*, see the *Integrator API*. Integrators (partners) registers their own *API Key* owner accounts and use it to register their client accounts.\n\n*NOTE: API call rate limits are set and tracked per API Key by AWS API Gateway*.\n\n### Account management\n\nA user (email address) can register either *admin* or *data* or both roles. The role in the API is referred to as *mode*. Both modes have separate passwords and provide differing capabilities for the user.\n\nLogin always requires account mode parameter in addition to user's email address and password. *Admin* mode login always requires an additional SMS one-time-password (MFA), whilst with *data* mode password is enough (suitable for automation). *Admin* mode is used to configure the account (e.g. adding PGP keys and sharing certs) and *data* mode to exchange files. Listing files is allowed on both modes.\n\n*NOTE: Integrator (partner) registers her customers by using her API Key from the API Key owner account.*\n\n### Bank certificate enrollment\n\nThe *SEPA WebServices* connection to the bank requires enrolling PKI certificate with the bank. The *Admin* mode can enroll certificates for different banks, but only one certificate per bank. The corresponding private key is stored encrypted with AWS KMS service.\n\n### Bank certificate sharing\n\nIt is possible to share the same bank certificate with multiple accounts. Certificate sharing between accounts can be configured when accounts have the same API Key. Account that holds the certificate can share/unshare it with another account (*admin* mode operation). Note that only the account that has the certificate can PGP export the certificate and corresponding private key. This allows creating e.g. one *admin* mode only account and multiple *data* mode only accounts, where the *admin* account shares its certificates with other *data* accounts.\n\nAn account can never have multiple certificates per bank, be it shared or account's enrolled certificate. This is because the API requires identification of the bank, but not the certificate and private key pair.\n\n### Access security\n\nAccess is secured with TLS on Amazon Web Services (AWS) API Gateway. Inside TLS, secure sessions are established by using email address as username and by RSA encrypting password along with dynamic username specific parameters fetched from the API with `InitRegister` or `InitLogin` API commands (challenge response).\n\nSuccessful login provides a session token (AWS Cognito User Pool). Authorization happens with the session token (`Authorization`) and *API Key* (`x-api-key`) headers.\n\nAdministrative actions require SMS based MFA authentication (see *admin* mode). User account management is handled with AWS Cognito User Pools and each user (email) has separate *admin* and/or *data* mode (role) accounts sharing the same API account data.\n\n### CHANGELOG\n\n**2.6.0** :: 2021-06-14\n- Added token revocation for logout (AWS SDK based new capability), no changes to the API itself.\n\n**2.5.0** :: 2020-04-19\n- Removed OPTIONS\n- Fixed Login response.",
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"termsOfService": "https://www.isecure.fi/ws-api-terms",
"title": "ISECure WS Channel API",
"version": "v2.6.0",
"x-logo": {
"backgroundColor": "#FFFFFF",
"url": "https://www.isecure.fi/images/isecure-small-logo.png"
}
},