-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtransaction.raml
More file actions
117 lines (109 loc) · 4.43 KB
/
transaction.raml
File metadata and controls
117 lines (109 loc) · 4.43 KB
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
#%RAML 1.0
title: "mod-finance"
baseUri: https://github.com/folio-org/mod-finance
version: v6.0
documentation:
- title: mod-finance (Transactions)
content: <b>CRUD APIs used to manage transactions.</b>
types:
errors: !include raml-util/schemas/errors.schema
transaction: !include acq-models/mod-finance/schemas/transaction.json
transaction-collection: !include acq-models/mod-finance/schemas/transaction_collection.json
transaction-total: !include acq-models/mod-finance/schemas/transaction_total.json
transaction-total-collection: !include acq-models/mod-finance/schemas/transaction_total_collection.json
transaction-total-batch: !include acq-models/mod-finance/schemas/transaction_total_batch.json
batch: !include acq-models/mod-finance/schemas/batch.json
UUID:
type: string
pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
traits:
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
validate: !include raml-util/traits/validation.raml
resourceTypes:
post-with-201: !include rtypes/post-json-201.raml
get-only: !include raml-util/rtypes/get-only-with-json-response.raml
collection-item-get: !include raml-util/rtypes/item-collection-get-with-json-response.raml
/finance:
/allocations:
displayName: Create a transaction allocation
description: Create an allocation; DEPRECATED - use batch-all-or-nothing instead
type:
post-with-201:
requestSchema: transaction
responseSchema: transaction
requestExample: !include acq-models/mod-finance/examples/transaction_allocation.sample
responseExample: !include acq-models/mod-finance/examples/transaction_allocation.sample
is: [validate]
post:
description: Create an allocation by transaction; DEPRECATED - use batch-all-or-nothing instead
/transfers:
displayName: Create a transaction transfer
description: Create a transfer; DEPRECATED - use batch-all-or-nothing instead
type:
post-with-201:
requestSchema: transaction
responseSchema: transaction
requestExample: !include acq-models/mod-finance/examples/transaction_transfer.sample
responseExample: !include acq-models/mod-finance/examples/transaction_transfer.sample
is: [validate]
post:
description: Create a transfer by transaction; DEPRECATED - use batch-all-or-nothing instead
/transactions:
displayName: Transactions
description: Transaction collection
type:
get-only:
schema: transaction-collection
exampleCollection: !include acq-models/mod-finance/schemas/transaction_collection.json
get:
is: [
searchable: {description: "with valid searchable fields: for example currency = USD", example: "currency=USD"},
pageable
]
responses:
401:
description: "Not authorized to perform requested action"
body:
text/plain:
example: |
"unable to list instances -- unauthorized"
application/json:
example:
strict: false
value: !include raml-util/examples/errors.sample
/{id}:
displayName: Transaction instance
description: Get a specific Transaction instance
type:
collection-item-get:
schema: transaction
exampleItem: !include acq-models/mod-finance/schemas/transaction.json
/batch-all-or-nothing:
displayName: Batch processing of transactions
post:
description: Process actions on transactions in a single all-or-nothing operation
is: [validate]
body:
application/json:
type: batch
example:
strict: false
value: !include acq-models/mod-finance/examples/batch.sample
responses:
204:
description: "Transactions processed successfully"
400:
description: "Bad request, for instance with the syntax. Details of the error provided in the response."
body:
application/json:
example:
strict: false
value: !include raml-util/examples/errors.sample
500:
description: "Internal server error"
body:
application/json:
example:
strict: false
value: !include raml-util/examples/errors.sample