-
Notifications
You must be signed in to change notification settings - Fork 13
/
accounts-bulk.raml
126 lines (121 loc) · 3.68 KB
/
accounts-bulk.raml
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
#%RAML 1.0
title: Accounts
version: v1
baseUri: http://github.com/org/folio/mod-feesfines
documentation:
- title: Accounts bulk actions API
content: This documents the API calls for bulk actions against accounts
types:
errors: !include raml-util/schemas/errors.schema
bulkCheckActionRequest: !include actions/bulkCheckActionRequest.json
bulkCheckActionResponse: !include actions/bulkCheckActionResponse.json
defaultBulkActionRequest: !include actions/defaultBulkActionRequest.json
cancelBulkActionRequest: !include actions/cancelBulkActionRequest.json
bulkActionSuccessResponse: !include actions/bulkActionSuccessResponse.json
bulkActionFailureResponse: !include actions/bulkActionFailureResponse.json
traits:
validate: !include raml-util/traits/validation.raml
resourceTypes:
bulk-action:
description: "Performs an action on multiple accounts"
post:
is: [validate]
description: "Perform an action"
body:
application/json:
type: defaultBulkActionRequest
responses:
201:
description: "Action was performed successfully"
body:
application/json:
type: bulkActionSuccessResponse
404:
description: "Fee/fine was not found"
body:
text/plain:
example: "Fee/fine was not found"
422:
description: "Action is not allowed"
body:
application/json:
type: bulkActionFailureResponse
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error, please contact administrator"
bulk-check-action:
description: "Checks if the requested action is allowed"
post:
description: "Checks if an action is allowed"
body:
application/json:
type: bulkCheckActionRequest
responses:
200:
description: "Action is allowed"
body:
application/json:
type: bulkCheckActionResponse
404:
description: "Fee/fine was not found"
body:
text/plain:
example: "Fee/fine was not found"
422:
description: "Action is not allowed"
body:
application/json:
type: bulkCheckActionResponse
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error"
/accounts-bulk:
/check-pay:
type: bulk-check-action
/check-transfer:
type: bulk-check-action
/check-waive:
type: bulk-check-action
/check-refund:
type: bulk-check-action
/pay:
type: bulk-action
/waive:
type: bulk-action
/transfer:
type: bulk-action
/refund:
type: bulk-action
/cancel:
description: "Performs an action on multiple accounts"
post:
is: [validate]
description: "Perform an action"
body:
application/json:
type: cancelBulkActionRequest
responses:
201:
description: "Action was performed successfully"
body:
application/json:
type: bulkActionSuccessResponse
404:
description: "Fee/fine was not found"
body:
text/plain:
example: "Fee/fine was not found"
422:
description: "Action is not allowed"
body:
application/json:
type: bulkActionFailureResponse
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error, please contact administrator"