-
Notifications
You must be signed in to change notification settings - Fork 3
/
swagger.yaml
1903 lines (1849 loc) · 61.6 KB
/
swagger.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
swagger: '2.0'
info:
version: "2.0.0"
title: "Money Transfer Customer Online REST API"
contact:
email: "[email protected]"
license:
name: GreySystems
url: https://www.greysystems.eu/terms/
termsOfService: https://www.greysystems.eu/terms
x-logo:
url: http://www.greysystems.eu/wp-content/uploads/2017/07/logo-Grey-menu.png
background: "#FFFFFF"
description: |
# Introduction
The Money Transfer Customer Online (aka MTC) REST API is built on HTTP. Our API is RESTFul. It has predictable
resource URLs. It returns HTTP response codes to indicate errors. It also
accepts and returns JSON in the HTTP body. You can use your favorite
HTTP/REST library for your programming language to use MTC's APIs.
The API is offered as SaaS platform, that is a software licensing and delivery model in which software is licensed on a subscription basis and is centrally hosted
# Who we are?
Grey Systems is a well establish European IT Consulting company that specialises in working with financial institutions.
During the last years, we have developed "Push Money", a next level technology platform to provide instant online multichannel money transfer services and other financial services and products, outside of conventional banking channels.
Our clients are international MTO's and MNO's that demand solid Fintech expertise for their business operations.
Grey Systems is the best professional IT answer to real time remittance companies.
# Goal
The goal of the API is provide an API for customers to interact with the MTC Systems. This means that the API is intended to by used directly by customers, so all the operations assume that a customer is logged in the system, and will provide information based on that assumption.
This means that there is no possibility through this MTC Online REST API to query for information at other leven than the customer level, for instance, this API does not offer any method to provide reporting for all customers within a `PartnerSystem`. Please contact GreySystems teams for additional API
# Authentication
All MTC APIs, including this one, use [OpenId Connect](http://openid.net) protocol to authenticate customers. Specifically the security used is JWT tokens.
At functional level there are 2 types of tokens:
* **User Token**: Gets an `access_token` issued on behalf of a customer (end-user), and will identity the customer itself against our API. To get a customer access_token you have to implement the [Authorization Code Flow](https://www.keycloak.org/docs/3.3/server_admin/topics/sso-protocols/oidc.html).
![alt text](https://rograce.github.io/openid-connect-documentation/images/OIDCAuthCodeFlow.jpg "Logo Title Text 1")
* **Service Token**: Gets an `access_token` issued to a non end-user. Very useful for services that calls the API without an user logged in, background processes, etc... To get a Service token you have to implement the [Direct Access Grants](https://www.keycloak.org/docs/3.3/server_admin/topics/sso-protocols/oidc.html), which a REST based worflow to obtain programatically a token without user intervention.
**What kind of token do I have to use**?
* All API methods allow to use a **User Token**
* `TRANSFER-PAYMENT` methods allow both tokens (user one and service one). However if you call these methods with an **User Token** you will be able to manage only the transfers that belongs to the user of that token.
**How I use the tokens?**
As stated in the introduction, both tokens types are JWT tokens, and you should set that token in the HTTP `Authorization` Header of the API call in this way:
```
Authorization: Bearer {the_token}
```
# Common HTTP Error Responses
The MTC Rest API uses the following common HTTP status codes to communicate general issues or errors to the clients:
* HTTP **401** (Non authorized): The token provided is expired, inexistent or non-valid
* HTTP **403** (Forbidden): The customer is not allowed to perform the call
* HTTP **400** (Invalid Request): The request provided is invalid (request is not well formed, a mandatory field is not provided, etc..).
* HTTP **500** (Internal Server Error): Some internal component has failed to process your request. Please notify about this error to GreySystems team.
tags:
- name: "transfers"
description: "Manage transfers of a customer"
- name: "account"
description: "Manages the account of a customer"
- name: "beneficiaries"
description: "Manage beneficiaries of a customer"
- name: "transfer-payments"
description: Transfer payment related operations to manage the payments of the transfers
- name: "data-catalogs"
description: Informational data, cities, data catalogs for selectors, enums etc..
- name: "transfer-catalogs"
description: Transfer related useful catalogs for sending money (countries available, currencies, payment methods, etc..)
- name: "public-calculator"
description: Methods to be called without an user logged in, data returned is only informative.
paths:
/public-calculator/{idPartner}/estimate:
post:
tags:
- public-calculator
summary: Estimates prices
security: []
description: |
Estimate the prices and amounts for an specific conditions. Note that this is intented for public webpages, and no security is required.
The calculator allows 2 modes of calculation <br> <strong>Source Amount</strong> (request.sourceValue \> 0) -> The customer wants to know how much the beneficiary will receive and how must fees will be charged using a source amount <br><strong>Destination Amount</strong> (request.destinationValue \> 0) -> The customer wants to know how much he needs to send so that the beneficiary receives an specific destination amount <br><br> To determine the mode of the calculator just provide a sourceValue \> 0 or destinationValue \<0, but note that if both amounts are provided and are greater than 0, the calculator will raise an HTTP 400 error indicating that only one of them should be provided.
parameters:
- name: idPartner
in: path
required: true
type: integer
description: Value of idPartner (request to GS your value/s available)
- name: estimateRequest
in: body
required: true
schema:
$ref: '#/definitions/EstimateRequest'
responses:
200:
description: Operation Successful
schema:
type: array
items:
$ref: '#/definitions/Country'
400:
description: Invalid parameters, response contains detailed error
schema:
$ref: '#/definitions/Error'
/public-calculator/{idPartner}/destinationCountries:
get:
tags:
- public-calculator
summary: Destination countries available for a partner system
security: []
parameters:
- name: sourceCountry
in: query
required: true
type: string
description: isocode of the source country
- name: idPartner
in: path
required: true
type: integer
description: partner system id, request GS for this value
responses:
200:
description: Operation Successful
schema:
type: array
items:
$ref: '#/definitions/Country'
400:
description: Invalid parameters, response contains detailed error
schema:
$ref: '#/definitions/Error'
/public-calculator/{idPartner}/payoutPayers:
get:
tags:
- public-calculator
summary: Gets payout payers
security: []
parameters:
- name: idPartner
in: path
required: true
type: integer
- name: destinationCountry
in: query
type: string
required: true
description: the destination Country iso3
- name: sourceCountry
in: query
type: string
required: true
description: The source country iso3
- name: payoutMethodCode
in: query
type: string
required: true
description: The delivery method code
- name: payoutCurrency
in: query
type: string
required: true
description: The delivery currency
responses:
200:
description: Successfull operation
schema:
type: array
items:
$ref: '#/definitions/TransferPayer'
400:
description: Invalid Request. message attribute of response contains detailed information about the issue.
schema:
$ref: '#/definitions/Error'
/transfer-payment/{idTransfer}/cancel:
post:
tags:
- transfer-payments
summary: Cancels the transfer payment
description: |
This operation must be used when a payment gateway returns an invalid payment response.
**Be sure that the payment gateway response determines that the payment cannot be retried, as this operation is definitive. Once a transfer is cancelled; it cannot be un-cancelled. **
parameters:
- name: request
in: body
required: true
schema:
$ref: '#/definitions/TransferPaymentCancellationRequest'
- name: idTransfer
in: path
required: true
type: integer
responses:
204:
description: Operation successful. Transfer is cancelled.
404:
description: idTransfer does not exists
schema:
$ref: '#/definitions/Error'
409:
description: the transfer identified by idTransfer was already marked as payment-confirmed, cannot be cancelled due to a payment failure
schema:
$ref: '#/definitions/Error'
/transfer-payment/{idTransfer}/confirm:
post:
tags:
- transfer-payments
summary: Confirms the payment of a transfer
description: |
This operation must be used when a payment gateway returns an valid (authorised) payment response.
**Once this operation is called, the transfer can be paid inmeditaly in those destinations with online payment **
parameters:
- name: idTransfer
in: path
required: true
type: integer
- name: request
in: body
required: true
schema:
$ref: '#/definitions/TransferPaymentConfirmationRequest'
responses:
204:
description: Operation Successfull. Transfer's payment confirmed, and transfer ready to be paid at destination.
404:
description: idTransfer does not exists
409:
description: the transfer identified by idTransfer was already cancelled, so it cannot be marked as confirmed.
/transfer-payment/{idTransfer}:
post:
tags:
- transfer-payments
summary: Gets the payment of a transfer
description: |
It returns the registered payment information of a transfer
parameters:
- name: idTransfer
in: path
required: true
type: integer
responses:
200:
description: Operation Successful
schema:
$ref: '#/definitions/TransferPayment'
404:
description: idTransfer does not exists
/me:
get:
summary: Get Customer Account
description: Gets Customer data
tags:
- account
responses:
200:
description: Operation Successful
schema:
$ref: '#/definitions/CustomerAccount'
put:
summary: Modifies Customer Account
tags:
- account
parameters:
- name: account
required: true
in: body
schema:
$ref: '#/definitions/CustomerAccount'
responses:
204:
description: customer account modified correctly (no content is returned)
400:
description: Invalid Request. message attribute of response contains detailed information about the issue.
schema:
$ref: '#/definitions/Error'
/me/iddoc:
get:
summary: Gets customer's identity documents data
tags:
- account
responses:
200:
description: Operation Successful. If no documents have been found, and empty list will be returned
schema:
type: array
items:
$ref: '#/definitions/CustomerIdentityDocument'
post:
summary: Creates new customer identity document
tags:
- account
parameters:
- name: document
in: body
required: true
schema:
$ref: '#/definitions/CustomerIdentityDocument'
responses:
201:
description: Document successfully created
schema:
$ref: '#/definitions/CreateEntityResponse'
400:
description: Invalid Request. message attribute of response contains detailed information about the issue.
schema:
$ref: '#/definitions/Error'
/me/iddoc/{iddocument}:
get:
summary: Gets an identity document
tags:
- account
parameters:
- name: iddocument
in: path
required: true
type: number
responses:
200:
description: Document information
schema:
$ref: '#/definitions/CustomerIdentityDocument'
404:
description: iddocument has not been found
schema:
$ref: '#/definitions/Error'
put:
summary: Modify a customer identity document
tags:
- account
parameters:
- name: iddocument
in: path
required: true
type: number
- name: document
in: body
required: true
schema:
$ref: '#/definitions/CustomerIdentityDocument'
responses:
204:
description: Document modified correctly (no content response)
400:
description: Invalid Request. message attribute of response contains detailed information about the issue.
schema:
$ref: '#/definitions/Error'
/me/iddoc/{iddocument}/file:
get:
tags:
- account
produces:
- text/plain
summary: gets the image of a document
description: gets the image of a document as data-uri base64 encoded
parameters:
- name: iddocument
in: path
required: true
type: number
responses:
200:
description: image found
schema:
type: file
example: data:image/x-png;base64,iVBORw0KGgoAAAANSUhEUgAAAf ....
404:
description: No image found for the iddocument provided
post:
tags:
- account
summary: upload a new file to an existent iddocument
consumes:
- multipart/form-data
parameters:
- name: iddocument
in: path
required: true
type: integer
- name: file
in: formData
type: file
description: the file to upload
responses:
200:
description: file uploaded correctly
404:
description: the iddocument does not exists for this customer
/transfer/calculate:
post:
summary: calculator
description: The use of the calculator is required to calculate how much a transfer does it cost for a customer, the final exchange rate applied to the operation, fees, extra comissions, discounts, taxes, etc... </br> </br> The calculator allows 2 modes of calculation <br> <strong>Source Amount</strong> (request.sourceValue \> 0) -> The customer wants to know how much the beneficiary will receive and how must fees will be charged using a source amount <br><strong>Destination Amount</strong> (request.destinationValue \> 0) -> The customer wants to know how much he needs to send so that the beneficiary receives an specific destination amount <br><br> To determine the mode of the calculator just provide a sourceValue \> 0 or destinationValue \<0, but note that if both amounts are provided and are greater than 0, the calculator will raise an HTTP 400 error indicating that only one of them should be provided.
tags:
- transfers
parameters:
- name: calculatorRequest
in: body
required: true
schema:
$ref: '#/definitions/CalculatorRequest'
responses:
200:
description: calculation has been successfull
schema:
$ref: "#/definitions/CalculatorResponse"
400:
description: Invalid Request. message attribute of response contains detailed information about the issue.
schema:
$ref: '#/definitions/Error'
409:
description: Limits exceeded. At this point, the calculate avoids the calculation if some single limit is exceeded. Note that accumulated limits for customers and other customer-related limits and compliance rules are not checked
schema:
$ref: '#/definitions/Error'
/transfer/catalog/sendingPurpose:
get:
summary: Returns the list of available sending purposes for sending transfers
operationId: GetTransferSendingPurposes
tags:
- transfer-catalogs
responses:
200:
description: Successfull operation
schema:
type: array
items:
$ref: '#/definitions/TransferSendingReason'
/transfer/catalog/sourceCountries:
get:
summary: Get Source Countries
description: Returns the list of available source countries for the logged in customer to send money from
operationId: GetSourceCountries
tags:
- transfer-catalogs
responses:
200:
description: Successfull operation
schema:
type: array
items:
$ref: '#/definitions/Country'
/transfer/catalog/sourceCurrency:
get:
summary: Gets source currencies
description: Returns the list of available source currencies for the logged in customer to send money from the source country specified in the path
operationId: GetSourceCurrencies
parameters:
- name: sourceCountry
in: query
type: string
required: true
description: isocode 3 of the source country
tags:
- transfer-catalogs
responses:
200:
description: Successfull operation
schema:
type: array
items:
$ref: '#/definitions/Currency'
/transfer/catalog/destinationCountry:
get:
summary: Gets Available destination countries
description: Returns the list of available payment methods to pay a transfer (bank account, credit card, etc...).
operationId: GetDestinationCountries
parameters:
- name: sourceCountry
in: query
type: string
required: true
tags:
- transfer-catalogs
responses:
200:
description: Successfull operation
schema:
type: array
items:
$ref: '#/definitions/Country'
/transfer/catalog/paymentMethods:
get:
summary: Gets payment Methods
description: Returns the list of available payment methods to pay a transfer (bank account, credit card, etc...).
operationId: GetPaymentMethods
tags:
- transfer-catalogs
responses:
200:
description: Successfull operation
schema:
type: array
items:
$ref: '#/definitions/TransferPaymentMethod'
400:
description: Invalid Request. message attribute of response contains detailed information about the issue.
schema:
$ref: '#/definitions/Error'
/transfer/catalog/payoutMethods:
get:
summary: Gets payout Methods
description: Returns the list of available payout methods for a destination country
operationId: GetPayoutMethods
parameters:
- name: destinationCountry
in: query
type: string
required: true
tags:
- transfer-catalogs
responses:
200:
description: Successfull operation
schema:
type: array
items:
$ref: '#/definitions/TransferDeliveryMethod'
400:
description: Invalid Request. message attribute of response contains detailed information about the issue.
schema:
$ref: '#/definitions/Error'
/transfer/catalog/payoutCurrencies:
get:
summary: Gets payout Currencies
description: Returns the list of available delivery currencies for a payout method within a payout destination country
operationId: GetPayoutCurrencies
parameters:
- name: destinationCountry
in: query
type: string
required: true
- name: payoutMethodCode
in: query
type: string
required: true
description: The payout method code
tags:
- transfer-catalogs
responses:
200:
description: Successfull operation
schema:
type: array
items:
$ref: '#/definitions/Currency'
400:
description: Invalid Request. message attribute of response contains detailed information about the issue.
schema:
$ref: '#/definitions/Error'
/transfer/catalog/payoutPayers:
get:
summary: Gets payout payers
description: Returns the list of available delivery Payers for a destination country, using an specific payout method and a payout currency. Also it returns the rate offered by the destination payer for that conditions
operationId: GetPayers
parameters:
- name: destinationCountry
in: query
type: string
required: true
description: the destination Country iso3
- name: sourceCountry
in: query
type: string
required: true
description: The source country iso3
- name: payoutMethodCode
in: query
type: string
required: true
description: The delivery method code
- name: payoutCurrency
in: query
type: string
required: true
description: The delivery currency
tags:
- transfer-catalogs
responses:
200:
description: Successfull operation
schema:
type: array
items:
$ref: '#/definitions/TransferPayer'
400:
description: Invalid Request. message attribute of response contains detailed information about the issue.
schema:
$ref: '#/definitions/Error'
/transfer/catalog/payoutDestinations:
get:
tags:
- transfer-catalogs
summary: gets payout destinations
description: returns the list of available destination for a destination country, using an specific payout method, payout currency and payer.
operationId: GetDestinations
parameters:
- name: destinationCountry
in: query
type: string
required: true
description: the destination Country iso3
- name: sourceCountry
in: query
type: string
required: true
description: The source country iso3
- name: payoutMethodCode
in: query
type: string
required: true
description: The delivery method code
- name: payoutCurrency
in: query
type: string
required: true
description: The delivery currency
- name: payer
in: query
type: integer
required: true
description: The payer id
responses:
200:
description: list of available payers. Empty list if no destinations have been found
schema:
$ref: '#/definitions/PayerDestination'
400:
description: Invalid Request. message attribute of response contains detailed information about the issue.
schema:
$ref: '#/definitions/Error'
/data/idDocType:
get:
summary: Gets the identity document types available for a customer
tags:
- data-catalogs
responses:
200:
description: List of all the available identity documents
schema:
type: array
items:
$ref: '#/definitions/IdentityDocumentType'
/data/country:
get:
summary: Get the entire list of countries and its associated data
operationId: getCountries
tags:
- data-catalogs
responses:
200:
description: List of all the countries of the world
schema:
type: array
items:
$ref: '#/definitions/Country'
/data/country/{iso3}:
get:
summary: Gets a single country using the isocode of the country
operationId: getCountryById
tags:
- data-catalogs
parameters:
- name: iso3
in: path
required: true
description: the isocode alpha 3 of the country
type: string
responses:
200:
description: success retrieval of country
schema:
$ref: '#/definitions/Country'
404:
description: country not found
schema:
$ref: '#/definitions/Error'
/data/currency:
get:
summary: Get the entire list of currencies and its associated data
operationId: getCurrencies
tags:
- data-catalogs
responses:
200:
description: List of all the currencies available
schema:
type: array
items:
$ref: '#/definitions/Currency'
/data/currency/{iso}:
get:
summary: Gets a single currency using the isocode of the currency
operationId: getCurrencyByIso
tags:
- data-catalogs
parameters:
- name: iso
in: path
required: true
description: the isocode identifier of the currency
type: string
responses:
200:
description: success retrieval of country
schema:
$ref: '#/definitions/Currency'
404:
description: currency not found
schema:
$ref: '#/definitions/Error'
/data/country/{countryIso3}/city:
get:
summary: Search cities of the specified country
operationId: SearchCities
tags:
- data-catalogs
parameters:
- name: countryIso3
in: path
required: true
description: the isocode identifier of the currency
type: string
- name: name
in: query
required: true
description: search term to look for cities within country specifiec by countryIso3 parameter. Min-length of value should be 3
type: string
responses:
200:
description: Success, array of cities, or empty array if none have been found
schema:
type: array
items:
$ref: "#/definitions/City"
404:
description: countryIso3 provided is not found
schema:
$ref: '#/definitions/Error'
400:
description: Invalid Request. message attribute of response contains detailed information about the issue.
schema:
$ref: '#/definitions/Error'
/transfer:
post:
summary: Sends a transfer
description: |
Operation to send a transfer to the system. The mandatory information of the request can be found in the SendTransferRequest data scheme. However please take into account that depending on the configuration requested to GreySystems, additional fields can be marked as mandatory, and thus the system can reject a transfer if some mandatory fields are not provided (as 400 HTTP error).
<br>
**Additional Validations**
* bankAccountId is required in case of the destination of the transfer is to a bank account
* You have to provide `srcAmount` or `destAmount`, but do not provide the 2 values in the same request.
**Compliance Considerations**
When some compliance rule is broken, an HTTP 409 (Conflict) error is returned with information about what specific rule has been broken , and additional information of the broken rule, so that the customer can ammend the transfer (if possible) to then send money.
<br>
As compliance rules are configured ad-hoc for your company, GreySystems will provide extra information about how to handle specifically all rules configured for you.
operationId: sendTransfer
parameters:
- name: transferRequest
in: body
required: true
schema:
$ref: '#/definitions/SendTransferRequest'
tags:
- transfers
responses:
201:
description: The transfer has been properly sent. Internal id of the transfer just sent is returned. This is the id you have to use to query all the data of transfer, to perform payment related operations etc... Is it important to note that this id should not be shown to users, its purpose is technical and identifies uniquely a transfer within the system at technical level.
schema:
$ref: '#/definitions/CreateEntityResponse'
409:
description: A compliance rule has been broken
schema:
$ref: '#/definitions/ComplianceErrorResponse'
400:
description: Invalid Request. message attribute of response contains detailed information about the issue.
schema:
$ref: '#/definitions/Error'
/transfer/{id}:
get:
summary: Get a transfer by its id
operationId: getTransfer
tags:
- transfers
parameters:
- name: id
in: path
required: true
description: The id of the transfer
type: integer
responses:
200:
description: The transfer object if found and belongs to the current user logged
schema:
$ref: '#/definitions/Transfer'
404:
description: no transfer has been found using the id provided as request parameter
schema:
$ref: '#/definitions/Error'
/transfer/search:
post:
summary: Search transfers
operationId: searchTransfers
tags:
- transfers
parameters:
- name: search request parameters
in: body
required: true
schema:
$ref: '#/definitions/SearchTransferRequest'
responses:
200:
description: An array containing the results (paginated) or empty array if no results have been found
schema:
type: array
items:
$ref: '#/definitions/TransferSearchResponse'
/beneficiary:
get:
summary: List all beneficiaries
operationId: listBeneficiaries
tags:
- beneficiaries
responses:
'200':
description: An array with all the beneficiaries of the customer
schema:
type: array
items:
$ref: "#/definitions/Beneficiary"
post:
summary: Create a beneficiary
operationId: createBeneficiary
description: firstName, lastName and telephone1 are mandatory. id property is ignored in case it's provided
tags:
- beneficiaries
parameters:
- name: beneficiary
in: body
required: true
schema:
$ref: '#/definitions/Beneficiary'
responses:
'201':
description: Beneficiary created successfully, with the id generated by the system that unique identifies the beneficiary
schema:
$ref: "#/definitions/CreateEntityResponse"
/beneficiary/{beneficiaryId}:
get:
summary: gets a beneficiary
description: returns an specific benefiary
tags:
- beneficiaries
parameters:
- name: beneficiaryId
in: path
required: true
type: integer
responses:
200:
description: Valid beneficiaryID, response contains the beneficiary info
schema:
$ref: '#/definitions/Beneficiary'
404:
description: The beneficiaryId does not exists or does not belong to the current customer logged in
put:
summary: Modifies a beneficiary
description: Modifies an existent beneficiary
tags:
- beneficiaries
parameters:
- name: beneficiaryId
in: path
required: true
type: integer
responses:
204:
description: beneficiary has been modified, no response is returned (no content)
404:
description: The beneficiaryID does not exists or does not belong to the current customer logged in
schema:
$ref: '#/definitions/Error'
/beneficiary/{beneficiaryId}/bankAccount:
get:
summary: List all saved bank accounts for a beneficiary
description: It will retrieve all the accounts saved for a beneficiary. If the beneficiary does not have any bank account saved, an empty list will be returned. <br><br> Note that the 404 result is reserved for the case that a beneficiaryId does not exists, while returning an empty array means that the beneficiaryId is valid but he has not saved any account yet.
operationId: listBeneficiaryBankAccounts
tags:
- beneficiaries
parameters:
- name: beneficiaryId
type: integer
in: path
required: true
responses:
404:
description: The beneficiary provided does not exists or does not belong to the customer logged in.
'200':
description: An array with all the bank accounts of the beneficiary
schema:
type: array
items:
$ref: "#/definitions/BeneficiaryBankAccount"
post:
summary: Create a beneficiary bank account
operationId: createBeneficiaryBankAccount
description: Creates a beneficiary bank account for an specific beneficiary. <br><br> Note that this operation always create a bankAccount
tags:
- beneficiaries
parameters:
- name: beneficiaryId
type: integer
in: path
required: true
- name: bankAccount
in: body
required: true
schema:
$ref: '#/definitions/CreateModifyBeneficiaryBankAccount'
responses:
'201':
description: BankAccount have been created. The id of the created bank account is returned
schema:
$ref: "#/definitions/CreateEntityResponse"
'404':
description: The beneficiaryId does not exists or it does not belongs to the current user logged in.
schema:
$ref: '#/definitions/Error'
400:
description: Invalid Request. message attribute of response contains detailed information about the issue.
schema:
$ref: '#/definitions/Error'
/beneficiary/{beneficiaryId}/bankAccount/{bankAccountId}:
get:
summary: Gets a beneficiary bank account
operationId: getBeneficiaryBankAccount
description: Gets an specific (existent) beneficiary bank account using its id
tags:
- beneficiaries
parameters:
- name: beneficiaryId
type: integer
in: path
required: true
- name: bankAccountId
type: integer
in: path
required: true
responses:
200:
description: Returns the beneficiary bank account id
schema:
$ref: '#/definitions/BeneficiaryBankAccount'
404:
description: Beneficiary bank account not found or BeneficiaryId does not belong to current user logged in
schema:
$ref: '#/definitions/Error'
put:
summary: Modifies a beneficiary bank account
operationId: modifyBeneficiaryBankAccount
description: Modifies an already created beneficiary bank account for an specific beneficiary. <br><br>
tags:
- beneficiaries
parameters: