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#",
  "type": "object",
  "properties": {
    "feefineactions": {
      "type": "array",
      "id": "feefineactionsData",
      "items": {
        "type": "object",
        "$ref": "feefineactiondata.json"
      }
    },
    "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",
      "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",
  "type": "object",
  "properties": {
    "dateAction": {
      "type": "string",
      "format": "date-time"
    },
    "typeAction": {
      "type": "string"
    },
    "comments": {
      "type": "string"
    },
    "amountAction": {
      "type": "number"
    },
    "balance": {
      "type": "number"
    },
    "transactionInformation": {
      "type": "string"
    },
    "createdAt": {
      "type": "string"
    },
    "source": {
      "type": "string"
    },
    "paymentMethod": {
      "type": "string"
    },
    "accountId": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    },
    "id": {
      "type": "string"
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "userId",
    "id"
   ]
}

Example:

{
  "dateAction": "2017-07-24T01:24:01Z",
  "typeAction": "Payment-ckeck",
  "amountAction": 200.00,
  "balance": 50.00,
  "transactionInformation": "Department ENG-345",
  "comments": "This a comment",
  "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",
  "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 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",
  "type": "object",
  "properties": {
    "dateAction": {
      "type": "string",
      "format": "date-time"
    },
    "typeAction": {
      "type": "string"
    },
    "comments": {
      "type": "string"
    },
    "amountAction": {
      "type": "number"
    },
    "balance": {
      "type": "number"
    },
    "transactionInformation": {
      "type": "string"
    },
    "createdAt": {
      "type": "string"
    },
    "source": {
      "type": "string"
    },
    "paymentMethod": {
      "type": "string"
    },
    "accountId": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    },
    "id": {
      "type": "string"
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "userId",
    "id"
   ]
}

Example:

{
  "dateAction": "2017-07-24T01:24:01Z",
  "typeAction": "Payment-ckeck",
  "amountAction": 200.00,
  "balance": 50.00,
  "transactionInformation": "Department ENG-345",
  "comments": "This a comment",
  "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",
  "type": "object",
  "properties": {
    "dateAction": {
      "type": "string",
      "format": "date-time"
    },
    "typeAction": {
      "type": "string"
    },
    "comments": {
      "type": "string"
    },
    "amountAction": {
      "type": "number"
    },
    "balance": {
      "type": "number"
    },
    "transactionInformation": {
      "type": "string"
    },
    "createdAt": {
      "type": "string"
    },
    "source": {
      "type": "string"
    },
    "paymentMethod": {
      "type": "string"
    },
    "accountId": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    },
    "id": {
      "type": "string"
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "userId",
    "id"
   ]
}

Example:

{
  "dateAction": "2017-07-24T01:24:01Z",
  "typeAction": "Payment-ckeck",
  "amountAction": 200.00,
  "balance": 50.00,
  "transactionInformation": "Department ENG-345",
  "comments": "This a comment",
  "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 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator