mod-finance-storage version v4
https://github.com/folio-org/mod-finance-storage
mod-finance-storage (Transactions)
Read API used to manage transaction totals.
/finance-storage/transaction-totals
Entity representing a transaction-total
Get list of transaction totals
get /finance-storage/transaction-totals
Get list of transaction totals
Query Parameters
- query: (string)
A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.
with valid searchable fields: for example code
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode ["code", "MEDGRANT", "="]
- totalRecords: (string - default: auto - pattern: exact|estimated|none|auto)
How to calculate the totalRecords property. "exact" for the correct number, "estimated" for an estimation, "auto" to automatically select "exact" or "estimated", "none" for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
none
- offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)
Skip over a number of elements by specifying an offset value for the query
Example:
0
- limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)
Limit the number of elements returned in the response
Example:
10
HTTP status code 200
Returns item with a given ID
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A collection of transaction totals",
"type": "object",
"properties": {
"transactionTotals": {
"description": "The list of objects contained in this collection",
"type": "array",
"id": "transactionTotals",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A financial transaction total",
"javaName": "transactionTotal",
"properties": {
"fiscalYearId": {
"description": "UUID of the fiscal year that the transaction is taking place in",
"$schema": "http://json-schema.org/draft-04/schema#",
"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}$"
},
"transactionType": {
"description": "This describes the type of transaction",
"enum": [
"Allocation",
"Credit",
"Encumbrance",
"Payment",
"Pending payment",
"Rollover transfer",
"Transfer"
],
"type": "string"
},
"fromFundId": {
"description": "UUID of the fund money is moving from",
"$schema": "http://json-schema.org/draft-04/schema#",
"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}$"
},
"toFundId": {
"description": "UUID of the fund money is moving to",
"$schema": "http://json-schema.org/draft-04/schema#",
"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}$"
},
"amount": {
"description": "The amount of this transaction",
"type": "number"
}
},
"required": [
"fiscalYearId",
"transactionType",
"fromFundId",
"toFundId",
"amount"
],
"additionalProperties": true
}
},
"totalRecords": {
"description": "The number of objects in this collection",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"transactionTotals",
"totalRecords"
]
}
Example:
{
"transactionTotals": [
{
"fiscalYearId": "4438bc3b-4b4a-4e5e-9886-5f69b48a7a32",
"transactionType": "Allocation",
"currency": "USD",
"fromFundId": "27f27438-3197-4281-a353-511829421d6e",
"toFundId": "2e51c019-97f3-4523-87e9-59250e3b48bc",
"amount": 50000
},
{
"fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e",
"transactionType": "Transfer",
"currency": "USD",
"fromFundId": "7fbd5d84-62d1-44c6-9c45-6cb173998bbd",
"toFundId": "69640328-788e-43fc-9c3c-af39e243f3b7",
"amount": 1000
}
],
"totalRecords": 2
}
HTTP status code 400
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Body
Media type: text/plain
Type: any
Example:
"unable to list transaction-totals -- malformed parameter 'query', syntax error at column 6"
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
"unable to list transaction-totals -- unauthorized"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"transaction-total not found"
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator