Fee Fine Actions (v1)

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

Table of contents

Fee Fine Actions API

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

/feefineactions

Collection of feefineaction items.

GET /feefineactions

Return a list of feefineactions

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

  • offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)

    Skip over a number of elements by specifying an offset value for the query

    Example:

    0
  • limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)

    Limit the number of elements returned in the response

    Example:

    10
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 200

Returns a list of feefineaction items

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Collection of feefineactions",
  "type": "object",
  "properties": {
    "feefineactions": {
      "description": "List of feefineaction items",
      "type": "array",
      "id": "feefineactionsData",
      "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"
          },
          "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/tranferred/refunded",
            "javaType": "org.folio.rest.domain.MonetaryValue",
            "type": "number"
          },
          "transactionInformation": {
            "description": "Number or other transaction id related to payment",
            "type": "string"
          },
          "createdAt": {
            "description": "Location where activity took place (from login information)",
            "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"
        ]
      }
    },
    "totalRecords": {
      "type": "integer"
    }
  },
  "required": [
    "feefineactions",
    "totalRecords"
  ]
}

Example:

{
  "feefineactions":[
    {
      "dateAction":"2017-07-24T01:24:01Z",
      "typeAction":"Payment-ckeck",
      "amountAction": 200.00,
      "balance":50.00,
      "transactionInformation": "Department ENG-345",
      "comments":"This a comment",
      "notify": true,
      "createdAt":"Main Library",
      "source":"Doe,Jane",
      "paymentMethod": "Check",
      "accountId":"fc8a995f-f076-465e-b108-6b5d528d0d38",
      "userId":"1ad737b0-d847-11e6-bf26-cec0c932ce01",
      "id":"bcb9b1d9-b967-41c4-a476-a4c282527cea"
    }
  ],
  "totalRecords":1
}

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 feefineactions -- 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 feefineactions -- 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 /feefineactions

Create a feefineaction

POST /feefineactions
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Fee/fine actions schema",
  "description": "Transactions or activities associated with a user fee/fine account",
  "type": "object",
  "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"
    },
    "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/tranferred/refunded",
      "javaType": "org.folio.rest.domain.MonetaryValue",
      "type": "number"
    },
    "transactionInformation": {
      "description": "Number or other transaction id related to payment",
      "type": "string"
    },
    "createdAt": {
      "description": "Location where activity took place (from login information)",
      "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"
  ]
}

Example:

{
  "dateAction": "2017-07-24T01:24:01Z",
  "typeAction": "Payment-ckeck",
  "amountAction": 200.00,
  "balance": 50.00,
  "transactionInformation": "Department ENG-345",
  "comments": "This a comment",
  "notify": true,
  "createdAt": "Main Library",
  "source": "Doe,Jane",
  "paymentMethod": "Check",
  "accountId": "fc8a995f-f076-465e-b108-6b5d528d0d38",
  "userId": "1ad737b0-d847-11e6-bf26-cec0c932ce01",
  "id": "bcb9b1d9-b967-41c4-a476-a4c282527cea"
}

Response 201

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

Headers
  • Location: required (string)

    URI to the created feefineaction item

Body

Media type: application/json

Type: any

Example:

{
  "dateAction": "2017-07-24T01:24:01Z",
  "typeAction": "Payment-ckeck",
  "amountAction": 200.00,
  "balance": 50.00,
  "transactionInformation": "Department ENG-345",
  "comments": "This a comment",
  "notify": true,
  "createdAt": "Main Library",
  "source": "Doe,Jane",
  "paymentMethod": "Check",
  "accountId": "fc8a995f-f076-465e-b108-6b5d528d0d38",
  "userId": "1ad737b0-d847-11e6-bf26-cec0c932ce01",
  "id": "bcb9b1d9-b967-41c4-a476-a4c282527cea"
}

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

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to create feefineactions -- 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 /feefineactions/{feefineactionId}

Get a single feefineaction

GET /feefineactions/{feefineactionId}
URI Parameters
  • feefineactionId: required (string)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

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": "Fee/fine actions schema",
  "description": "Transactions or activities associated with a user fee/fine account",
  "type": "object",
  "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"
    },
    "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/tranferred/refunded",
      "javaType": "org.folio.rest.domain.MonetaryValue",
      "type": "number"
    },
    "transactionInformation": {
      "description": "Number or other transaction id related to payment",
      "type": "string"
    },
    "createdAt": {
      "description": "Location where activity took place (from login information)",
      "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"
  ]
}

Example:

{
  "dateAction": "2017-07-24T01:24:01Z",
  "typeAction": "Payment-ckeck",
  "amountAction": 200.00,
  "balance": 50.00,
  "transactionInformation": "Department ENG-345",
  "comments": "This a comment",
  "notify": true,
  "createdAt": "Main Library",
  "source": "Doe,Jane",
  "paymentMethod": "Check",
  "accountId": "fc8a995f-f076-465e-b108-6b5d528d0d38",
  "userId": "1ad737b0-d847-11e6-bf26-cec0c932ce01",
  "id": "bcb9b1d9-b967-41c4-a476-a4c282527cea"
}

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"feefineaction 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 /feefineactions/{feefineactionId}

Delete feefineaction item with given {feefineactionId}

DELETE /feefineactions/{feefineactionId}
URI Parameters
  • feefineactionId: required (string)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

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 feefineaction -- constraint violation"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"feefineaction 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 /feefineactions/{feefineactionId}

Update feefineaction item with given {feefineactionId}

PUT /feefineactions/{feefineactionId}
URI Parameters
  • feefineactionId: required (string)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Fee/fine actions schema",
  "description": "Transactions or activities associated with a user fee/fine account",
  "type": "object",
  "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"
    },
    "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/tranferred/refunded",
      "javaType": "org.folio.rest.domain.MonetaryValue",
      "type": "number"
    },
    "transactionInformation": {
      "description": "Number or other transaction id related to payment",
      "type": "string"
    },
    "createdAt": {
      "description": "Location where activity took place (from login information)",
      "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"
  ]
}

Example:

{
  "dateAction": "2017-07-24T01:24:01Z",
  "typeAction": "Payment-ckeck",
  "amountAction": 200.00,
  "balance": 50.00,
  "transactionInformation": "Department ENG-345",
  "comments": "This a comment",
  "notify": true,
  "createdAt": "Main Library",
  "source": "Doe,Jane",
  "paymentMethod": "Check",
  "accountId": "fc8a995f-f076-465e-b108-6b5d528d0d38",
  "userId": "1ad737b0-d847-11e6-bf26-cec0c932ce01",
  "id": "bcb9b1d9-b967-41c4-a476-a4c282527cea"
}

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

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"feefineaction 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