forked from swissfintechinnovations/ca-payment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaccountAPI.yaml
1507 lines (1426 loc) · 55.4 KB
/
accountAPI.yaml
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
openapi: 3.0.0
info:
version: 4.1.1
title: Common Account API
description: >
This specification defines a simple API to access information about bank accounts.
The API is supposed to be used by customers who want to get information about their
accounts such as current balance or transactions.
This specification uses schema definitions from the Common Data Model v1.2.1.
termsOfService: tbd
contact:
email: [email protected]
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: account.common-api.ch/api/v4
externalDocs:
description: Find out more about SFTI API specifications
url: https://www.common-api.ch
tags:
- name: accounts
description: Third party access to bank account service considering account information and transaction data operations (JSON).
- name: iso20022
description: Third party access to bank account service considering camt.053 operations (XML).
security:
- OAuth2:
- read
- write
paths:
/accounts:
get:
tags:
- accounts
summary: Retrieve list of authorized accounts
description: Return the list of all accounts accessible for the logged in user.
parameters:
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
responses:
'200':
description: Paginated list of all accounts.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/AccountItem'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
/accounts/{accountId}:
get:
tags:
- accounts
summary: Retrieve information about a single specific account
description: Returns the accounts details of the specified account.
parameters:
- $ref: '#/components/parameters/path_accountId'
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
responses:
'200':
description: Account details of the specified account.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
content:
application/json:
schema:
$ref: '#/components/schemas/AccountItem'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
/accounts/{accountId}/balance:
get:
tags:
- accounts
summary: Retrieve account balance information
description: |
Returns account balance information of the specified account.
* Returns the interim booked balance (ISO20022 Balance Type ITBD) for the current day, if called without a date. The balance is calculated
in the course of the service provider's business day, at the time specified, and subject to further changes during the business day. The
interim balance is calculated on the basis of booked credit and debit items during the calculation time/period specified.
* Returns the closing booked balance (ISO20022 Balance Type CLBD) for a specific day, if called for a past date. It is the sum of the opening
booked balance at the beginning of that day and all entries booked to the account during that day. In case the specified day has not yet been
finalized, the response code will be 202.
parameters:
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/path_accountId'
- $ref: '#/components/parameters/date'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
responses:
'200':
description: Account balance information of the specified account.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
content:
application/json:
schema:
$ref: '#/components/schemas/AccountBalanceItem'
'202':
$ref: '#/components/responses/standard202'
'204':
$ref: '#/components/responses/standard204'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
/accounts/{accountId}/transactions:
get:
tags:
- accounts
summary: Retrieve transactions of a specific account
description: |
Returns the transaction list of the specified account. Only postings with status booked will be returned.
* Returns the transaction list of the current day, if called without a date.
* Returns the transaction list for a specific day, if called for a past date (i.e. all transactions from that day).
In case the specified day is not yet finalized, the response code will be 202.
parameters:
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/path_accountId'
- in: query
name: dateFrom
schema:
$ref: '#/components/schemas/Date'
description: The start date of the transaction query.
- in: query
name: dateTo
schema:
$ref: '#/components/schemas/Date'
description: The end date of the transaction query.
- in: query
name: bookingStatus
required: true
schema:
type: string
enum:
- booked
- pending
- both
description: Booking status of the transactions to be queried.
- $ref: '#/components/parameters/cursor'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
responses:
'200':
description: Account details of the requested account.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
content:
application/json:
schema:
$ref: '#/components/schemas/AccountTransactionReport'
'202':
$ref: '#/components/responses/standard202'
'204':
$ref: '#/components/responses/standard204'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
/accounts/{accountId}/transactions/{transactionId}:
get:
tags:
- accounts
summary: Details of the specified transaction
description: Retrieves the details of the specified transaction.
parameters:
- $ref: '#/components/parameters/path_accountId'
- $ref: '#/components/parameters/path_transactionId'
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
responses:
'200':
description: Account details of the requested account.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
content:
application/json:
schema:
$ref: '#/components/schemas/AccountTransactionEntry'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
/iso20022/statements:
get:
tags:
- iso20022
summary: Retrieve a list of resource links to account statements (camt.053)
description: >
Get the resources links to available account statements (camt.053).
The returned account statements must be conform to the XML schema and
implementation guidelines defined by Swiss Payment Standards.
parameters:
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
responses:
'200':
description: Returns a list of resource links to ISO20022 XML camt.053 messages.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Iso20022ReportReference'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
/iso20022/statements/{reportId}:
get:
tags:
- iso20022
summary: Designated ISO20022 XML camt.053 document
description: Retrieves the designated ISO20022 XML camt.053 document.
parameters:
- $ref: '#/components/parameters/path_reportId'
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
responses:
'200':
description: Returns the requested ISO20022 XML camt.053 message.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
content:
application/xml:
schema:
type: string
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
# -------------------------
# -------- Models ---------
# -------------------------
components:
schemas:
AccountBalanceItem:
title: Account Balance Item
type: object
description: The account balance object.
required:
- date
- balanceType
- balance
properties:
date:
$ref: '#/components/schemas/Date'
description: The date for which the balance was retrieved.
balanceType:
type: string
enum:
- ITBD
- CLBD
description: >
The account balance type according to ISO20022. Either the interim booked balance (ITBD)
or the closing booked balance (CLBD) type can be applied. Corresponds to the attribute _Bal ⇾ Tp_ in SPS/ISO-20022.
example: CLBD
balance:
$ref: '#/components/schemas/BalanceCurrencyAmount'
_links:
type: object
description: Contains the paths to additional resources for specific account (e.g. path to account and transactions resource).
properties:
self:
type: string
example: /accounts/550e8400-e29b-11d4-a716-446655440000/balance
account:
type: string
example: /accounts/550e8400-e29b-11d4-a716-446655440000
transactions:
type: string
example: /accounts/550e8400-e29b-11d4-a716-446655440000/transactions
AccountItem:
title: Account Information Item
type: object
description: The account object.
required:
- accountOwner
- id
- account
- currency
properties:
id:
$ref: '#/components/schemas/CommonAccountId'
account:
$ref: '#/components/schemas/PaymentIbanAccount'
accountOwner:
type: string
maxLength: 140
description: The owner of the account.
example: Account Owner XYZ
currency:
$ref: '#/components/schemas/Currency'
description: The ISO currency three-letter code denominated and set for the account at the time it is opened.
allowedCurrencies:
type: array
items:
type: string
example: CHF
description: Permitted currencies for the account.
designation:
type: string
maxLength: 140
description: |
This element shall always be populated with the account alias, if defined, otherwise with specific bank account name
(e.g. bank saving account).
**NOTE:** This property will become mandatory with the next major release v5 of this API.
example: Firmenkonto
accountTypeCode:
type: string
description: |
Contains the account type code according to the ISO20022 external cash account type code list. It is strongly recommended
to use only the 5 codes below as follows:
* LOAN: Account used for loans (loan and mortgage accounts) - DE: Darlehenskonto, Kreditkonto, Baukreditkonto, Hypothekarkonto
* LLSV: Account used for savings with special interest and withdrawal terms (pension provision and vested benefits accounts) -
DE: Vorsorge- und Freizügigkeitskonten
* SVGS: Account used for savings (all types of saving accounts)
* TRAN: Account used for transactions (all types of personal, current and payment accounts) - DE: Privat-, Kontokorent- und
Zahlungsverkehrskonten
* OTHR: Account not otherwise specified (gathering pool for all other accounts)
**NOTE:** This property will become mandatory with the next major release v5 of this API.
example: TRAN
enum:
- CACC
- CARD
- CASH
- CHAR
- CISH
- COMM
- CPAC
- LLSV
- LOAN
- MGLD
- MOMA
- NFCA
- NREX
- ODFT
- ONDP
- OTHR
- SACC
- SLRY
- SVGS
- TAXE
- TRAN
- TRAS
- VACC
_links:
type: object
description: Contains the paths to additional resources for specific account (e.g. path to balance and transactions resource).
properties:
self:
type: string
example: /accounts/550e8400-e29b-11d4-a716-446655440000
balance:
type: string
example: /accounts/550e8400-e29b-11d4-a716-446655440000/balance
transactions:
type: string
example: /accounts/550e8400-e29b-11d4-a716-446655440000/transactions
AccountTransactionCounterpartyAccount:
title: Account Transaction Counterparty Account
description: Specifies the counterparty account (debtor account if transaction type = CRDT, creditor account if transaction type = DBIT).
type: object
required:
- type
- identification
properties:
type:
type: string
enum:
- IBAN
- OTHER
description: The account idientification type of the counterparty account, either IBAN or OTHER.
example: IBAN
identification:
type: string
maxLength: 35
description: 'The account identification: IBAN, ISR participant number or bank account number.'
example: CH9300762011623852957
AccountTransactionBankTransactionCode:
title: Account Transaction Bank Transaction Code
type: object
description: >
The bank transaction code (ISO20022) object of an account transaction. Specifies a set of elements to fully identify the type of
underlying transaction resulting in an entry.
required:
- domainCode
- familyCode
- subFamilyCode
properties:
domainCode:
type: string
maxLength: 4
description: >
The code of the business area of the underlying transaction according to the "Bank Transaction Code". Corresponds to the attribute
_Domn ⇾ Cd_ in SPS/ISO-20022.
example: PMNT
familyCode:
type: string
maxLength: 4
description: >
The family code within a specific domain according to the "Bank Transaction Code". Corresponds to the attribute _Fmly ⇾ Cd_
in SPS/ISO-20022.
example: RCDT
subFamilyCode:
type: string
maxLength: 4
description: >
Specifies the sub-family code within a specific domain according to the "Bank Transaction Code". Corresponds to the attribute
_SubFmlyCd_ in SPS/ISO-20022.
example: DMCT
AccountTransactionCounterparty:
title: Account Transaction Counterparty
type: object
description: Specifies the counterparty details (creditor or debtor).
properties:
name:
type: string
maxLength: 140
description: Name of the counterparty (debtor name if transaction type = CRDT, creditor name if transaction type = DBIT).
example: Hans Muster
postalAddress:
$ref: '#/components/schemas/AccountTransactionStructuredOrUnstructuredAddress'
account:
$ref: '#/components/schemas/AccountTransactionCounterpartyAccount'
agent:
$ref: '#/components/schemas/AccountTransactionCounterpartyAgent'
AccountTransactionCounterpartyAgent:
title: Account Transaction Counterparty Agent
type: object
description: The account transaction counterparty agent object.
properties:
bic:
type: string
minLength: 8
maxLength: 11
description: |
The bank identifier code (BIC) of the creditor agent of a payment. Corresponds to the attribute
_CdtrAgt ⇾ FinInstnId ⇾ BIC_ in SPS/ISO-20022.
The BIC is an 8 or 11-character code that breaks down as follows:
- First 4 characters - bank code (letters only)
- Next 2 characters - ISO 3166-1 alpha-2 country code (letters only)
- Next 2 characters - location code (letters and digits)
- Last 3 characters (optional) - branch code, specifying a particular branch of the bank (letters and digits)
example: DEUTDE5M101
clearingSystemMemberIdentification:
$ref: '#/components/schemas/CommonClearingSystemMemberIdentification'
AccountTransactionEntry:
title: Account Transaction Entry
type: object
description: The account transaction entry object.
required:
- entryId
- transactionType
- bookingDate
- valueDate
- amount
- bankTransactionCode
- additionalEntryInformation
properties:
entryId:
type: string
description: Unique bank-defined ID for the transaction. Corresponds to the attribute _Ntry ⇾ AddtlInfInd ⇾ MsgId_ in SPS/ISO-20022.
example: ENTRY123456789
transactionType:
$ref: '#/components/schemas/AccountTransactionTransactionType'
entryReference:
type: string
description: >
Mandatory for business cases ISR and QR-IBAN. Contains the ISR participant number or QR-IBAN of the account owner. Corresponds to the
attribute _NtryRef_ in SPS/ISO-20022.
example: '10001628'
maxLength: 35
entryReferenceInternalId:
type: string
description: >
Additional grouping criteria for business cases ISR and QR-IBAN. Contains the BISR-ID or first 6 characters of the QR reference.
example: '123456'
maxLength: 35
reversalIndicator:
type: boolean
description: >
Indicates if the transaction is a reversing entry. Must always be true. Corresponds to the attribute _RvslInd_ in SPS/ISO-20022.
example: true
bookingDate:
$ref: '#/components/schemas/Date'
description: The booking date of the transaction set by the bank. Corresponds to the attribute _BookgDt_ in SPS/ISO-20022.
valueDate:
$ref: '#/components/schemas/Date'
description: The value date of the transaction set by the bank. Corresponds to the attribute _ValDt_ in SPS/ISO-20022.
amount:
$ref: '#/components/schemas/PaymentCurrencyAmount'
instructedAmount:
$ref: '#/components/schemas/AccountTransactionInstructedAmount'
totalChargesAmount:
$ref: '#/components/schemas/AccountTransactionItemCharges'
bankTransactionCode:
$ref: '#/components/schemas/AccountTransactionBankTransactionCode'
additionalEntryInformation:
type: string
description: Additional entry information. Corresponds to the attribute _AddtlNtryInf_ in SPS/ISO-20022.
example: Online Shopping Visa Debit Card Nr. xxxx 1234
transactions:
type: array
description: Specifies the transaction entries.
items:
$ref: '#/components/schemas/AccountTransactionItem'
AccountTransactionInstructedAmount:
title: Account Transaction Instructed Amount
type: object
description: Specifies the instructed amount according to the account currency.
required:
- amount
- sourceCurrency
- targetCurrency
properties:
amount:
$ref: '#/components/schemas/Amount'
description: The amount instructed by the customer to the bank to carry out the transaction.
sourceCurrency:
$ref: '#/components/schemas/Currency'
description: >
The ISO currency three-letter code which is used to fund a currency conversion. Corresponds to the attribute
_SrcCcy_ in SPS/ISO-20022.
targetCurrency:
$ref: '#/components/schemas/Currency'
description: >
The ISO currency three-letter code which the recipient will receive after the currency conversion.
Corresponds to the attribute _TrgtCcy_ in SPS/ISO-20022.
exchangeRate:
type: string
pattern: '^\d{1,11}$|^(?=\d+[.]\d+$).{3,12}$'
maxLength: 12
description: >
The rate at which the source currency will be exchanged for the target currency. Corresponds to the attribute
_XchgRate_ in SPS/ISO-20022.
example: '0.957'
exchangeIndicator:
type: string
maxLength: 4
description: >
Indicates whether the amount has to be multiplied or divided by the exchange rate (MULT, DIV).
Mandatory if the exchange rate is provided.
example: MULT
AccountTransactionItem:
title: Account Transaction Item
type: object
description: Specifies the transaction entry item.
required:
- transactionId
- transactionType
- amount
properties:
transactionId:
type: string
maxLength: 35
description: >
The unique identifier to the listed transaction. Defined by the bank. Corresponds to the attribute
_TxDtls ⇾ Refs ⇾ PmtInfId_ in SPS/ISO-20022.
example: TX12345A987
transactionType:
$ref: '#/components/schemas/AccountTransactionTransactionType'
endToEndId:
type: string
maxLength: 35
description: The unique reference of the debtor/creditor. Corresponds to the attribute _EndToEndId_ in SPS/ISO-20022.
example: ENDTOENDID-01
bankTransactionCode:
$ref: '#/components/schemas/AccountTransactionBankTransactionCode'
amount:
$ref: '#/components/schemas/PaymentCurrencyAmount'
instructedAmount:
$ref: '#/components/schemas/AccountTransactionInstructedAmount'
totalChargesAmount:
$ref: '#/components/schemas/AccountTransactionItemCharges'
counterparty:
$ref: '#/components/schemas/AccountTransactionCounterparty'
remittanceInformation:
$ref: '#/components/schemas/PaymentRemittanceInformation'
remittanceReference:
$ref: '#/components/schemas/AccountTransactionRemittanceReference'
additionalTransactionInformation:
type: string
maxLength: 140
description: Any additional information to the transaction. Corresponds to the attribute _AddtlTxInf_ in SPS/ISO-20022.
example: Online Shopping Visa Debit Card Nr. xxxx 1234
AccountTransactionItemCharges:
title: Account Transaction Item Charges
type: object
description: Specifies the total amount of account charges.
required:
- amount
- currency
properties:
amount:
$ref: '#/components/schemas/Amount'
description: The total amount of account charges.
currency:
$ref: '#/components/schemas/Currency'
description: The ISO currency three-letter code in which the total amount of charges was posed.
chargeRecords:
type: array
description: Specifies the details about individual charges.
items:
$ref: '#/components/schemas/AccountTransactionItemChargesRecord'
AccountTransactionItemChargesRecord:
title: Account Transaction Item Charges Record
type: object
description: Specifies the details about individual charges.
properties:
amount:
$ref: '#/components/schemas/Amount'
description: The amount of individual charges.
currency:
$ref: '#/components/schemas/Currency'
description: The ISO currency three-letter code in which the amount of individual charges was posed based.
type:
type: string
maxLength: 35
description: The type of charge. Corresponds to the attribute _Chrgs ⇾ Rcrd ⇾ Tp_ in SPS/ISO-20022.
example: Some type of charge
chargesIncludedIndicator:
description: >
Indicates whether the charges are included in the entry amount or not. Corresponds to the attribute
_ChrgInclInd_ in SPS/ISO-20022.
type: boolean
example: true
AccountTransactionRemittanceReference:
title: Account Transaction Remittance Reference
description: The remittance reference of the account transaction. Specifies the structured reference.
type: object
properties:
type:
type: string
enum:
- SCOR
- ISR
- QRR
description: The reference type (QRR, SCOR, ISR). Corresponds to the attribute _RmtInf ⇾ Strd ⇾ CdtrRefInf ⇾ Tp_ in SPS/ISO-20022.
example: SCOR
reference:
type: string
maxLength: 35
description: >
The reference number associated to the choosen remittance type. Corresponds to the attribute _RmtInf ⇾ Strd ⇾ CdtrRefInf ⇾ Ref_
in SPS/ISO-20022.
example: '210000000003139471430009017'
AccountTransactionReport:
title: Account Transaction Report
type: object
description: The account transaction report object.
required:
- iban
- entries
properties:
iban:
$ref: '#/components/schemas/IbanIdentification'
description: The International Bank Account Number (IBAN), associated with the account.
designation:
type: string
maxLength: 140
description: The account designation of the account, i.e. savings account.
example: Payment account
entries:
type: array
description: The account transaction entry object.
items:
$ref: '#/components/schemas/AccountTransactionEntry'
linksPagination:
$ref: '#/components/schemas/LinksPagination'
_links:
type: object
description: Contains the paths to additional resources for specific account (e.g. path to account and balance resource).
properties:
self:
type: string
example: /accounts/550e8400e29b11d4a716446655440000/statements
account:
type: string
example: /accounts/550e8400e29b11d4a716446655440000
balance:
type: string
example: /accounts/550e8400e29b11d4a716446655440000/balance
AccountTransactionTransactionType:
title: Account Transaction Transaction Type
description: >
The transaction type of the account transaction, either credit (CRDT) or debit (DBIT). Corresponds to the attribute _CdtDbtInd_
in SPS/ISO-20022.
type: string
enum:
- CRDT
- DBIT
example: CRDT
AccountTransactionStructuredAddress:
title: Structured Postal Address for Transactions
type: object
description: Specifies the details of the counterparty structured address.
required:
- streetName
- postCode
- townName
properties:
streetName:
type: string
maxLength: 70
description: The counterparty street name. Corresponds to the attribute _StrtNm_ in SPS/ISO-20022.
example: Rue de la gare
buildingNumber:
type: string
maxLength: 16
description: The counterparty building number. Corresponds to the attribute _BldgNb_ in SPS/ISO-20022.
example: '24'
postCode:
type: string
maxLength: 16
description: The counterparty post code. Corresponds to the attribute _PstCd_ in SPS/ISO-20022.
example: '2501'
townName:
type: string
maxLength: 35
description: The counterparty town name. Corresponds to the attribute _TwnNm_ in SPS/ISO-20022.
example: Biel
country:
type: string
maxLength: 2
description: The counterparty country. Corresponds to the attribute _Ctry_ in SPS/ISO-20022.
example: CH
AccountTransactionStructuredOrUnstructuredAddress:
title: Common Structured or Unstructured Address
description: Specifies the counterparty address (debtor address if transaction type = CRDT, creditor address if transaction type = DBIT).
type: object
properties:
structured:
$ref: '#/components/schemas/AccountTransactionStructuredAddress'
unstructured:
$ref: '#/components/schemas/AccountTransactionUnstructuredAddress'
AccountTransactionUnstructuredAddress:
title: Unstructured Address for Transactions
type: object
description: Specifies the details of the counterparty unstructured address.
required:
- addressLines
properties:
addressLines:
type: array
description: The counterparty address lines. Only four address lines allowed.
maxItems: 4
example:
- Robert Schneider SA
- Rue de la gare 24
items:
type: string
maxLength: 70
country:
type: string
description: The counterparty country. Corresponds to the attribute _Ctry_ in SPS/ISO-20022.
maxLength: 2
example: CH
Amount:
type: string
pattern: '^[0-9]{1,12}([.][0-9]{1,5})?$'
maxLength: 18
description: An amount. Corresponds to the attribute _Amt_ in SPS/ISO-20022.
example: '10.25'
BalanceCurrencyAmount:
title: Balance Currency-Amount
description: Specifies the requested account balance. Corresponds to the attribute _Bal_ in SPS/ISO-20022.
type: object
required:
- currency
- amount
properties:
currency:
$ref: '#/components/schemas/Currency'
description: The ISO currency three-letter code in which the balance and the account are held.
amount:
$ref: '#/components/schemas/Amount'
description: The amount of the requested account balance.
CommonAccountId:
type: string
pattern: '^[A-Za-z0-9](([A-Za-z0-9._]|-){0,254}[A-Za-z0-9]){0,1}$'
maxLength: 256
description: Unique identifier (UUID) of the account for which information shall be retrieved.
example: abc123_abcxyz.123789.abcxyz.abcxyz_abcxyz_abcxyz_abcxyz_ccccc_123abc
CommonClearingSystemMemberIdentification:
title: Common Clearing System Member Identification
type: object
description: Specifies the Information used to identify a member within a clearing system.
required:
- code
- memberId
properties:
code:
type: string
maxLength: 5
description: >
Identification code of a clearing system. Only "CHBCC" is permitted in Switzerland. Corresponds to the attribute
_ClrSysId ⇾ Cd_ in SPS/ISO-20022.
example: CHBCC
memberId:
type: string
maxLength: 35
description: >
The identification of a clearing system member. Clearing ID (Bank Code, "National Identifier") of the financial institution.
Corresponds to the attribute _ClrSysId ⇾ MmbId_ in SPS/ISO-20022.
example: '00230'
CommonErrorResponse:
title: Common Error Response
type: object
description: The common error response object.
properties:
type:
$ref: '#/components/schemas/CommonErrorType'
title:
type: string
description: The title of the common error response.
example: This is the general problem description
detail:
type: string
description: The details about the common error response.
example: Detailed problem description with respect to the current request, e.g., invalid account number format
instance:
type: string
description: The path to the corresponding resource.
example: path/to/corresponding/resource
CommonErrorType:
title: Common Error Type
type: string
description: Error Types for commonErrorResponse.
enum:
- /problems/INVALID_PAYLOAD
- /problems/MALFORMED_PAYLOAD
- /problems/INVALID_TOKEN
- /problems/EXPIRED_TOKEN