Finance group fiscal year summary (v1)

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

Table of contents

Group Fiscal Year Summary API

This documents the API calls that can be made to manage group-fiscal-year-summaries

Finance group fiscal year summaries

Finance group fiscal year summaries APIs

GET /finance/group-fiscal-year-summaries

Retrieve group-fiscal-year-summary item with given {group-fiscal-year-summaryId}

GET /finance/group-fiscal-year-summaries
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: for example fund.ledgerId

    Example:

    (username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
    
    ["fund.ledgerId", "6e2fbba3-d557-4480-bca3-b6f5c645de04", "="]
    
  • 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 group fiscal year summaries",
  "type": "object",
  "properties": {
    "groupFiscalYearSummaries": {
      "description": "The list of group fiscal year summaries",
      "type": "array",
      "items": {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "A group fiscal year summary",
        "type": "object",
        "properties": {
          "groupId": {
            "description": "UUID of the group record",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "string",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
          },
          "fiscalYearId": {
            "description": "UUID of the fiscal year record",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "string",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
          },
          "allocated": {
            "description": "An amount of the fund within a specific fiscal year",
            "type": "number",
            "readonly": true
          },
          "available": {
            "description": "Currently available amount of the fund within a specific fiscal year",
            "type": "number",
            "readonly": true
          },
          "unavailable": {
            "description": "Unavailable amount of the fund within a specific fiscal year",
            "type": "number",
            "readonly": true
          },
          "netTransfers": {
            "description": "Summing all related budgets netTransfers within a specific fiscal year",
            "type": "number",
            "readonly": true
          },
          "initialAllocation": {
            "description": "Summary of all related budgets initialAllocation within a specific fiscal year",
            "type": "number",
            "readonly": true
          },
          "allocationTo": {
            "description": "Summary of all related budgets allocationTo within a specific fiscal year",
            "type": "number",
            "readonly": true
          },
          "allocationFrom": {
            "description": "Summary of all related budgets allocationFrom within a specific fiscal year",
            "type": "number",
            "readonly": true
          },
          "totalFunding": {
            "description": "Summary of all related budgets totalFunding within a specific fiscal year",
            "type": "number",
            "readonly": true
          },
          "cashBalance": {
            "description": "Summary of all related budgets cashBalance",
            "type": "number",
            "readonly": true
          },
          "awaitingPayment": {
            "description": "Summary of all related budgets awaitingPayment within a specific fiscal year",
            "type": "number",
            "readonly": true
          },
          "encumbered": {
            "description": "Summary of all related budgets encumbered within a specific fiscal year",
            "type": "number",
            "readonly": true
          },
          "expenditures": {
            "description": "Summary of all related budgets expenditures within a specific fiscal year",
            "type": "number",
            "readonly": true
          },
          "overEncumbrance": {
            "description": "Summary of all related budgets overEncumbrance within a specific fiscal year",
            "type": "number",
            "readonly": true
          },
          "overExpended": {
            "description": "Summary of all related budgets overExpended within a specific fiscal year",
            "type": "number",
            "readonly": true
          }
        },
        "additionalProperties": false,
        "required": [
          "groupId",
          "fiscalYearId"
        ]
      }
    },
    "totalRecords": {
      "description": "The number of records contained in this collection",
      "type": "integer",
      "minimum": 0
    }
  },
  "additionalProperties": false,
  "required": [
    "groupFiscalYearSummaries",
    "totalRecords"
  ]
}

Example:

{
  "groupFiscalYearSummaries": [
    {
      "groupId": "f33ed99b-852a-4f90-9891-5efe0feab165",
      "fiscalYearId": "ac2164c7-ba3d-1bc2-a12c-e35ceccbfaf2",
      "allocated": 24500,
      "initialAllocation": 11000,
      "allocationTo": 13500,
      "allocationFrom": 0,
      "available": 21990,
      "netTransfers": 2500,
      "unavailable": 10,
      "expenditures": 10,
      "encumbered": 0,
      "awaitingPayment": 0,
      "overEncumbrance": 0,
      "overExpended": 0,
      "totalFunding": 22000,
      "cashBalance": 21990
    },
    {
      "groupId": "66f84ff8-68e1-4f10-8814-35bcd34c32a0",
      "fiscalYearId": "a4ee40d4-5176-4b76-aa46-2e17e9161795",
      "allocated": 2450,
      "initialAllocation": 1100,
      "allocationTo": 1350,
      "allocationFrom": 0,
      "available": 2199,
      "netTransfers": 250,
      "unavailable": 1,
      "expenditures": 1,
      "encumbered": 0,
      "awaitingPayment": 0,
      "overEncumbrance": 0,
      "overExpended": 0,
      "totalFunding": 2200,
      "cashBalance": 2199
    }
  ],
  "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: application/json

Type: any

Example:

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

Media type: text/plain

Type: any

Example:

"unable to list group-fiscal-year-summaries -- malformed parameter 'query', syntax error at column 6"

Response 401

Not authorized to perform requested action

Body

Media type: application/json

Type: any

Example:

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

Media type: text/plain

Type: any

Example:

"unable to list group-fiscal-year-summaries -- unauthorized"

Response 404

Item with a given ID not found

Body

Media type: application/json

Type: any

Example:

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

Media type: text/plain

Type: any

Example:

"group-fiscal-year-summary not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: application/json

Type: any

Example:

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

Media type: text/plain

Type: any

Example:

internal server error, contact administrator