Collection of the pairsversion v1
https://github.com/folio-org/mod-finance
API for retrieving combination of fund code and expense classes
Return collection of the pairs <fund code, expense classes>
/finance/fund-codes-expense-classes
Collection of fund-codes-expense-class items.
Retrieve a list of fund-codes-expense-class items.
get /finance/fund-codes-expense-classes
Retrieve a list of fund-codes-expense-class items.
Query Parameters
- fiscalYearCode: (string)
Optional Fiscal Year Code
Example:
FY2021
- 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. Using limit=0 will return totalRecords with the exact value. For details about totalRecords see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
10
HTTP status code 200
Returns a list of fund-codes-expense-class items
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "List of combinations of Fund Code and Expense class code.",
"type": "object",
"properties": {
"delimiter": {
"description": "Special character to separate Fund Code and Expense class code.",
"type": "string"
},
"fundCodeVsExpClassesTypes": {
"description": "Pairs of the fund code and expense classes.",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Combination of fundCode, ledgerCode and fundCodeVsExpClasses",
"type": "object",
"properties": {
"fundCode": {
"description": "A unique code associated with the fund",
"type": "string"
},
"ledgerCode": {
"description": "A unique code associated with the ledger",
"type": "string"
},
"activeFundCodeVsExpClasses": {
"description": "Combination of the fund code and active expense classes",
"type": "array",
"items": {
"type": "string"
}
},
"inactiveFundCodeVsExpClasses": {
"description": "Combination of the fund code and inactive expense classes",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"fundCode",
"ledgerCode",
"activeFundCodeVsExpClasses",
" inactiveFundCodeVsExpClasses"
]
}
}
},
"additionalProperties": false,
"required": [
"delimiter",
"fundCodeVsExpClassesTypes"
]
}
Example:
{
"delimiter" : ":",
"fundCodeVsExpClassesTypes" : [
{
"fundCode" : "Fund1",
"ledgerCode" : "Ledger1",
"activeFundCodeVsExpClasses" : ["Fund1:ExpClassPrn"],
"inactiveFundCodeVsExpClasses": []
},
{
"fundCode" : "Fund2",
"ledgerCode" : "Ledger2",
"activeFundCodeVsExpClasses" : ["Fund2:ExpClassPrn"],
"inactiveFundCodeVsExpClasses": ["Fund2:ExpClassElec"]
}
]
}
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: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Media type: text/plain
Type: any
Example:
unable to list fund-codes-expense-classes -- malformed parameter 'query', syntax error at column 6
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.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#",
"id": "error.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": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"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: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Media type: text/plain
Type: any
Example:
internal server error, contact administrator