mod-finance-storage version v1
https://github.com/folio-org/mod-finance-storage
mod-finance-storage (Budget expense classes)
CRUD APIs used to manage budget-expense-class records.
/finance-storage/budget-expense-classes
Collection of budget-expense-class items.
Get list of budget-expense-classes
Create a new budget-expense-class item.
get /finance-storage/budget-expense-classes
Get list of budget-expense-classes
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: e.g.
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode ["name", "Electronic", "="]
- 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
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
HTTP status code 200
Returns a list of budget-expense-class items
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A collection of budget expense class records",
"type": "object",
"properties": {
"budgetExpenseClasses": {
"description": "The list of budget expense class objects contained in this collection",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Budget expense class mapping schema",
"extends": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number prefix",
"type": "object",
"javaName": "entity",
"properties": {
"id": {
"description": "UUID identifying this entity",
"$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}$"
}
},
"additionalProperties": false
},
"properties": {
"id": {
"description": "UUID of the expense class record",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"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}$"
},
"budgetId": {
"description": "UUID of the budget record",
"$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}$"
},
"expenseClassId": {
"description": "UUID of the expense class record",
"$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}$"
},
"status": {
"description": "Status for expense class within the budget ",
"type": "string",
"enum": [
"Active",
"Inactive"
],
"default": "Active"
}
},
"additionalProperties": false,
"required": [
"budgetId",
"expenseClassId"
]
}
},
"totalRecords": {
"description": "The number of objects contained in this collection",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"budgetExpenseClasses",
"totalRecords"
]
}
Example:
{
"budgetExpenseClasses": [
{
"id": "9e662186-7d3e-4732-baaa-93967ccc597e",
"budgetId": "47ac60b4-159d-4e1c-9acb-8293df67d16d",
"expenseClassId": "1bcc3247-99bf-4dca-9b0f-7bc51a2998c2",
"status": "Active"
}
],
"totalRecords": 1
}
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 budget-expense-classes -- 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 budget-expense-classes -- unauthorized
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
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
post /finance-storage/budget-expense-classes
Create a new budget-expense-class item.
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Budget expense class mapping schema",
"type": "object",
"extends": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number prefix",
"type": "object",
"javaName": "entity",
"properties": {
"id": {
"description": "UUID identifying this entity",
"$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}$"
}
},
"additionalProperties": false
},
"properties": {
"id": {
"description": "UUID of the expense class record",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"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}$"
},
"budgetId": {
"description": "UUID of the budget record",
"$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}$"
},
"expenseClassId": {
"description": "UUID of the expense class record",
"$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}$"
},
"status": {
"description": "Status for expense class within the budget ",
"type": "string",
"enum": [
"Active",
"Inactive"
],
"default": "Active"
}
},
"additionalProperties": false,
"required": [
"budgetId",
"expenseClassId"
]
}
Example:
{
"id": "9e662186-7d3e-4732-baaa-93967ccc597e",
"budgetId": "47ac60b4-159d-4e1c-9acb-8293df67d16d",
"expenseClassId": "1bcc3247-99bf-4dca-9b0f-7bc51a2998c2",
"status": "Active"
}
HTTP status code 201
Returns a newly created item, with server-controlled fields like 'id' populated
Headers
- Location: required(string)
URI to the created budget-expense-class item
Body
Media type: application/json
Type: any
Example:
{
"id": "9e662186-7d3e-4732-baaa-93967ccc597e",
"budgetId": "47ac60b4-159d-4e1c-9acb-8293df67d16d",
"expenseClassId": "1bcc3247-99bf-4dca-9b0f-7bc51a2998c2",
"status": "Active"
}
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 add budget-expense-class -- malformed JSON at 13:3"
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to create budget-expense-classes -- unauthorized
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
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
Entity representing a budget-expense-class
Retrieve budget-expense-class item with given {budget-expense-classId}
Delete budget-expense-class item with given {budget-expense-classId}
Update budget-expense-class item with given {budget-expense-classId}
get /finance-storage/budget-expense-classes/{id}
Retrieve budget-expense-class item with given {budget-expense-classId}
URI Parameters
- id: required(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}$)
The UUID of a budget-expense-class
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
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": "Budget expense class mapping schema",
"type": "object",
"extends": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number prefix",
"type": "object",
"javaName": "entity",
"properties": {
"id": {
"description": "UUID identifying this entity",
"$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}$"
}
},
"additionalProperties": false
},
"properties": {
"id": {
"description": "UUID of the expense class record",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"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}$"
},
"budgetId": {
"description": "UUID of the budget record",
"$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}$"
},
"expenseClassId": {
"description": "UUID of the expense class record",
"$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}$"
},
"status": {
"description": "Status for expense class within the budget ",
"type": "string",
"enum": [
"Active",
"Inactive"
],
"default": "Active"
}
},
"additionalProperties": false,
"required": [
"budgetId",
"expenseClassId"
]
}
Example:
{
"id": "9e662186-7d3e-4732-baaa-93967ccc597e",
"budgetId": "47ac60b4-159d-4e1c-9acb-8293df67d16d",
"expenseClassId": "1bcc3247-99bf-4dca-9b0f-7bc51a2998c2",
"status": "Active"
}
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"budget-expense-class not found"
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
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
delete /finance-storage/budget-expense-classes/{id}
Delete budget-expense-class item with given {budget-expense-classId}
URI Parameters
- id: required(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}$)
The UUID of a budget-expense-class
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
HTTP status code 204
Item deleted successfully
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 delete budget-expense-class -- constraint violation"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"budget-expense-class not found"
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
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
put /finance-storage/budget-expense-classes/{id}
Update budget-expense-class item with given {budget-expense-classId}
URI Parameters
- id: required(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}$)
The UUID of a budget-expense-class
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Budget expense class mapping schema",
"type": "object",
"extends": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number prefix",
"type": "object",
"javaName": "entity",
"properties": {
"id": {
"description": "UUID identifying this entity",
"$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}$"
}
},
"additionalProperties": false
},
"properties": {
"id": {
"description": "UUID of the expense class record",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"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}$"
},
"budgetId": {
"description": "UUID of the budget record",
"$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}$"
},
"expenseClassId": {
"description": "UUID of the expense class record",
"$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}$"
},
"status": {
"description": "Status for expense class within the budget ",
"type": "string",
"enum": [
"Active",
"Inactive"
],
"default": "Active"
}
},
"additionalProperties": false,
"required": [
"budgetId",
"expenseClassId"
]
}
Example:
{
"id": "9e662186-7d3e-4732-baaa-93967ccc597e",
"budgetId": "47ac60b4-159d-4e1c-9acb-8293df67d16d",
"expenseClassId": "1bcc3247-99bf-4dca-9b0f-7bc51a2998c2",
"status": "Active"
}
HTTP status code 204
Item successfully updated
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 update budget-expense-class -- malformed JSON at 13:4"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"budget-expense-class not found"
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
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