http://github.com/org/folio/mod-feesfines
This documents the API calls that can be made to query and manage fee/fine of the system
Collection of transfer-criteria items.
Return a list of transfer criteria
GET /transfer-criterias
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
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
active=true
Order by field: field A, field B
Order
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
Skip over a number of elements by specifying an offset value for the query
Example:
0
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
Returns a list of transfer-criteria items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of tranfer criterias",
"type": "object",
"properties": {
"transferCriterias": {
"description": "List of transfer criteria items",
"type": "array",
"id": "transferCriteriaData",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Transfer criteria schema",
"description": "CRUD Fee/Fine transfer criteria",
"properties": {
"criteria": {
"description": "Not implemented yet",
"type": "string"
},
"type": {
"description": "Not implemented yet",
"type": "string"
},
"value": {
"description": "Not implemented yet",
"javaType": "org.folio.rest.domain.MonetaryValue",
"type": "number"
},
"interval": {
"description": "Not implemented yet",
"type": "string"
},
"id": {
"description": "Transfer criteria id, UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
}
},
"additionalProperties": false
}
},
"totalRecords": {
"type": "integer"
}
},
"required": [
"transferCriterias",
"totalRecords"
]
}
Example:
{
"transferCriterias":[
{
"criteria": "Transfer student fees/fines",
"type": "1",
"value": 14,
"interval": "days",
"id": "0bab56e5-1ab6-4ac2-afdf-8b2df0438769"
},
{
"criteria": "Transfer employee fees/fines",
"type": "2",
"value": 14,
"interval": "days",
"id": "0bab56e5-1ab6-4ac2-afdf-8b2df0434575"
}
],
"totalRecords":2
}
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.
Media type: text/plain
Type: any
Example:
unable to list transfer-criterias -- malformed parameter 'query', syntax error at column 6
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to list transfer-criterias -- unauthorized
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Create a transfer criteria
POST /transfer-criterias
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Transfer criteria schema",
"description": "CRUD Fee/Fine transfer criteria",
"type": "object",
"properties": {
"criteria": {
"description": "Not implemented yet",
"type": "string"
},
"type": {
"description": "Not implemented yet",
"type": "string"
},
"value": {
"description": "Not implemented yet",
"javaType": "org.folio.rest.domain.MonetaryValue",
"type": "number"
},
"interval": {
"description": "Not implemented yet",
"type": "string"
},
"id": {
"description": "Transfer criteria id, UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
}
},
"additionalProperties": false
}
Example:
{
"criteria": "student",
"type": "1",
"value": 14,
"interval": "days",
"id": "0bab56e5-1ab6-4ac2-afdf-8b2df0438769"
}
Returns a newly created item, with server-controlled fields like 'id' populated
URI to the created transfer-criteria item
Media type: application/json
Type: any
Example:
{
"criteria": "student",
"type": "1",
"value": 14,
"interval": "days",
"id": "0bab56e5-1ab6-4ac2-afdf-8b2df0438769"
}
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.
Media type: text/plain
Type: any
Example:
"unable to add transfer-criteria -- malformed JSON at 13:3"
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to create transfer-criterias -- unauthorized
Validation errors
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"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Get a single transfer criteria
GET /transfer-criterias/{transferCriteriaId}
Returns item with a given ID
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Transfer criteria schema",
"description": "CRUD Fee/Fine transfer criteria",
"type": "object",
"properties": {
"criteria": {
"description": "Not implemented yet",
"type": "string"
},
"type": {
"description": "Not implemented yet",
"type": "string"
},
"value": {
"description": "Not implemented yet",
"javaType": "org.folio.rest.domain.MonetaryValue",
"type": "number"
},
"interval": {
"description": "Not implemented yet",
"type": "string"
},
"id": {
"description": "Transfer criteria id, UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
}
},
"additionalProperties": false
}
Example:
{
"criteria": "student",
"type": "1",
"value": 14,
"interval": "days",
"id": "0bab56e5-1ab6-4ac2-afdf-8b2df0438769"
}
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"transfer-criteria not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Delete transfer-criteria item with given {transfer-criteriaId}
DELETE /transfer-criterias/{transferCriteriaId}
Item deleted successfully
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.
Media type: text/plain
Type: any
Example:
"unable to delete transfer-criteria -- constraint violation"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"transfer-criteria not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Update transfer-criteria item with given {transfer-criteriaId}
PUT /transfer-criterias/{transferCriteriaId}
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Transfer criteria schema",
"description": "CRUD Fee/Fine transfer criteria",
"type": "object",
"properties": {
"criteria": {
"description": "Not implemented yet",
"type": "string"
},
"type": {
"description": "Not implemented yet",
"type": "string"
},
"value": {
"description": "Not implemented yet",
"javaType": "org.folio.rest.domain.MonetaryValue",
"type": "number"
},
"interval": {
"description": "Not implemented yet",
"type": "string"
},
"id": {
"description": "Transfer criteria id, UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
}
},
"additionalProperties": false
}
Example:
{
"criteria": "student",
"type": "1",
"value": 14,
"interval": "days",
"id": "0bab56e5-1ab6-4ac2-afdf-8b2df0438769"
}
Item successfully updated
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.
Media type: text/plain
Type: any
Example:
"unable to update transfer-criteria -- malformed JSON at 13:4"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"transfer-criteria not found"
Optimistic locking version conflict
Media type: text/plain
Type: any
Example:
version conflict
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator