forked from OpenBankingUK/read-write-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcallback-urls-swagger.yaml
455 lines (452 loc) · 12.5 KB
/
callback-urls-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
swagger: '2.0'
info:
title: Event Notification API Specification - ASPSP Endpoints
description: Swagger for Event Notification API Specification - ASPSP Endpoints
termsOfService: 'https://www.openbanking.org.uk/terms'
contact:
name: Service Desk
email: [email protected]
license:
name: open-licence
url: 'https://www.openbanking.org.uk/open-licence'
version: v3.1.6
basePath: /open-banking/v3.1
schemes:
- https
consumes:
- application/json; charset=utf-8
- application/jose+jwe
produces:
- application/json; charset=utf-8
- application/jose+jwe
paths:
/callback-urls:
post:
summary: Create a callback URL
tags:
- Callback URLs
parameters:
- $ref: '#/parameters/OBCallbackUrl1Param'
- $ref: '#/parameters/x-fapi-interaction-id-Param'
- $ref: '#/parameters/AuthorizationParam'
- $ref: '#/parameters/x-jws-signature-Param'
responses:
'201':
$ref: '#/responses/201CallbackUrlsCreated'
'400':
$ref: '#/responses/400ErrorResponse'
'401':
$ref: '#/responses/401ErrorResponse'
'403':
$ref: '#/responses/403ErrorResponse'
'405':
$ref: '#/responses/405ErrorResponse'
'406':
$ref: '#/responses/406ErrorResponse'
'415':
$ref: '#/responses/415ErrorResponse'
'429':
$ref: '#/responses/429ErrorResponse'
'500':
$ref: '#/responses/500ErrorResponse'
security:
- TPPOAuth2Security:
- accounts
- fundsconfirmations
- payments
get:
summary: Read all callback URLs
tags:
- Callback URLs
parameters:
- $ref: '#/parameters/x-fapi-interaction-id-Param'
- $ref: '#/parameters/AuthorizationParam'
responses:
'200':
$ref: '#/responses/200CallbackUrlsRead'
'400':
$ref: '#/responses/400ErrorResponse'
'401':
$ref: '#/responses/401ErrorResponse'
'403':
$ref: '#/responses/403ErrorResponse'
'404':
$ref: '#/responses/404ErrorResponse'
'405':
$ref: '#/responses/405ErrorResponse'
'406':
$ref: '#/responses/406ErrorResponse'
'429':
$ref: '#/responses/429ErrorResponse'
'500':
$ref: '#/responses/500ErrorResponse'
security:
- TPPOAuth2Security:
- accounts
- fundsconfirmations
- payments
'/callback-urls/{CallbackUrlId}':
put:
summary: Amend a callback URI
tags:
- Callback URLs
parameters:
- $ref: '#/parameters/CallbackUrlId'
- $ref: '#/parameters/OBCallbackUrl1Param'
- $ref: '#/parameters/x-fapi-interaction-id-Param'
- $ref: '#/parameters/AuthorizationParam'
- $ref: '#/parameters/x-jws-signature-Param'
responses:
'200':
$ref: '#/responses/200CallbackUrlsChanged'
'400':
$ref: '#/responses/400ErrorResponse'
'401':
$ref: '#/responses/401ErrorResponse'
'403':
$ref: '#/responses/403ErrorResponse'
'404':
$ref: '#/responses/404ErrorResponse'
'405':
$ref: '#/responses/405ErrorResponse'
'406':
$ref: '#/responses/406ErrorResponse'
'415':
$ref: '#/responses/415ErrorResponse'
'429':
$ref: '#/responses/429ErrorResponse'
'500':
$ref: '#/responses/500ErrorResponse'
security:
- TPPOAuth2Security:
- accounts
- fundsconfirmations
- payments
delete:
summary: Delete a callback URI
tags:
- Callback URLs
parameters:
- $ref: '#/parameters/CallbackUrlId'
- $ref: '#/parameters/x-fapi-interaction-id-Param'
- $ref: '#/parameters/AuthorizationParam'
responses:
'204':
$ref: '#/responses/204CallbackUrlsDeleted'
'400':
$ref: '#/responses/400ErrorResponse'
'401':
$ref: '#/responses/401ErrorResponse'
'403':
$ref: '#/responses/403ErrorResponse'
'404':
$ref: '#/responses/404ErrorResponse'
'405':
$ref: '#/responses/405ErrorResponse'
'406':
$ref: '#/responses/406ErrorResponse'
'429':
$ref: '#/responses/429ErrorResponse'
'500':
$ref: '#/responses/500ErrorResponse'
security:
- TPPOAuth2Security:
- accounts
- fundsconfirmations
- payments
parameters:
OBCallbackUrl1Param:
in: body
name: OBCallbackUrl1Param
description: Create an Callback URI
required: true
schema:
$ref: '#/definitions/OBCallbackUrl1'
CallbackUrlId:
name: CallbackUrlId
in: path
description: CallbackUrlId
required: true
type: string
x-fapi-interaction-id-Param:
in: header
name: x-fapi-interaction-id
type: string
required: false
description: An RFC4122 UID used as a correlation id.
AuthorizationParam:
in: header
name: Authorization
type: string
required: true
description: 'An Authorisation Token as per https://tools.ietf.org/html/rfc6750'
x-jws-signature-Param:
in: header
name: x-jws-signature
type: string
required: true
description: Header containing a detached JWS signature of the body of the payload.
responses:
200CallbackUrlsRead:
description: An array of callback URLs
schema:
$ref: '#/definitions/OBCallbackUrlsResponse1'
headers:
x-jws-signature:
type: string
description: Header containing a detached JWS signature of the body of the payload.
201CallbackUrlsCreated:
description: Callback URL created
schema:
$ref: '#/definitions/OBCallbackUrlResponse1'
headers:
x-jws-signature:
type: string
description: Header containing a detached JWS signature of the body of the payload.
200CallbackUrlsChanged:
description: Callback URL changed
schema:
$ref: '#/definitions/OBCallbackUrlResponse1'
headers:
x-jws-signature:
type: string
description: Header containing a detached JWS signature of the body of the payload.
204CallbackUrlsDeleted:
description: Callback URL changed
400ErrorResponse:
description: Bad request
schema:
$ref: '#/definitions/OBErrorResponse1'
401ErrorResponse:
description: Unauthorized
403ErrorResponse:
description: Forbidden
404ErrorResponse:
description: Not found
405ErrorResponse:
description: Method Not Allowed
406ErrorResponse:
description: Not Acceptable
415ErrorResponse:
description: Unsupported Media Type
429ErrorResponse:
description: Too Many Requests
headers:
Retry-After:
description: Number in seconds to wait
type: integer
500ErrorResponse:
description: Internal Server Error
schema:
$ref: '#/definitions/OBErrorResponse1'
securityDefinitions:
TPPOAuth2Security:
type: oauth2
flow: application
tokenUrl: 'https://authserver.example/token'
scopes:
accounts: Ability to read Accounts information
fundsconfirmations: Ability to confirm funds
payments: Generic payment scope
description: TPP client credential authorisation flow with the ASPSP
definitions:
OBCallbackUrl1:
type: object
properties:
Data:
$ref: '#/definitions/OBCallbackUrlData1'
required:
- Data
additionalProperties: false
OBCallbackUrlData1:
type: object
properties:
Url:
description: >-
Callback URL for a TPP hosted service. Will be used by ASPSPs, in
conjunction with the resource name, to construct a URL to send event
notifications to.
type: string
Version:
description: Version for the event notification.
type: string
minLength: 1
maxLength: 10
required:
- Url
- Version
additionalProperties: false
OBCallbackUrlResponse1:
type: object
properties:
Data:
$ref: '#/definitions/OBCallbackUrlResponseData1'
Links:
$ref: '#/definitions/Links'
Meta:
$ref: '#/definitions/Meta'
required:
- Data
- Links
- Meta
additionalProperties: false
OBCallbackUrlResponseData1:
type: object
properties:
CallbackUrlId:
description: >-
Unique identification as assigned by the ASPSP to uniquely identify
the callback url resource.
type: string
minLength: 1
maxLength: 40
Url:
description: >-
Callback URL for a TPP hosted service. Will be used by ASPSPs, in
conjunction with the resource name, to construct a URL to send event
notifications to.
type: string
Version:
description: Version for the event notification.
type: string
minLength: 1
maxLength: 10
required:
- CallbackUrlId
- Url
- Version
additionalProperties: false
OBCallbackUrlsResponse1:
type: object
properties:
Data:
$ref: '#/definitions/OBCallbackUrlsResponseData1'
Links:
$ref: '#/definitions/Links'
Meta:
$ref: '#/definitions/Meta'
required:
- Data
- Links
- Meta
additionalProperties: false
OBCallbackUrlsResponseData1:
type: object
properties:
CallbackUrl:
items:
$ref: '#/definitions/OBCallbackUrlResponseData1'
type: array
additionalProperties: false
OBError1:
type: object
properties:
ErrorCode:
description: 'Low level textual error code, e.g., UK.OBIE.Field.Missing'
type: string
minLength: 1
maxLength: 128
Message:
description: >-
A description of the error that occurred. e.g., 'A mandatory field
isn't supplied' or 'RequestedExecutionDateTime must be in future'
OBIE doesn't standardise this field
type: string
minLength: 1
maxLength: 500
Path:
description: >-
Recommended but optional reference to the JSON Path of the field with
error, e.g., Data.Initiation.InstructedAmount.Currency
type: string
minLength: 1
maxLength: 500
Url:
description: >-
URL to help remediate the problem, or provide more information, or to
API Reference, or help etc
type: string
required:
- ErrorCode
- Message
additionalProperties: false
minProperties: 1
OBErrorResponse1:
description: >-
An array of detail error codes, and messages, and URLs to documentation to
help remediation.
type: object
properties:
Code:
description: 'High level textual error code, to help categorize the errors.'
type: string
minLength: 1
maxLength: 40
Id:
description: >-
A unique reference for the error instance, for audit purposes, in case
of unknown/unclassified errors.
type: string
minLength: 1
maxLength: 40
Message:
description: >-
Brief Error message, e.g., 'There is something wrong with the request
parameters provided'
type: string
minLength: 1
maxLength: 500
Errors:
items:
$ref: '#/definitions/OBError1'
type: array
minItems: 1
required:
- Code
- Message
- Errors
additionalProperties: false
ISODateTime:
description: >-
All dates in the JSON payloads are represented in ISO 8601 date-time
format.
All date-time fields in responses must include the timezone. An example is
below:
2017-04-05T10:43:07+00:00
type: string
format: date-time
Links:
type: object
description: Links relevant to the payload
properties:
Self:
type: string
format: uri
First:
type: string
format: uri
Prev:
type: string
format: uri
Next:
type: string
format: uri
Last:
type: string
format: uri
additionalProperties: false
required:
- Self
Meta:
title: MetaData
type: object
description: Meta Data relevant to the payload
properties:
TotalPages:
type: integer
format: int32
FirstAvailableDateTime:
$ref: '#/definitions/ISODateTime'
LastAvailableDateTime:
$ref: '#/definitions/ISODateTime'
additionalProperties: false