Accounts (v17.3)

http://github.com/org/folio/mod-feesfines

Table of contents

Accounts API

This documents the API calls that can be made to query and manage feefine of the system

/accounts

Collection of account items.

GET /accounts

Return a list of accounts

GET /accounts
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

    Example:

    (username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
    
    active=true
    
  • orderBy: (string)

    Order by field: field A, field B

  • order: (one of desc, asc - default: desc)

    Order

  • 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
  • facets: (array of string)

    facets to return in the collection result set, can be suffixed by a count of facet values to return, for example, patronGroup:10 default to top 5 facet values

Response 200

Returns a list of account items

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Collection of accounts",
  "type": "object",
  "properties": {
    "accounts": {
      "description": "List of account items",
      "type": "array",
      "id": "accountsData",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "Account schema",
        "description": "User fines/fees account",
        "properties": {
          "amount": {
            "description": "Amount of the fine/fee",
            "javaType": "org.folio.rest.domain.MonetaryValue",
            "type": "number"
          },
          "remaining": {
            "description": "Remaining of the fine/fee",
            "javaType": "org.folio.rest.domain.MonetaryValue",
            "type": "number"
          },
          "dateCreated": {
            "description": "Date and time the account of the fine/fee was created",
            "type": "string",
            "format": "date-time"
          },
          "dateUpdated": {
            "description": "Date and time the account of the fine/fee was updated",
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "description": "Overall status of the fee/fine",
            "type": "object",
            "properties": {
              "name": {
                "description": "Name of the status (values used are Open and Closed)",
                "type": "string",
                "x-fqm-values": [
                  {
                    "value": "Open",
                    "label": "Open"
                  },
                  {
                    "value": "Closed",
                    "label": "Closed"
                  }
                ]
              }
            },
            "required": [
              "name"
            ]
          },
          "paymentStatus": {
            "description": "Overall status of the payment/waive/transfer/refund/cancel",
            "type": "object",
            "properties": {
              "name": {
                "description": "Name of the status",
                "enum": [
                  "Outstanding",
                  "Paid partially",
                  "Paid fully",
                  "Waived partially",
                  "Waived fully",
                  "Transferred partially",
                  "Transferred fully",
                  "Refunded partially",
                  "Refunded fully",
                  "Credited fully",
                  "Credited partially",
                  "Cancelled item returned",
                  "Cancelled item renewed",
                  "Cancelled item declared lost",
                  "Cancelled as error",
                  "Suspended claim returned"
                ],
                "type": "string"
              }
            },
            "required": [
              "name"
            ]
          },
          "feeFineType": {
            "description": "Fee/fine that is up to the desecration of the user",
            "type": "string"
          },
          "feeFineOwner": {
            "description": "Owner of the fee/fine defined by the library and is associated with specific fees/fines",
            "type": "string"
          },
          "title": {
            "description": "The title associated with the item",
            "type": "string"
          },
          "callNumber": {
            "description": "Identifier (Call number) assigned to an item",
            "type": "string"
          },
          "barcode": {
            "description": "Text, with input likely validated by the barcode scanner",
            "type": "string"
          },
          "materialType": {
            "description": "Material type what define what type of thing the item is",
            "type": "string"
          },
          "itemStatus": {
            "description": "The status of the item",
            "type": "object",
            "properties": {
              "name": {
                "description": "Name of the item state",
                "type": "string"
              }
            },
            "required": [
              "name"
            ]
          },
          "location": {
            "description": "Effective location is used to know the current home location for the item",
            "type": "string"
          },
          "metadata": {
            "description": "Metadata about creation to user fine/fee account, provided by the server",
            "type": "object",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "metadata.schema",
            "title": "Metadata Schema",
            "properties": {
              "createdDate": {
                "description": "Date and time when the record was created",
                "type": "string",
                "format": "date-time"
              },
              "createdByUserId": {
                "description": "ID of the user who created the record (when available)",
                "type": "string",
                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
              },
              "createdByUsername": {
                "description": "Username of the user who created the record (when available)",
                "type": "string"
              },
              "updatedDate": {
                "description": "Date and time when the record was last updated",
                "type": "string",
                "format": "date-time"
              },
              "updatedByUserId": {
                "description": "ID of the user who last updated the record (when available)",
                "type": "string",
                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
              },
              "updatedByUsername": {
                "description": "Username of the user who last updated the record (when available)",
                "type": "string"
              }
            },
            "additionalProperties": false,
            "required": [
              "createdDate"
            ]
          },
          "dueDate": {
            "description": "Date time when the item is due to be returned",
            "type": "string",
            "format": "date-time"
          },
          "returnedDate": {
            "description": "Date time when the item is returned and the loan ends, if the user does not have a loan associated, hyphen (-) is added as default",
            "type": "string",
            "format": "date-time"
          },
          "loanId": {
            "description": "ID of the loan",
            "$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}$"
          },
          "userId": {
            "description": "ID of the user",
            "$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}$"
          },
          "itemId": {
            "description": "ID of the item",
            "$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}$"
          },
          "materialTypeId": {
            "description": "ID of the materialType",
            "$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}$"
          },
          "feeFineId": {
            "description": "ID of the fee/fine",
            "$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}$"
          },
          "ownerId": {
            "description": "ID of the owner",
            "$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}$"
          },
          "id": {
            "description": "User fine/fee account 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}$"
          },
          "holdingsRecordId": {
            "description": "Item field: item.holdingsRecordId",
            "readonly": true,
            "$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}$"
          },
          "instanceId": {
            "description": "Holdings record field: holdingsRecord.instanceId",
            "readonly": true,
            "$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}$"
          },
          "contributors": {
            "type": "array",
            "description": "List of contributors",
            "minItems": 0,
            "items": {
              "type": "object",
              "javaType": "org.folio.rest.jaxrs.model.ContributorData",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Personal name, corporate name, meeting name"
                }
              },
              "additionalProperties": false,
              "required": [
                "name"
              ]
            }
          },
          "loanPolicyId": {
            "description": "Loan policy ID",
            "$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}$"
          },
          "overdueFinePolicyId": {
            "description": "Overdue fine policy ID",
            "$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}$"
          },
          "lostItemFeePolicyId": {
            "description": "Lost item fee policy ID",
            "$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}$"
          },
          "processId": {
            "description": "Randomly generated UUID added to fees/fines created in scope of the same process (e.g. same check-in or same scheduled Lost Item Fee generation job run)",
            "$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,
        "required": [
          "amount",
          "remaining",
          "status",
          "paymentStatus",
          "userId",
          "feeFineId",
          "ownerId"
        ]
      }
    },
    "totalRecords": {
      "type": "integer"
    },
    "resultInfo": {
      "readonly": true,
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "resultInfo.schema",
      "description": "Faceting of result sets",
      "type": "object",
      "properties": {
        "totalRecords": {
          "type": "integer",
          "description": "Estimated or exact total number of records. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords"
        },
        "totalRecordsEstimated": {
          "type": "boolean",
          "description": "True if totalRecords is an estimation, false if it is the exact number"
        },
        "totalRecordsRounded": {
          "type": "integer",
          "description": "The rounded value of totalRecords if totalRecords is an estimation"
        },
        "responseTime": {
          "type": "number",
          "description": "Response time"
        },
        "facets": {
          "type": "array",
          "description": "Array of facets",
          "items": {
            "type": "object",
            "description": "A facet",
            "properties": {
              "facetValues": {
                "type": "array",
                "description": "Array of facet values",
                "items": {
                  "type": "object",
                  "description": "A facet value",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "description": "Count of facet values"
                    },
                    "value": {
                      "description": "Value Object"
                    }
                  }
                },
                "additionalProperties": false
              },
              "type": {
                "type": "string",
                "description": "Type of facet"
              }
            },
            "additionalProperties": false
          }
        },
        "diagnostics": {
          "type": "array",
          "description": "Array of diagnostic information",
          "items": {
            "type": "object",
            "description": "Diagnostic information",
            "properties": {
              "source": {
                "type": "string",
                "description": "Source reporting the diagnostic information"
              },
              "code": {
                "type": "string",
                "description": "Diagnostic Code"
              },
              "message": {
                "type": "string",
                "description": "Diagnostic Message"
              },
              "module": {
                "type": "string",
                "description": "Module reporting diagnostic information"
              },
              "recordCount": {
                "type": "integer",
                "description": "Record Count for diagnostics"
              },
              "query": {
                "type": "string",
                "description": "CQL Query associated with results"
              }
            }
          }
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "accounts",
    "totalRecords"
  ]
}

Example:

{
  "accounts" : [ {
    "amount": 15.0,
    "remaining": 15.0,
    "dateCreated": "2018-01-31T00:00:01Z",
    "dateUpdated": "2018-01-31T00:00:01Z",
    "status": {
      "name": "Open"
    },
    "paymentStatus": {
      "name": "Paid Partially"
    },
    "feeFineType": "Damaged Book Fee",
    "feeFineOwner": "Main Admin",
    "title": "Interesting Times",
    "callNumber": "D15.H63 A3 2002",
    "barcode": "326547658598",
    "materialType": "Book",
    "itemStatus": {
      "name": "Available"
    },
    "location": "Main Library",
    "metadata": {
      "createdByUserId": "1ad737b0-d847-11e6-bf26-cec0c932ce01",
      "createdDate": "2018-01-31T21:21:02Z"
    },
    "dueDate": "2017-01-19T12:42:21Z",
    "returnedDate": "2017-01-08T10:25:54Z",
    "loanId": "b74d7b62-0689-49d9-bd4c-38b44d17a250",
    "userId": "77477611-ab44-4082-a0d8-42f7acdfde11",
    "itemId": "bb5a6689-c008-4c96-8f8f-b666850ee12d",
    "materialTypeId": "1a54b431-2e4f-452d-9cae-9cee66c9a892",
    "feeFineId": "57dbeeba-f26b-4dc0-abc8-21cce7659834",
    "ownerId": "3c7b8695-b537-40b1-b0a3-948ad7e1fc09",
    "id": "0bab56e5-1ab6-4ac2-afdf-8b2df0434379"
  }, {
    "amount": 5.0,
    "remaining": 5.0,
    "dateCreated": "2018-01-31T00:00:01Z",
    "dateUpdated": "2018-01-31T00:00:01Z",
    "status": {
      "name": "Closed"
    },
    "paymentStatus": {
      "name": "Waived Partially"
    },
    "feeFineType": "Late",
    "feeFineOwner": "Main Library Administration Office",
    "title": "Bridget Jones's Baby: the diaries",
    "callNumber": "PR6056.I4588 B749 2016",
    "barcode": "453987605438",
    "materialType": "Book",
    "itemStatus": {
      "name": "Checked out"
    },
    "location": "Main Library",
    "metadata": {
    "createdByUserId": "1ad737b0-d847-11e6-bf26-cec0c932ce01",
    "createdDate": "2018-01-31T21:21:02Z"
    },
    "dueDate": "2017-01-19T12:42:21Z",
    "returnedDate": "2017-01-08T10:25:54Z",
    "loanId": "0bab56e5-1ab6-4ac2-afdf-8b2df0434378",
    "userId": "fc45c606-410d-4a7c-9f95-1a3fea2eef42",
    "itemId": "4428a37c-8bae-4f0d-865d-970d83d5ad55",
    "materialTypeId": "1a54b431-2e4f-452d-9cae-9cee66c9a892",
    "feeFineId": "7a29a689-32fe-41fd-a8b4-db21b75bd621",
    "ownerId": "3c7b8695-b537-40b1-b0a3-948ad7e1fc09",
    "id": "0bab56e5-1ab6-4ac2-afdf-8b2df0434379"
  } ],
  "totalRecords" : 2
}

Response 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 accounts -- malformed parameter 'query', syntax error at column 6

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to list accounts -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

POST /accounts

Create an account

POST /accounts
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Account schema",
  "description": "User fines/fees account",
  "type": "object",
  "properties": {
    "amount": {
      "description": "Amount of the fine/fee",
      "javaType": "org.folio.rest.domain.MonetaryValue",
      "type": "number"
    },
    "remaining": {
      "description": "Remaining of the fine/fee",
      "javaType": "org.folio.rest.domain.MonetaryValue",
      "type": "number"
    },
    "dateCreated": {
      "description": "Date and time the account of the fine/fee was created",
      "type": "string",
      "format": "date-time"
    },
    "dateUpdated": {
      "description": "Date and time the account of the fine/fee was updated",
      "type": "string",
      "format": "date-time"
    },
    "status": {
      "description": "Overall status of the fee/fine",
      "type": "object",
      "properties": {
        "name": {
          "description": "Name of the status (values used are Open and Closed)",
          "type": "string",
          "x-fqm-values": [
            {
              "value": "Open",
              "label": "Open"
            },
            {
              "value": "Closed",
              "label": "Closed"
            }
          ]
        }
      },
      "required": [
        "name"
      ]
    },
    "paymentStatus": {
      "description": "Overall status of the payment/waive/transfer/refund/cancel",
      "type": "object",
      "properties": {
        "name": {
          "description": "Name of the status",
          "enum": [
            "Outstanding",
            "Paid partially",
            "Paid fully",
            "Waived partially",
            "Waived fully",
            "Transferred partially",
            "Transferred fully",
            "Refunded partially",
            "Refunded fully",
            "Credited fully",
            "Credited partially",
            "Cancelled item returned",
            "Cancelled item renewed",
            "Cancelled item declared lost",
            "Cancelled as error",
            "Suspended claim returned"
          ],
          "type": "string"
        }
      },
      "required": [
        "name"
      ]
    },
    "feeFineType": {
      "description": "Fee/fine that is up to the desecration of the user",
      "type": "string"
    },
    "feeFineOwner": {
      "description": "Owner of the fee/fine defined by the library and is associated with specific fees/fines",
      "type": "string"
    },
    "title": {
      "description": "The title associated with the item",
      "type": "string"
    },
    "callNumber": {
      "description": "Identifier (Call number) assigned to an item",
      "type": "string"
    },
    "barcode": {
      "description": "Text, with input likely validated by the barcode scanner",
      "type": "string"
    },
    "materialType": {
      "description": "Material type what define what type of thing the item is",
      "type": "string"
    },
    "itemStatus": {
      "description": "The status of the item",
      "type": "object",
      "properties": {
        "name": {
          "description": "Name of the item state",
          "type": "string"
        }
      },
      "required": [
        "name"
      ]
    },
    "location": {
      "description": "Effective location is used to know the current home location for the item",
      "type": "string"
    },
    "metadata": {
      "description": "Metadata about creation to user fine/fee account, provided by the server",
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "metadata.schema",
      "title": "Metadata Schema",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate"
      ]
    },
    "dueDate": {
      "description": "Date time when the item is due to be returned",
      "type": "string",
      "format": "date-time"
    },
    "returnedDate": {
      "description": "Date time when the item is returned and the loan ends, if the user does not have a loan associated, hyphen (-) is added as default",
      "type": "string",
      "format": "date-time"
    },
    "loanId": {
      "description": "ID of the loan",
      "$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}$"
    },
    "userId": {
      "description": "ID of the user",
      "$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}$"
    },
    "itemId": {
      "description": "ID of the item",
      "$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}$"
    },
    "materialTypeId": {
      "description": "ID of the materialType",
      "$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}$"
    },
    "feeFineId": {
      "description": "ID of the fee/fine",
      "$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}$"
    },
    "ownerId": {
      "description": "ID of the owner",
      "$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}$"
    },
    "id": {
      "description": "User fine/fee account 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}$"
    },
    "holdingsRecordId": {
      "description": "Item field: item.holdingsRecordId",
      "readonly": true,
      "$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}$"
    },
    "instanceId": {
      "description": "Holdings record field: holdingsRecord.instanceId",
      "readonly": true,
      "$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}$"
    },
    "contributors": {
      "type": "array",
      "description": "List of contributors",
      "minItems": 0,
      "items": {
        "type": "object",
        "javaType": "org.folio.rest.jaxrs.model.ContributorData",
        "properties": {
          "name": {
            "type": "string",
            "description": "Personal name, corporate name, meeting name"
          }
        },
        "additionalProperties": false,
        "required": [
          "name"
        ]
      }
    },
    "loanPolicyId": {
      "description": "Loan policy ID",
      "$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}$"
    },
    "overdueFinePolicyId": {
      "description": "Overdue fine policy ID",
      "$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}$"
    },
    "lostItemFeePolicyId": {
      "description": "Lost item fee policy ID",
      "$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}$"
    },
    "processId": {
      "description": "Randomly generated UUID added to fees/fines created in scope of the same process (e.g. same check-in or same scheduled Lost Item Fee generation job run)",
      "$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,
  "required": [
    "amount",
    "remaining",
    "status",
    "paymentStatus",
    "userId",
    "feeFineId",
    "ownerId"
  ]
}

Example:

{
  "amount": 15.0,
  "remaining": 15.0,
  "dateCreated": "2018-01-31T00:00:01Z",
  "dateUpdated": "2018-01-31T00:00:01Z",
  "status": {
    "name": "Open"
  },
  "paymentStatus": {
    "name": "Paid Partially"
  },
  "feeFineType": "Damaged Book Fee",
  "feeFineOwner": "Main Admin",
  "title": "Interesting Times",
  "callNumber": "D15.H63 A3 2002",
  "barcode": "326547658598",
  "materialType": "Book",
  "itemStatus": {
    "name": "Available"
  },
  "location": "Main Library",
  "metadata": {
    "createdByUserId": "1ad737b0-d847-11e6-bf26-cec0c932ce01",
    "createdDate": "2018-01-31T21:21:02Z"
  },
  "dueDate": "2017-01-19T12:42:21Z",
  "returnedDate": "2017-01-08T10:25:54Z",
  "loanId": "b74d7b62-0689-49d9-bd4c-38b44d17a250",
  "userId": "77477611-ab44-4082-a0d8-42f7acdfde11",
  "itemId": "bb5a6689-c008-4c96-8f8f-b666850ee12d",
  "materialTypeId": "1a54b431-2e4f-452d-9cae-9cee66c9a892",
  "feeFineId": "57dbeeba-f26b-4dc0-abc8-21cce7659834",
  "ownerId": "3c7b8695-b537-40b1-b0a3-948ad7e1fc09",
  "id": "0bab56e5-1ab6-4ac2-afdf-8b2df0434379",
  "loanPolicyId": "f5b3ea0e-7c62-4f73-bbe5-ea8eae37c615",
  "overdueFinePolicyId": "f6f6aa71-33de-4af8-a066-2d29756f2e26",
  "lostItemFeePolicyId": "952967a2-ce04-4eb8-a47c-e003ca6d4c31",
  "processId": "2294ddf3-9a30-4efd-a0a4-b2743915944f"
}

Response 201

Returns a newly created item, with server-controlled fields like 'id' populated

Headers
  • Location: required (string)

    URI to the created account item

Body

Media type: application/json

Type: any

Example:

{
  "amount": 15.0,
  "remaining": 15.0,
  "dateCreated": "2018-01-31T00:00:01Z",
  "dateUpdated": "2018-01-31T00:00:01Z",
  "status": {
    "name": "Open"
  },
  "paymentStatus": {
    "name": "Paid Partially"
  },
  "feeFineType": "Damaged Book Fee",
  "feeFineOwner": "Main Admin",
  "title": "Interesting Times",
  "callNumber": "D15.H63 A3 2002",
  "barcode": "326547658598",
  "materialType": "Book",
  "itemStatus": {
    "name": "Available"
  },
  "location": "Main Library",
  "metadata": {
    "createdByUserId": "1ad737b0-d847-11e6-bf26-cec0c932ce01",
    "createdDate": "2018-01-31T21:21:02Z"
  },
  "dueDate": "2017-01-19T12:42:21Z",
  "returnedDate": "2017-01-08T10:25:54Z",
  "loanId": "b74d7b62-0689-49d9-bd4c-38b44d17a250",
  "userId": "77477611-ab44-4082-a0d8-42f7acdfde11",
  "itemId": "bb5a6689-c008-4c96-8f8f-b666850ee12d",
  "materialTypeId": "1a54b431-2e4f-452d-9cae-9cee66c9a892",
  "feeFineId": "57dbeeba-f26b-4dc0-abc8-21cce7659834",
  "ownerId": "3c7b8695-b537-40b1-b0a3-948ad7e1fc09",
  "id": "0bab56e5-1ab6-4ac2-afdf-8b2df0434379",
  "loanPolicyId": "f5b3ea0e-7c62-4f73-bbe5-ea8eae37c615",
  "overdueFinePolicyId": "f6f6aa71-33de-4af8-a066-2d29756f2e26",
  "lostItemFeePolicyId": "952967a2-ce04-4eb8-a47c-e003ca6d4c31",
  "processId": "2294ddf3-9a30-4efd-a0a4-b2743915944f"
}

Response 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 account -- malformed JSON at 13:3"

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to create accounts -- unauthorized

Response 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"
        }
      ]
    }
  ]
}

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

GET /accounts/{accountId}

Get a single account

GET /accounts/{accountId}
URI Parameters
  • accountId: required (string)

Response 200

Returns item with a given ID

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Account schema",
  "description": "User fines/fees account",
  "type": "object",
  "properties": {
    "amount": {
      "description": "Amount of the fine/fee",
      "javaType": "org.folio.rest.domain.MonetaryValue",
      "type": "number"
    },
    "remaining": {
      "description": "Remaining of the fine/fee",
      "javaType": "org.folio.rest.domain.MonetaryValue",
      "type": "number"
    },
    "dateCreated": {
      "description": "Date and time the account of the fine/fee was created",
      "type": "string",
      "format": "date-time"
    },
    "dateUpdated": {
      "description": "Date and time the account of the fine/fee was updated",
      "type": "string",
      "format": "date-time"
    },
    "status": {
      "description": "Overall status of the fee/fine",
      "type": "object",
      "properties": {
        "name": {
          "description": "Name of the status (values used are Open and Closed)",
          "type": "string",
          "x-fqm-values": [
            {
              "value": "Open",
              "label": "Open"
            },
            {
              "value": "Closed",
              "label": "Closed"
            }
          ]
        }
      },
      "required": [
        "name"
      ]
    },
    "paymentStatus": {
      "description": "Overall status of the payment/waive/transfer/refund/cancel",
      "type": "object",
      "properties": {
        "name": {
          "description": "Name of the status",
          "enum": [
            "Outstanding",
            "Paid partially",
            "Paid fully",
            "Waived partially",
            "Waived fully",
            "Transferred partially",
            "Transferred fully",
            "Refunded partially",
            "Refunded fully",
            "Credited fully",
            "Credited partially",
            "Cancelled item returned",
            "Cancelled item renewed",
            "Cancelled item declared lost",
            "Cancelled as error",
            "Suspended claim returned"
          ],
          "type": "string"
        }
      },
      "required": [
        "name"
      ]
    },
    "feeFineType": {
      "description": "Fee/fine that is up to the desecration of the user",
      "type": "string"
    },
    "feeFineOwner": {
      "description": "Owner of the fee/fine defined by the library and is associated with specific fees/fines",
      "type": "string"
    },
    "title": {
      "description": "The title associated with the item",
      "type": "string"
    },
    "callNumber": {
      "description": "Identifier (Call number) assigned to an item",
      "type": "string"
    },
    "barcode": {
      "description": "Text, with input likely validated by the barcode scanner",
      "type": "string"
    },
    "materialType": {
      "description": "Material type what define what type of thing the item is",
      "type": "string"
    },
    "itemStatus": {
      "description": "The status of the item",
      "type": "object",
      "properties": {
        "name": {
          "description": "Name of the item state",
          "type": "string"
        }
      },
      "required": [
        "name"
      ]
    },
    "location": {
      "description": "Effective location is used to know the current home location for the item",
      "type": "string"
    },
    "metadata": {
      "description": "Metadata about creation to user fine/fee account, provided by the server",
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "metadata.schema",
      "title": "Metadata Schema",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate"
      ]
    },
    "dueDate": {
      "description": "Date time when the item is due to be returned",
      "type": "string",
      "format": "date-time"
    },
    "returnedDate": {
      "description": "Date time when the item is returned and the loan ends, if the user does not have a loan associated, hyphen (-) is added as default",
      "type": "string",
      "format": "date-time"
    },
    "loanId": {
      "description": "ID of the loan",
      "$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}$"
    },
    "userId": {
      "description": "ID of the user",
      "$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}$"
    },
    "itemId": {
      "description": "ID of the item",
      "$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}$"
    },
    "materialTypeId": {
      "description": "ID of the materialType",
      "$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}$"
    },
    "feeFineId": {
      "description": "ID of the fee/fine",
      "$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}$"
    },
    "ownerId": {
      "description": "ID of the owner",
      "$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}$"
    },
    "id": {
      "description": "User fine/fee account 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}$"
    },
    "holdingsRecordId": {
      "description": "Item field: item.holdingsRecordId",
      "readonly": true,
      "$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}$"
    },
    "instanceId": {
      "description": "Holdings record field: holdingsRecord.instanceId",
      "readonly": true,
      "$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}$"
    },
    "contributors": {
      "type": "array",
      "description": "List of contributors",
      "minItems": 0,
      "items": {
        "type": "object",
        "javaType": "org.folio.rest.jaxrs.model.ContributorData",
        "properties": {
          "name": {
            "type": "string",
            "description": "Personal name, corporate name, meeting name"
          }
        },
        "additionalProperties": false,
        "required": [
          "name"
        ]
      }
    },
    "loanPolicyId": {
      "description": "Loan policy ID",
      "$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}$"
    },
    "overdueFinePolicyId": {
      "description": "Overdue fine policy ID",
      "$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}$"
    },
    "lostItemFeePolicyId": {
      "description": "Lost item fee policy ID",
      "$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}$"
    },
    "processId": {
      "description": "Randomly generated UUID added to fees/fines created in scope of the same process (e.g. same check-in or same scheduled Lost Item Fee generation job run)",
      "$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,
  "required": [
    "amount",
    "remaining",
    "status",
    "paymentStatus",
    "userId",
    "feeFineId",
    "ownerId"
  ]
}

Example:

{
  "amount": 15.0,
  "remaining": 15.0,
  "dateCreated": "2018-01-31T00:00:01Z",
  "dateUpdated": "2018-01-31T00:00:01Z",
  "status": {
    "name": "Open"
  },
  "paymentStatus": {
    "name": "Paid Partially"
  },
  "feeFineType": "Damaged Book Fee",
  "feeFineOwner": "Main Admin",
  "title": "Interesting Times",
  "callNumber": "D15.H63 A3 2002",
  "barcode": "326547658598",
  "materialType": "Book",
  "itemStatus": {
    "name": "Available"
  },
  "location": "Main Library",
  "metadata": {
    "createdByUserId": "1ad737b0-d847-11e6-bf26-cec0c932ce01",
    "createdDate": "2018-01-31T21:21:02Z"
  },
  "dueDate": "2017-01-19T12:42:21Z",
  "returnedDate": "2017-01-08T10:25:54Z",
  "loanId": "b74d7b62-0689-49d9-bd4c-38b44d17a250",
  "userId": "77477611-ab44-4082-a0d8-42f7acdfde11",
  "itemId": "bb5a6689-c008-4c96-8f8f-b666850ee12d",
  "materialTypeId": "1a54b431-2e4f-452d-9cae-9cee66c9a892",
  "feeFineId": "57dbeeba-f26b-4dc0-abc8-21cce7659834",
  "ownerId": "3c7b8695-b537-40b1-b0a3-948ad7e1fc09",
  "id": "0bab56e5-1ab6-4ac2-afdf-8b2df0434379",
  "loanPolicyId": "f5b3ea0e-7c62-4f73-bbe5-ea8eae37c615",
  "overdueFinePolicyId": "f6f6aa71-33de-4af8-a066-2d29756f2e26",
  "lostItemFeePolicyId": "952967a2-ce04-4eb8-a47c-e003ca6d4c31",
  "processId": "2294ddf3-9a30-4efd-a0a4-b2743915944f"
}

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"account not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

DELETE /accounts/{accountId}

Delete account item with given {accountId}

DELETE /accounts/{accountId}
URI Parameters
  • accountId: required (string)

Response 204

Item deleted successfully

Response 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 account -- constraint violation"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"account not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

PUT /accounts/{accountId}

Update account item with given {accountId}

PUT /accounts/{accountId}
URI Parameters
  • accountId: required (string)
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Account schema",
  "description": "User fines/fees account",
  "type": "object",
  "properties": {
    "amount": {
      "description": "Amount of the fine/fee",
      "javaType": "org.folio.rest.domain.MonetaryValue",
      "type": "number"
    },
    "remaining": {
      "description": "Remaining of the fine/fee",
      "javaType": "org.folio.rest.domain.MonetaryValue",
      "type": "number"
    },
    "dateCreated": {
      "description": "Date and time the account of the fine/fee was created",
      "type": "string",
      "format": "date-time"
    },
    "dateUpdated": {
      "description": "Date and time the account of the fine/fee was updated",
      "type": "string",
      "format": "date-time"
    },
    "status": {
      "description": "Overall status of the fee/fine",
      "type": "object",
      "properties": {
        "name": {
          "description": "Name of the status (values used are Open and Closed)",
          "type": "string",
          "x-fqm-values": [
            {
              "value": "Open",
              "label": "Open"
            },
            {
              "value": "Closed",
              "label": "Closed"
            }
          ]
        }
      },
      "required": [
        "name"
      ]
    },
    "paymentStatus": {
      "description": "Overall status of the payment/waive/transfer/refund/cancel",
      "type": "object",
      "properties": {
        "name": {
          "description": "Name of the status",
          "enum": [
            "Outstanding",
            "Paid partially",
            "Paid fully",
            "Waived partially",
            "Waived fully",
            "Transferred partially",
            "Transferred fully",
            "Refunded partially",
            "Refunded fully",
            "Credited fully",
            "Credited partially",
            "Cancelled item returned",
            "Cancelled item renewed",
            "Cancelled item declared lost",
            "Cancelled as error",
            "Suspended claim returned"
          ],
          "type": "string"
        }
      },
      "required": [
        "name"
      ]
    },
    "feeFineType": {
      "description": "Fee/fine that is up to the desecration of the user",
      "type": "string"
    },
    "feeFineOwner": {
      "description": "Owner of the fee/fine defined by the library and is associated with specific fees/fines",
      "type": "string"
    },
    "title": {
      "description": "The title associated with the item",
      "type": "string"
    },
    "callNumber": {
      "description": "Identifier (Call number) assigned to an item",
      "type": "string"
    },
    "barcode": {
      "description": "Text, with input likely validated by the barcode scanner",
      "type": "string"
    },
    "materialType": {
      "description": "Material type what define what type of thing the item is",
      "type": "string"
    },
    "itemStatus": {
      "description": "The status of the item",
      "type": "object",
      "properties": {
        "name": {
          "description": "Name of the item state",
          "type": "string"
        }
      },
      "required": [
        "name"
      ]
    },
    "location": {
      "description": "Effective location is used to know the current home location for the item",
      "type": "string"
    },
    "metadata": {
      "description": "Metadata about creation to user fine/fee account, provided by the server",
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "metadata.schema",
      "title": "Metadata Schema",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate"
      ]
    },
    "dueDate": {
      "description": "Date time when the item is due to be returned",
      "type": "string",
      "format": "date-time"
    },
    "returnedDate": {
      "description": "Date time when the item is returned and the loan ends, if the user does not have a loan associated, hyphen (-) is added as default",
      "type": "string",
      "format": "date-time"
    },
    "loanId": {
      "description": "ID of the loan",
      "$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}$"
    },
    "userId": {
      "description": "ID of the user",
      "$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}$"
    },
    "itemId": {
      "description": "ID of the item",
      "$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}$"
    },
    "materialTypeId": {
      "description": "ID of the materialType",
      "$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}$"
    },
    "feeFineId": {
      "description": "ID of the fee/fine",
      "$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}$"
    },
    "ownerId": {
      "description": "ID of the owner",
      "$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}$"
    },
    "id": {
      "description": "User fine/fee account 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}$"
    },
    "holdingsRecordId": {
      "description": "Item field: item.holdingsRecordId",
      "readonly": true,
      "$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}$"
    },
    "instanceId": {
      "description": "Holdings record field: holdingsRecord.instanceId",
      "readonly": true,
      "$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}$"
    },
    "contributors": {
      "type": "array",
      "description": "List of contributors",
      "minItems": 0,
      "items": {
        "type": "object",
        "javaType": "org.folio.rest.jaxrs.model.ContributorData",
        "properties": {
          "name": {
            "type": "string",
            "description": "Personal name, corporate name, meeting name"
          }
        },
        "additionalProperties": false,
        "required": [
          "name"
        ]
      }
    },
    "loanPolicyId": {
      "description": "Loan policy ID",
      "$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}$"
    },
    "overdueFinePolicyId": {
      "description": "Overdue fine policy ID",
      "$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}$"
    },
    "lostItemFeePolicyId": {
      "description": "Lost item fee policy ID",
      "$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}$"
    },
    "processId": {
      "description": "Randomly generated UUID added to fees/fines created in scope of the same process (e.g. same check-in or same scheduled Lost Item Fee generation job run)",
      "$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,
  "required": [
    "amount",
    "remaining",
    "status",
    "paymentStatus",
    "userId",
    "feeFineId",
    "ownerId"
  ]
}

Example:

{
  "amount": 15.0,
  "remaining": 15.0,
  "dateCreated": "2018-01-31T00:00:01Z",
  "dateUpdated": "2018-01-31T00:00:01Z",
  "status": {
    "name": "Open"
  },
  "paymentStatus": {
    "name": "Paid Partially"
  },
  "feeFineType": "Damaged Book Fee",
  "feeFineOwner": "Main Admin",
  "title": "Interesting Times",
  "callNumber": "D15.H63 A3 2002",
  "barcode": "326547658598",
  "materialType": "Book",
  "itemStatus": {
    "name": "Available"
  },
  "location": "Main Library",
  "metadata": {
    "createdByUserId": "1ad737b0-d847-11e6-bf26-cec0c932ce01",
    "createdDate": "2018-01-31T21:21:02Z"
  },
  "dueDate": "2017-01-19T12:42:21Z",
  "returnedDate": "2017-01-08T10:25:54Z",
  "loanId": "b74d7b62-0689-49d9-bd4c-38b44d17a250",
  "userId": "77477611-ab44-4082-a0d8-42f7acdfde11",
  "itemId": "bb5a6689-c008-4c96-8f8f-b666850ee12d",
  "materialTypeId": "1a54b431-2e4f-452d-9cae-9cee66c9a892",
  "feeFineId": "57dbeeba-f26b-4dc0-abc8-21cce7659834",
  "ownerId": "3c7b8695-b537-40b1-b0a3-948ad7e1fc09",
  "id": "0bab56e5-1ab6-4ac2-afdf-8b2df0434379",
  "loanPolicyId": "f5b3ea0e-7c62-4f73-bbe5-ea8eae37c615",
  "overdueFinePolicyId": "f6f6aa71-33de-4af8-a066-2d29756f2e26",
  "lostItemFeePolicyId": "952967a2-ce04-4eb8-a47c-e003ca6d4c31",
  "processId": "2294ddf3-9a30-4efd-a0a4-b2743915944f"
}

Response 204

Item successfully updated

Response 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 account -- malformed JSON at 13:4"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"account not found"

Response 409

Optimistic locking version conflict

Body

Media type: text/plain

Type: any

Example:

version conflict

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

POST /accounts/{accountId}/check-pay

Checks if an action is allowed

POST /accounts/{accountId}/check-pay
URI Parameters
  • accountId: required (string)
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Accounts check request",
  "type": "object",
  "properties": {
    "amount": {
      "type": "string",
      "description": "Action amount to be validated"
    }
  },
  "additionalProperties": false,
  "required": [
    "amount"
  ]
}

Response 200

Action is allowed

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Accounts check response",
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "description": "ID of users fine/fee account",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "amount": {
      "type": "string",
      "description": "Amount that validation was requested for"
    },
    "allowed": {
      "type": "boolean",
      "description": "Flag which indicates if validation is successful"
    },
    "remainingAmount": {
      "type": "string",
      "description": "Amount of fee/fine that will remain if the action is performed"
    },
    "errorMessage": {
      "type": "string",
      "description": "Error message which describes why validation failed"
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "amount",
    "allowed"
  ]
}

Response 404

Fee/fine was not found

Body

Media type: text/plain

Type: any

Example:

Fee/fine was not found

Response 422

Action is not allowed

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Accounts check response",
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "description": "ID of users fine/fee account",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "amount": {
      "type": "string",
      "description": "Amount that validation was requested for"
    },
    "allowed": {
      "type": "boolean",
      "description": "Flag which indicates if validation is successful"
    },
    "remainingAmount": {
      "type": "string",
      "description": "Amount of fee/fine that will remain if the action is performed"
    },
    "errorMessage": {
      "type": "string",
      "description": "Error message which describes why validation failed"
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "amount",
    "allowed"
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

POST /accounts/{accountId}/check-waive

Checks if an action is allowed

POST /accounts/{accountId}/check-waive
URI Parameters
  • accountId: required (string)
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Accounts check request",
  "type": "object",
  "properties": {
    "amount": {
      "type": "string",
      "description": "Action amount to be validated"
    }
  },
  "additionalProperties": false,
  "required": [
    "amount"
  ]
}

Response 200

Action is allowed

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Accounts check response",
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "description": "ID of users fine/fee account",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "amount": {
      "type": "string",
      "description": "Amount that validation was requested for"
    },
    "allowed": {
      "type": "boolean",
      "description": "Flag which indicates if validation is successful"
    },
    "remainingAmount": {
      "type": "string",
      "description": "Amount of fee/fine that will remain if the action is performed"
    },
    "errorMessage": {
      "type": "string",
      "description": "Error message which describes why validation failed"
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "amount",
    "allowed"
  ]
}

Response 404

Fee/fine was not found

Body

Media type: text/plain

Type: any

Example:

Fee/fine was not found

Response 422

Action is not allowed

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Accounts check response",
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "description": "ID of users fine/fee account",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "amount": {
      "type": "string",
      "description": "Amount that validation was requested for"
    },
    "allowed": {
      "type": "boolean",
      "description": "Flag which indicates if validation is successful"
    },
    "remainingAmount": {
      "type": "string",
      "description": "Amount of fee/fine that will remain if the action is performed"
    },
    "errorMessage": {
      "type": "string",
      "description": "Error message which describes why validation failed"
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "amount",
    "allowed"
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

POST /accounts/{accountId}/check-transfer

Checks if an action is allowed

POST /accounts/{accountId}/check-transfer
URI Parameters
  • accountId: required (string)
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Accounts check request",
  "type": "object",
  "properties": {
    "amount": {
      "type": "string",
      "description": "Action amount to be validated"
    }
  },
  "additionalProperties": false,
  "required": [
    "amount"
  ]
}

Response 200

Action is allowed

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Accounts check response",
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "description": "ID of users fine/fee account",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "amount": {
      "type": "string",
      "description": "Amount that validation was requested for"
    },
    "allowed": {
      "type": "boolean",
      "description": "Flag which indicates if validation is successful"
    },
    "remainingAmount": {
      "type": "string",
      "description": "Amount of fee/fine that will remain if the action is performed"
    },
    "errorMessage": {
      "type": "string",
      "description": "Error message which describes why validation failed"
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "amount",
    "allowed"
  ]
}

Response 404

Fee/fine was not found

Body

Media type: text/plain

Type: any

Example:

Fee/fine was not found

Response 422

Action is not allowed

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Accounts check response",
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "description": "ID of users fine/fee account",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "amount": {
      "type": "string",
      "description": "Amount that validation was requested for"
    },
    "allowed": {
      "type": "boolean",
      "description": "Flag which indicates if validation is successful"
    },
    "remainingAmount": {
      "type": "string",
      "description": "Amount of fee/fine that will remain if the action is performed"
    },
    "errorMessage": {
      "type": "string",
      "description": "Error message which describes why validation failed"
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "amount",
    "allowed"
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

POST /accounts/{accountId}/check-refund

Checks if an action is allowed

POST /accounts/{accountId}/check-refund
URI Parameters
  • accountId: required (string)
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Accounts check request",
  "type": "object",
  "properties": {
    "amount": {
      "type": "string",
      "description": "Action amount to be validated"
    }
  },
  "additionalProperties": false,
  "required": [
    "amount"
  ]
}

Response 200

Action is allowed

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Accounts check response",
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "description": "ID of users fine/fee account",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "amount": {
      "type": "string",
      "description": "Amount that validation was requested for"
    },
    "allowed": {
      "type": "boolean",
      "description": "Flag which indicates if validation is successful"
    },
    "remainingAmount": {
      "type": "string",
      "description": "Amount of fee/fine that will remain if the action is performed"
    },
    "errorMessage": {
      "type": "string",
      "description": "Error message which describes why validation failed"
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "amount",
    "allowed"
  ]
}

Response 404

Fee/fine was not found

Body

Media type: text/plain

Type: any

Example:

Fee/fine was not found

Response 422

Action is not allowed

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Accounts check response",
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "description": "ID of users fine/fee account",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "amount": {
      "type": "string",
      "description": "Amount that validation was requested for"
    },
    "allowed": {
      "type": "boolean",
      "description": "Flag which indicates if validation is successful"
    },
    "remainingAmount": {
      "type": "string",
      "description": "Amount of fee/fine that will remain if the action is performed"
    },
    "errorMessage": {
      "type": "string",
      "description": "Error message which describes why validation failed"
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "amount",
    "allowed"
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

POST /accounts/{accountId}/pay

Perform action

POST /accounts/{accountId}/pay
URI Parameters
  • accountId: required (string)
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Default action request",
  "type": "object",
  "properties": {
    "amount": {
      "type": "string",
      "description": "Action amount"
    },
    "comments": {
      "type": "string",
      "description": "Additional info for staff or patron. Format: [STAFF : staff comment \n PATRON : patron comment]"
    },
    "transactionInfo": {
      "type": "string",
      "description": "Additional transaction information, e.g. check number"
    },
    "notifyPatron": {
      "type": "boolean",
      "description": "Should send patron notification or not"
    },
    "servicePointId": {
      "type": "string",
      "description": "Unique ID of the service point where the payment was made",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "userName": {
      "type": "string",
      "description": "Name of the user that was logged in when the action was performed"
    },
    "paymentMethod": {
      "type": "string",
      "description": "Name of the payment method, e.g. `Cash` or `Credit card`"
    }
  },
  "additionalProperties": false,
  "required": [
    "amount",
    "notifyPatron",
    "servicePointId",
    "userName",
    "paymentMethod"
  ]
}

Response 201

Action was performed successfully

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Action response",
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "description": "Unique ID of the account",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "amount": {
      "type": "string",
      "description": "Action amount"
    },
    "remainingAmount": {
      "type": "string",
      "description": "Remaining fee/fine amount after action"
    },
    "feefineactions": {
      "type": "array",
      "description": "Fee/fine action records created as a result of an action",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "Fee/fine actions schema",
        "description": "Transactions or activities associated with a user fee/fine account",
        "properties": {
          "dateAction": {
            "description": "Date and time the transaction of the fine/fee was created",
            "type": "string",
            "format": "date-time"
          },
          "typeAction": {
            "description": "Type of activity including the type of transaction",
            "type": "string",
            "x-fqm-values": [
              {
                "value": "Paid partially",
                "label": "Paid partially"
              },
              {
                "value": "Paid fully",
                "label": "Paid fully"
              },
              {
                "value": "Waived partially",
                "label": "Waived partially"
              },
              {
                "value": "Waived fully",
                "label": "Waived fully"
              },
              {
                "value": "Transferred partially",
                "label": "Transferred partially"
              },
              {
                "value": "Transferred fully",
                "label": "Transferred fully"
              },
              {
                "value": "Refunded partially",
                "label": "Refunded partially"
              },
              {
                "value": "Refunded fully",
                "label": "Refunded fully"
              },
              {
                "value": "Credited partially",
                "label": "Credited partially"
              },
              {
                "value": "Credited fully",
                "label": "Credited fully"
              },
              {
                "value": "Cancelled as error",
                "label": "Cancelled as error"
              }
            ]
          },
          "comments": {
            "description": "Additional information entered as part of the activity or on this screen as a 'Staff info only' activity",
            "type": "string"
          },
          "notify": {
            "description": "A flag to determine if a patron should be notified or not",
            "type": "boolean"
          },
          "amountAction": {
            "description": "Amount of activity",
            "javaType": "org.folio.rest.domain.MonetaryValue",
            "type": "number"
          },
          "balance": {
            "description": "Calculated amount of remaining balance based on original fee/fine and what has been paid/waived/transferred/refunded",
            "javaType": "org.folio.rest.domain.MonetaryValue",
            "type": "number"
          },
          "transactionInformation": {
            "description": "Number or other transaction id related to payment",
            "type": "string"
          },
          "createdAt": {
            "description": "ID of the service point where the action was created",
            "$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}$"
          },
          "originalCreatedAt": {
            "description": "Original invalid (non-UUID) value of 'createdAt' moved here when UUID-validation was enabled for 'createdAt'",
            "type": "string"
          },
          "source": {
            "description": "Person who processed activity (from login information)",
            "type": "string"
          },
          "paymentMethod": {
            "description": "Overall status of the action-setting",
            "type": "string"
          },
          "accountId": {
            "description": "ID of the accounts",
            "$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}$"
          },
          "userId": {
            "description": "ID of the user",
            "$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}$"
          },
          "id": {
            "description": "Fine/fee action 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,
        "required": [
          "accountId",
          "userId"
        ]
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "amount",
    "remainingAmount"
  ]
}

Response 404

Fee/fine was not found

Body

Media type: text/plain

Type: any

Example:

Fee/fine was not found

Response 422

Action is not allowed

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Action response",
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "description": "Unique ID of the account",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "amount": {
      "type": "string",
      "description": "Action amount"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional info about request processing failure"
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "amount",
    "errorMessage"
  ]
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error, please contact administrator

POST /accounts/{accountId}/waive

Perform action

POST /accounts/{accountId}/waive
URI Parameters
  • accountId: required (string)
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Default action request",
  "type": "object",
  "properties": {
    "amount": {
      "type": "string",
      "description": "Action amount"
    },
    "comments": {
      "type": "string",
      "description": "Additional info for staff or patron. Format: [STAFF : staff comment \n PATRON : patron comment]"
    },
    "transactionInfo": {
      "type": "string",
      "description": "Additional transaction information, e.g. check number"
    },
    "notifyPatron": {
      "type": "boolean",
      "description": "Should send patron notification or not"
    },
    "servicePointId": {
      "type": "string",
      "description": "Unique ID of the service point where the payment was made",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "userName": {
      "type": "string",
      "description": "Name of the user that was logged in when the action was performed"
    },
    "paymentMethod": {
      "type": "string",
      "description": "Name of the payment method, e.g. `Cash` or `Credit card`"
    }
  },
  "additionalProperties": false,
  "required": [
    "amount",
    "notifyPatron",
    "servicePointId",
    "userName",
    "paymentMethod"
  ]
}

Response 201

Action was performed successfully

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Action response",
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "description": "Unique ID of the account",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "amount": {
      "type": "string",
      "description": "Action amount"
    },
    "remainingAmount": {
      "type": "string",
      "description": "Remaining fee/fine amount after action"
    },
    "feefineactions": {
      "type": "array",
      "description": "Fee/fine action records created as a result of an action",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "Fee/fine actions schema",
        "description": "Transactions or activities associated with a user fee/fine account",
        "properties": {
          "dateAction": {
            "description": "Date and time the transaction of the fine/fee was created",
            "type": "string",
            "format": "date-time"
          },
          "typeAction": {
            "description": "Type of activity including the type of transaction",
            "type": "string",
            "x-fqm-values": [
              {
                "value": "Paid partially",
                "label": "Paid partially"
              },
              {
                "value": "Paid fully",
                "label": "Paid fully"
              },
              {
                "value": "Waived partially",
                "label": "Waived partially"
              },
              {
                "value": "Waived fully",
                "label": "Waived fully"
              },
              {
                "value": "Transferred partially",
                "label": "Transferred partially"
              },
              {
                "value": "Transferred fully",
                "label": "Transferred fully"
              },
              {
                "value": "Refunded partially",
                "label": "Refunded partially"
              },
              {
                "value": "Refunded fully",
                "label": "Refunded fully"
              },
              {
                "value": "Credited partially",
                "label": "Credited partially"
              },
              {
                "value": "Credited fully",
                "label": "Credited fully"
              },
              {
                "value": "Cancelled as error",
                "label": "Cancelled as error"
              }
            ]
          },
          "comments": {
            "description": "Additional information entered as part of the activity or on this screen as a 'Staff info only' activity",
            "type": "string"
          },
          "notify": {
            "description": "A flag to determine if a patron should be notified or not",
            "type": "boolean"
          },
          "amountAction": {
            "description": "Amount of activity",
            "javaType": "org.folio.rest.domain.MonetaryValue",
            "type": "number"
          },
          "balance": {
            "description": "Calculated amount of remaining balance based on original fee/fine and what has been paid/waived/transferred/refunded",
            "javaType": "org.folio.rest.domain.MonetaryValue",
            "type": "number"
          },
          "transactionInformation": {
            "description": "Number or other transaction id related to payment",
            "type": "string"
          },
          "createdAt": {
            "description": "ID of the service point where the action was created",
            "$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}$"
          },
          "originalCreatedAt": {
            "description": "Original invalid (non-UUID) value of 'createdAt' moved here when UUID-validation was enabled for 'createdAt'",
            "type": "string"
          },
          "source": {
            "description": "Person who processed activity (from login information)",
            "type": "string"
          },
          "paymentMethod": {
            "description": "Overall status of the action-setting",
            "type": "string"
          },
          "accountId": {
            "description": "ID of the accounts",
            "$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}$"
          },
          "userId": {
            "description": "ID of the user",
            "$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}$"
          },
          "id": {
            "description": "Fine/fee action 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,
        "required": [
          "accountId",
          "userId"
        ]
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "amount",
    "remainingAmount"
  ]
}

Response 404

Fee/fine was not found

Body

Media type: text/plain

Type: any

Example:

Fee/fine was not found

Response 422

Action is not allowed

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Action response",
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "description": "Unique ID of the account",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "amount": {
      "type": "string",
      "description": "Action amount"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional info about request processing failure"
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "amount",
    "errorMessage"
  ]
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error, please contact administrator

POST /accounts/{accountId}/transfer

Perform action

POST /accounts/{accountId}/transfer
URI Parameters
  • accountId: required (string)
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Default action request",
  "type": "object",
  "properties": {
    "amount": {
      "type": "string",
      "description": "Action amount"
    },
    "comments": {
      "type": "string",
      "description": "Additional info for staff or patron. Format: [STAFF : staff comment \n PATRON : patron comment]"
    },
    "transactionInfo": {
      "type": "string",
      "description": "Additional transaction information, e.g. check number"
    },
    "notifyPatron": {
      "type": "boolean",
      "description": "Should send patron notification or not"
    },
    "servicePointId": {
      "type": "string",
      "description": "Unique ID of the service point where the payment was made",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "userName": {
      "type": "string",
      "description": "Name of the user that was logged in when the action was performed"
    },
    "paymentMethod": {
      "type": "string",
      "description": "Name of the payment method, e.g. `Cash` or `Credit card`"
    }
  },
  "additionalProperties": false,
  "required": [
    "amount",
    "notifyPatron",
    "servicePointId",
    "userName",
    "paymentMethod"
  ]
}

Response 201

Action was performed successfully

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Action response",
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "description": "Unique ID of the account",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "amount": {
      "type": "string",
      "description": "Action amount"
    },
    "remainingAmount": {
      "type": "string",
      "description": "Remaining fee/fine amount after action"
    },
    "feefineactions": {
      "type": "array",
      "description": "Fee/fine action records created as a result of an action",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "Fee/fine actions schema",
        "description": "Transactions or activities associated with a user fee/fine account",
        "properties": {
          "dateAction": {
            "description": "Date and time the transaction of the fine/fee was created",
            "type": "string",
            "format": "date-time"
          },
          "typeAction": {
            "description": "Type of activity including the type of transaction",
            "type": "string",
            "x-fqm-values": [
              {
                "value": "Paid partially",
                "label": "Paid partially"
              },
              {
                "value": "Paid fully",
                "label": "Paid fully"
              },
              {
                "value": "Waived partially",
                "label": "Waived partially"
              },
              {
                "value": "Waived fully",
                "label": "Waived fully"
              },
              {
                "value": "Transferred partially",
                "label": "Transferred partially"
              },
              {
                "value": "Transferred fully",
                "label": "Transferred fully"
              },
              {
                "value": "Refunded partially",
                "label": "Refunded partially"
              },
              {
                "value": "Refunded fully",
                "label": "Refunded fully"
              },
              {
                "value": "Credited partially",
                "label": "Credited partially"
              },
              {
                "value": "Credited fully",
                "label": "Credited fully"
              },
              {
                "value": "Cancelled as error",
                "label": "Cancelled as error"
              }
            ]
          },
          "comments": {
            "description": "Additional information entered as part of the activity or on this screen as a 'Staff info only' activity",
            "type": "string"
          },
          "notify": {
            "description": "A flag to determine if a patron should be notified or not",
            "type": "boolean"
          },
          "amountAction": {
            "description": "Amount of activity",
            "javaType": "org.folio.rest.domain.MonetaryValue",
            "type": "number"
          },
          "balance": {
            "description": "Calculated amount of remaining balance based on original fee/fine and what has been paid/waived/transferred/refunded",
            "javaType": "org.folio.rest.domain.MonetaryValue",
            "type": "number"
          },
          "transactionInformation": {
            "description": "Number or other transaction id related to payment",
            "type": "string"
          },
          "createdAt": {
            "description": "ID of the service point where the action was created",
            "$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}$"
          },
          "originalCreatedAt": {
            "description": "Original invalid (non-UUID) value of 'createdAt' moved here when UUID-validation was enabled for 'createdAt'",
            "type": "string"
          },
          "source": {
            "description": "Person who processed activity (from login information)",
            "type": "string"
          },
          "paymentMethod": {
            "description": "Overall status of the action-setting",
            "type": "string"
          },
          "accountId": {
            "description": "ID of the accounts",
            "$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}$"
          },
          "userId": {
            "description": "ID of the user",
            "$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}$"
          },
          "id": {
            "description": "Fine/fee action 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,
        "required": [
          "accountId",
          "userId"
        ]
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "amount",
    "remainingAmount"
  ]
}

Response 404

Fee/fine was not found

Body

Media type: text/plain

Type: any

Example:

Fee/fine was not found

Response 422

Action is not allowed

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Action response",
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "description": "Unique ID of the account",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "amount": {
      "type": "string",
      "description": "Action amount"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional info about request processing failure"
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "amount",
    "errorMessage"
  ]
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error, please contact administrator

POST /accounts/{accountId}/refund

Perform action

POST /accounts/{accountId}/refund
URI Parameters
  • accountId: required (string)
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Default action request",
  "type": "object",
  "properties": {
    "amount": {
      "type": "string",
      "description": "Action amount"
    },
    "comments": {
      "type": "string",
      "description": "Additional info for staff or patron. Format: [STAFF : staff comment \n PATRON : patron comment]"
    },
    "transactionInfo": {
      "type": "string",
      "description": "Additional transaction information, e.g. check number"
    },
    "notifyPatron": {
      "type": "boolean",
      "description": "Should send patron notification or not"
    },
    "servicePointId": {
      "type": "string",
      "description": "Unique ID of the service point where the payment was made",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "userName": {
      "type": "string",
      "description": "Name of the user that was logged in when the action was performed"
    },
    "paymentMethod": {
      "type": "string",
      "description": "Name of the payment method, e.g. `Cash` or `Credit card`"
    }
  },
  "additionalProperties": false,
  "required": [
    "amount",
    "notifyPatron",
    "servicePointId",
    "userName",
    "paymentMethod"
  ]
}

Response 201

Action was performed successfully

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Action response",
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "description": "Unique ID of the account",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "amount": {
      "type": "string",
      "description": "Action amount"
    },
    "remainingAmount": {
      "type": "string",
      "description": "Remaining fee/fine amount after action"
    },
    "feefineactions": {
      "type": "array",
      "description": "Fee/fine action records created as a result of an action",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "Fee/fine actions schema",
        "description": "Transactions or activities associated with a user fee/fine account",
        "properties": {
          "dateAction": {
            "description": "Date and time the transaction of the fine/fee was created",
            "type": "string",
            "format": "date-time"
          },
          "typeAction": {
            "description": "Type of activity including the type of transaction",
            "type": "string",
            "x-fqm-values": [
              {
                "value": "Paid partially",
                "label": "Paid partially"
              },
              {
                "value": "Paid fully",
                "label": "Paid fully"
              },
              {
                "value": "Waived partially",
                "label": "Waived partially"
              },
              {
                "value": "Waived fully",
                "label": "Waived fully"
              },
              {
                "value": "Transferred partially",
                "label": "Transferred partially"
              },
              {
                "value": "Transferred fully",
                "label": "Transferred fully"
              },
              {
                "value": "Refunded partially",
                "label": "Refunded partially"
              },
              {
                "value": "Refunded fully",
                "label": "Refunded fully"
              },
              {
                "value": "Credited partially",
                "label": "Credited partially"
              },
              {
                "value": "Credited fully",
                "label": "Credited fully"
              },
              {
                "value": "Cancelled as error",
                "label": "Cancelled as error"
              }
            ]
          },
          "comments": {
            "description": "Additional information entered as part of the activity or on this screen as a 'Staff info only' activity",
            "type": "string"
          },
          "notify": {
            "description": "A flag to determine if a patron should be notified or not",
            "type": "boolean"
          },
          "amountAction": {
            "description": "Amount of activity",
            "javaType": "org.folio.rest.domain.MonetaryValue",
            "type": "number"
          },
          "balance": {
            "description": "Calculated amount of remaining balance based on original fee/fine and what has been paid/waived/transferred/refunded",
            "javaType": "org.folio.rest.domain.MonetaryValue",
            "type": "number"
          },
          "transactionInformation": {
            "description": "Number or other transaction id related to payment",
            "type": "string"
          },
          "createdAt": {
            "description": "ID of the service point where the action was created",
            "$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}$"
          },
          "originalCreatedAt": {
            "description": "Original invalid (non-UUID) value of 'createdAt' moved here when UUID-validation was enabled for 'createdAt'",
            "type": "string"
          },
          "source": {
            "description": "Person who processed activity (from login information)",
            "type": "string"
          },
          "paymentMethod": {
            "description": "Overall status of the action-setting",
            "type": "string"
          },
          "accountId": {
            "description": "ID of the accounts",
            "$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}$"
          },
          "userId": {
            "description": "ID of the user",
            "$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}$"
          },
          "id": {
            "description": "Fine/fee action 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,
        "required": [
          "accountId",
          "userId"
        ]
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "amount",
    "remainingAmount"
  ]
}

Response 404

Fee/fine was not found

Body

Media type: text/plain

Type: any

Example:

Fee/fine was not found

Response 422

Action is not allowed

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Action response",
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "description": "Unique ID of the account",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "amount": {
      "type": "string",
      "description": "Action amount"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional info about request processing failure"
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "amount",
    "errorMessage"
  ]
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error, please contact administrator

POST /accounts/{accountId}/cancel

Perform action

POST /accounts/{accountId}/cancel
URI Parameters
  • accountId: required (string)
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Cancel action request",
  "type": "object",
  "properties": {
    "comments": {
      "type": "string",
      "description": "Additional info for staff or patron. Format: [STAFF : staff comment \n PATRON : patron comment]"
    },
    "notifyPatron": {
      "type": "boolean",
      "description": "Should send patron notification or not"
    },
    "servicePointId": {
      "type": "string",
      "description": "Unique ID of the service point where the payment was made",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "userName": {
      "type": "string",
      "description": "Name of the user that was logged in when the action was performed"
    },
    "cancellationReason": {
      "type": "string",
      "description": "Reason for cancellation",
      "default": "Cancelled as error"
    }
  },
  "additionalProperties": false,
  "required": [
    "notifyPatron",
    "servicePointId",
    "userName"
  ]
}

Response 201

Action was performed successfully

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Action response",
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "description": "Unique ID of the account",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "amount": {
      "type": "string",
      "description": "Action amount"
    },
    "remainingAmount": {
      "type": "string",
      "description": "Remaining fee/fine amount after action"
    },
    "feefineactions": {
      "type": "array",
      "description": "Fee/fine action records created as a result of an action",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "Fee/fine actions schema",
        "description": "Transactions or activities associated with a user fee/fine account",
        "properties": {
          "dateAction": {
            "description": "Date and time the transaction of the fine/fee was created",
            "type": "string",
            "format": "date-time"
          },
          "typeAction": {
            "description": "Type of activity including the type of transaction",
            "type": "string",
            "x-fqm-values": [
              {
                "value": "Paid partially",
                "label": "Paid partially"
              },
              {
                "value": "Paid fully",
                "label": "Paid fully"
              },
              {
                "value": "Waived partially",
                "label": "Waived partially"
              },
              {
                "value": "Waived fully",
                "label": "Waived fully"
              },
              {
                "value": "Transferred partially",
                "label": "Transferred partially"
              },
              {
                "value": "Transferred fully",
                "label": "Transferred fully"
              },
              {
                "value": "Refunded partially",
                "label": "Refunded partially"
              },
              {
                "value": "Refunded fully",
                "label": "Refunded fully"
              },
              {
                "value": "Credited partially",
                "label": "Credited partially"
              },
              {
                "value": "Credited fully",
                "label": "Credited fully"
              },
              {
                "value": "Cancelled as error",
                "label": "Cancelled as error"
              }
            ]
          },
          "comments": {
            "description": "Additional information entered as part of the activity or on this screen as a 'Staff info only' activity",
            "type": "string"
          },
          "notify": {
            "description": "A flag to determine if a patron should be notified or not",
            "type": "boolean"
          },
          "amountAction": {
            "description": "Amount of activity",
            "javaType": "org.folio.rest.domain.MonetaryValue",
            "type": "number"
          },
          "balance": {
            "description": "Calculated amount of remaining balance based on original fee/fine and what has been paid/waived/transferred/refunded",
            "javaType": "org.folio.rest.domain.MonetaryValue",
            "type": "number"
          },
          "transactionInformation": {
            "description": "Number or other transaction id related to payment",
            "type": "string"
          },
          "createdAt": {
            "description": "ID of the service point where the action was created",
            "$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}$"
          },
          "originalCreatedAt": {
            "description": "Original invalid (non-UUID) value of 'createdAt' moved here when UUID-validation was enabled for 'createdAt'",
            "type": "string"
          },
          "source": {
            "description": "Person who processed activity (from login information)",
            "type": "string"
          },
          "paymentMethod": {
            "description": "Overall status of the action-setting",
            "type": "string"
          },
          "accountId": {
            "description": "ID of the accounts",
            "$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}$"
          },
          "userId": {
            "description": "ID of the user",
            "$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}$"
          },
          "id": {
            "description": "Fine/fee action 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,
        "required": [
          "accountId",
          "userId"
        ]
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "amount",
    "remainingAmount"
  ]
}

Response 404

Fee/fine was not found

Body

Media type: text/plain

Type: any

Example:

Fee/fine was not found

Response 422

Action is not allowed

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Action response",
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "description": "Unique ID of the account",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "amount": {
      "type": "string",
      "description": "Action amount"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional info about request processing failure"
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "amount",
    "errorMessage"
  ]
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error, please contact administrator