mod-finance-storage (v1)

https://github.com/folio-org/mod-finance-storage

Table of contents

mod-finance-storage

CRUD APIs used to manage miscellaneous APIs.

/finance-storage/ledger-fiscal-years

Entity representing a ledger-fiscal-year

ledger FiscalYear

Get the ledger for a given fiscal year

GET /finance-storage/ledger-fiscal-years
Query Parameters
  • 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
  • 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
    
    ledger.name==Main AND allocated==200 sortBy currency
    
  • 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#",
  "description": "A collection of ledgerFY",
  "type": "object",
  "properties": {
    "ledgerFY": {
      "description": "Collection of ledgerFY records",
      "type": "array",
      "id": "ledgerFY",
      "items": {
        "type": "object",
        "$ref": "ledgerFY.json"
      }
    },
    "totalRecords": {
      "description": "The number of objects contained in this collection",
      "type": "integer"
    }
  },
  "additionalProperties": false,
  "required": [
    "ledgerFY",
    "totalRecords"
  ]
}

Example:

{
  "ledgerFY": [
    {
      "id": "df2f5cfd-ae6b-437a-be4d-9808f7529bad",
      "ledgerId": "5029701f-4220-447e-8ca8-94eb9d97479f",
      "fiscalYearId": "002c948a-8269-41c9-8733-8dc07ffd038e",
      "allocated": 2000,
      "available": 1000,
      "unavailable": 1000,
      "currency": "USD"
    }
  ],
  "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 ledger-fiscal-years -- 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 ledger-fiscal-years -- unauthorized"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"ledger-fiscal-year not found"

Response 422

Validation errors

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "error.schema"
      }
    },
    "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