mod-finance-storage (v3)

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

Table of contents

mod-finance-storage (Transactions)

CRUD APIs used to manage transactions.

/finance-storage/transactions

Collection of transaction items.

POST /finance-storage/transactions

Create a new transaction item.

POST /finance-storage/transactions
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#",
  "description": "A financial transaction",
  "type": "object",
  "extends": {
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Purchase order number prefix",
    "type": "object",
    "javaName": "entity",
    "properties": {
      "id": {
        "description": "UUID identifying this entity",
        "$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}$"
      }
    },
    "additionalProperties": false
  },
  "properties": {
    "id": {
      "description": "UUID of this transaction",
      "$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}$"
    },
    "amount": {
      "description": "The amount of this transaction. For encumbrances: This is initialAmountEncumbered - (amountAwaitingPayment + amountExpended)",
      "type": "number"
    },
    "awaitingPayment": {
      "description": "Pending payment sub-object - holds awaiting payment-specific information not applicable to other transaction types",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "type": "object",
      "properties": {
        "encumbranceId": {
          "description": "UUID of the encumbrance to updated",
          "$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}$"
        },
        "releaseEncumbrance": {
          "description": "Whether or not remaining encumbered money should be released",
          "type": "boolean",
          "default": false
        }
      },
      "additionalProperties": false
    },
    "currency": {
      "description": "Currency code for this transaction - from the system currency",
      "type": "string"
    },
    "description": {
      "description": "Description of this transaction",
      "type": "string"
    },
    "encumbrance": {
      "description": "Encumbrance sub-object - holds encumbrance-specific information not applicable to other transaction types",
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "properties": {
        "amountAwaitingPayment": {
          "default": 0,
          "description": "Deprecated! Going to be removed in next release. The amount of awaiting for payment",
          "type": "number"
        },
        "amountExpended": {
          "default": 0,
          "description": "The amount currently expended by this encumbrance",
          "type": "number"
        },
        "initialAmountEncumbered": {
          "default": 0,
          "description": "The initial amount of this encumbrance. Shouldn't change once create",
          "type": "number"
        },
        "status": {
          "default": "Unreleased",
          "description": "The status of this encumbrance",
          "type": "string",
          "enum": [
            "Released",
            "Unreleased",
            "Pending"
          ]
        },
        "orderType": {
          "description": "Taken from the purchase order",
          "type": "string",
          "enum": [
            "One-Time",
            "Ongoing"
          ]
        },
        "orderStatus": {
          "description": "Taken from the purchase order",
          "type": "string",
          "default": "Open",
          "enum": [
            "Pending",
            "Open",
            "Closed"
          ]
        },
        "subscription": {
          "description": "Taken from the purchase Order,for fiscal year rollover",
          "type": "boolean"
        },
        "reEncumber": {
          "description": "Taken from the purchase Order,for fiscal year rollover",
          "type": "boolean"
        },
        "sourcePurchaseOrderId": {
          "description": "UUID of the purchase order associated with this encumbrance",
          "$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}$"
        },
        "sourcePoLineId": {
          "description": "UUID of the poLine associated with this encumbrance",
          "$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}$"
        }
      },
      "additionalProperties": false,
      "required": [
        "initialAmountEncumbered",
        "status",
        "orderType",
        "subscription",
        "reEncumber",
        "sourcePurchaseOrderId",
        "sourcePoLineId"
      ]
    },
    "expenseClassId": {
      "description": "UUID of the associated expense class",
      "type": "string",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "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 that the transaction is taking place in",
      "$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}$"
    },
    "fromFundId": {
      "description": "UUID of the fund money is moving from",
      "$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}$"
    },
    "invoiceCancelled": {
      "description": "Indicates that related invoice was cancelled",
      "type": "boolean"
    },
    "paymentEncumbranceId": {
      "description": "UUID of the encumbrance associated with this payment/credit taking place.",
      "$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}$"
    },
    "source": {
      "description": "The readable identifier of the record that resulted in the creation of this transaction",
      "type": "string",
      "enum": [
        "User",
        "PoLine",
        "Invoice"
      ]
    },
    "sourceFiscalYearId": {
      "description": "UUID of the fiscal year that triggered the creation of this transaction (Used during fiscal year rollover)",
      "$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}$"
    },
    "sourceInvoiceId": {
      "description": "UUID of the Invoice that triggered the creation of this transaction",
      "$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}$"
    },
    "sourceInvoiceLineId": {
      "description": "UUID of the Invoice Line that triggered the creation of this transaction",
      "$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}$"
    },
    "tags": {
      "description": "Arbitrary tags associated with this transaction",
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "tags",
      "properties": {
        "tagList": {
          "description": "List of tags",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "toFundId": {
      "description": "UUID of the fund money is moving to",
      "$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}$"
    },
    "transactionType": {
      "description": "This describes the type of transaction",
      "enum": [
        "Allocation",
        "Credit",
        "Encumbrance",
        "Payment",
        "Pending payment",
        "Rollover transfer",
        "Transfer"
      ],
      "type": "string"
    },
    "metadata": {
      "readonly": true,
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Metadata Schema",
      "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
      "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"
      ]
    }
  },
  "required": [
    "amount",
    "currency",
    "fiscalYearId",
    "source",
    "transactionType"
  ],
  "additionalProperties": false
}

Example:

{
  "id": "12ac70a4-5c9d-112f-9acb-852adf67d7e1",
  "amount": 25,
  "currency": "USD",
  "description": "PO_Line: History of Incas",
  "fiscalYearId": "4438bc3b-4b4a-4e5e-9886-5f69b48a7a32",
  "fromFundId": "27f27438-3197-4281-a353-511829421d6e",
  "invoiceCancelled": false,
  "paymentEncumbranceId": "80c28fb4-c34e-48d6-b8c2-de6660c3e0aa",
  "source": "Invoice",
  "sourceFiscalYearId": "01705ce5-3c3d-4c30-b23d-a36feec28259",
  "sourceInvoiceId": "b360db6c-b825-4d74-ac63-5be506892e2b",
  "sourceInvoiceLineId": "2be1e551-be27-4b03-b770-30e5e8211d19",
  "tags": {
    "tagList": [
      "important"
    ]
  },
  "toFundId": "2e51c019-97f3-4523-87e9-59250e3b48bc",
  "transactionType": "Payment",
  "metadata": {
    "createdDate": "2018-07-19T00:00:00.000+0000",
    "createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
  }
}

Response 201

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

Headers
  • Location: required (string)

    URI to the created transaction item

Body

Media type: application/json

Type: any

Example:

{
  "id": "12ac70a4-5c9d-112f-9acb-852adf67d7e1",
  "amount": 25,
  "currency": "USD",
  "description": "PO_Line: History of Incas",
  "fiscalYearId": "4438bc3b-4b4a-4e5e-9886-5f69b48a7a32",
  "fromFundId": "27f27438-3197-4281-a353-511829421d6e",
  "invoiceCancelled": false,
  "paymentEncumbranceId": "80c28fb4-c34e-48d6-b8c2-de6660c3e0aa",
  "source": "Invoice",
  "sourceFiscalYearId": "01705ce5-3c3d-4c30-b23d-a36feec28259",
  "sourceInvoiceId": "b360db6c-b825-4d74-ac63-5be506892e2b",
  "sourceInvoiceLineId": "2be1e551-be27-4b03-b770-30e5e8211d19",
  "tags": {
    "tagList": [
      "important"
    ]
  },
  "toFundId": "2e51c019-97f3-4523-87e9-59250e3b48bc",
  "transactionType": "Payment",
  "metadata": {
    "createdDate": "2018-07-19T00:00:00.000+0000",
    "createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
  }
}

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

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to create transactions -- unauthorized

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",
        "$schema": "http://json-schema.org/draft-04/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": {
            "type": "object",
            "description": "Error message parameters",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "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 /finance-storage/transactions

Get list of transactions

GET /finance-storage/transactions
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 code

    Example:

    (username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
    
    ["code", "MEDGRANT", "="]
    
  • 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 transaction items

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A collection of transactions",
  "type": "object",
  "properties": {
    "transactions": {
      "description": "The list of objects contained in this collection",
      "type": "array",
      "id": "transactions",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "A financial transaction",
        "extends": {
          "$schema": "http://json-schema.org/draft-04/schema#",
          "description": "Purchase order number prefix",
          "type": "object",
          "javaName": "entity",
          "properties": {
            "id": {
              "description": "UUID identifying this entity",
              "$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}$"
            }
          },
          "additionalProperties": false
        },
        "properties": {
          "id": {
            "description": "UUID of this transaction",
            "$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}$"
          },
          "amount": {
            "description": "The amount of this transaction. For encumbrances: This is initialAmountEncumbered - (amountAwaitingPayment + amountExpended)",
            "type": "number"
          },
          "awaitingPayment": {
            "description": "Pending payment sub-object - holds awaiting payment-specific information not applicable to other transaction types",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "object",
            "properties": {
              "encumbranceId": {
                "description": "UUID of the encumbrance to updated",
                "$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}$"
              },
              "releaseEncumbrance": {
                "description": "Whether or not remaining encumbered money should be released",
                "type": "boolean",
                "default": false
              }
            },
            "additionalProperties": false
          },
          "currency": {
            "description": "Currency code for this transaction - from the system currency",
            "type": "string"
          },
          "description": {
            "description": "Description of this transaction",
            "type": "string"
          },
          "encumbrance": {
            "description": "Encumbrance sub-object - holds encumbrance-specific information not applicable to other transaction types",
            "type": "object",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "properties": {
              "amountAwaitingPayment": {
                "default": 0,
                "description": "Deprecated! Going to be removed in next release. The amount of awaiting for payment",
                "type": "number"
              },
              "amountExpended": {
                "default": 0,
                "description": "The amount currently expended by this encumbrance",
                "type": "number"
              },
              "initialAmountEncumbered": {
                "default": 0,
                "description": "The initial amount of this encumbrance. Shouldn't change once create",
                "type": "number"
              },
              "status": {
                "default": "Unreleased",
                "description": "The status of this encumbrance",
                "type": "string",
                "enum": [
                  "Released",
                  "Unreleased",
                  "Pending"
                ]
              },
              "orderType": {
                "description": "Taken from the purchase order",
                "type": "string",
                "enum": [
                  "One-Time",
                  "Ongoing"
                ]
              },
              "orderStatus": {
                "description": "Taken from the purchase order",
                "type": "string",
                "default": "Open",
                "enum": [
                  "Pending",
                  "Open",
                  "Closed"
                ]
              },
              "subscription": {
                "description": "Taken from the purchase Order,for fiscal year rollover",
                "type": "boolean"
              },
              "reEncumber": {
                "description": "Taken from the purchase Order,for fiscal year rollover",
                "type": "boolean"
              },
              "sourcePurchaseOrderId": {
                "description": "UUID of the purchase order associated with this encumbrance",
                "$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}$"
              },
              "sourcePoLineId": {
                "description": "UUID of the poLine associated with this encumbrance",
                "$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}$"
              }
            },
            "additionalProperties": false,
            "required": [
              "initialAmountEncumbered",
              "status",
              "orderType",
              "subscription",
              "reEncumber",
              "sourcePurchaseOrderId",
              "sourcePoLineId"
            ]
          },
          "expenseClassId": {
            "description": "UUID of the associated expense class",
            "type": "string",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "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 that the transaction is taking place in",
            "$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}$"
          },
          "fromFundId": {
            "description": "UUID of the fund money is moving from",
            "$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}$"
          },
          "invoiceCancelled": {
            "description": "Indicates that related invoice was cancelled",
            "type": "boolean"
          },
          "paymentEncumbranceId": {
            "description": "UUID of the encumbrance associated with this payment/credit taking place.",
            "$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}$"
          },
          "source": {
            "description": "The readable identifier of the record that resulted in the creation of this transaction",
            "type": "string",
            "enum": [
              "User",
              "PoLine",
              "Invoice"
            ]
          },
          "sourceFiscalYearId": {
            "description": "UUID of the fiscal year that triggered the creation of this transaction (Used during fiscal year rollover)",
            "$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}$"
          },
          "sourceInvoiceId": {
            "description": "UUID of the Invoice that triggered the creation of this transaction",
            "$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}$"
          },
          "sourceInvoiceLineId": {
            "description": "UUID of the Invoice Line that triggered the creation of this transaction",
            "$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}$"
          },
          "tags": {
            "description": "Arbitrary tags associated with this transaction",
            "type": "object",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "title": "tags",
            "properties": {
              "tagList": {
                "description": "List of tags",
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": false
          },
          "toFundId": {
            "description": "UUID of the fund money is moving to",
            "$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}$"
          },
          "transactionType": {
            "description": "This describes the type of transaction",
            "enum": [
              "Allocation",
              "Credit",
              "Encumbrance",
              "Payment",
              "Pending payment",
              "Rollover transfer",
              "Transfer"
            ],
            "type": "string"
          },
          "metadata": {
            "readonly": true,
            "type": "object",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "title": "Metadata Schema",
            "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
            "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"
            ]
          }
        },
        "required": [
          "amount",
          "currency",
          "fiscalYearId",
          "source",
          "transactionType"
        ],
        "additionalProperties": false
      }
    },
    "totalRecords": {
      "description": "The number of objects in this collection",
      "type": "integer"
    }
  },
  "additionalProperties": false,
  "required": [
    "transactions",
    "totalRecords"
  ]
}

Example:

{
  "transactions": [
    {
      "id": "12ac70a4-5c9d-112f-9acb-852adf67d7e1",
      "amount": 140.80,
      "currency": "USD",
      "description": "PO_Line: History of Incas",
      "encumbrance": {
        "amountExpended": 1567.92,
        "amountAwaitingPayment": 12.50,
        "initialAmountEncumbered": 1720.50,
        "status": "Unreleased",
        "orderType":  "One-Time",
        "orderStatus":  "Open",
        "subscription": false,
        "reEncumber": false,
        "sourcePurchaseOrderId": "e5ae4afd-3fa9-494e-a972-f541df9b877e",
        "sourcePoLineId": "c5ced39d-672f-3cba-a13a-ceb06a5d4c6b"
      },
      "fiscalYearId": "4438bc3b-4b4a-4e5e-9886-5f69b48a7a32",
      "fromFundId": "27f27438-3197-4281-a353-511829421d6e",
      "invoiceCancelled": false,
      "paymentEncumbranceId": "80c28fb4-c34e-48d6-b8c2-de6660c3e0aa",
      "source": "Invoice",
      "sourceFiscalYearId": "01705ce5-3c3d-4c30-b23d-a36feec28259",
      "sourceInvoiceId": "b360db6c-b825-4d74-ac63-5be506892e2b",
      "tags": {
        "tagList": [
          "important"
        ]
      },
      "toFundId": "2e51c019-97f3-4523-87e9-59250e3b48bc",
      "transactionType": "Encumbrance",
      "metadata": {
        "createdDate": "2018-07-19T00:00:00.000+0000",
        "createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
      }
    },
    {
      "id": "a4780d61-e9c7-4206-b203-a8b22a6d5c38",
      "amount": 25,
      "currency": "USD",
      "description": "PO_Line: History of Incas",
      "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e",
      "fromFundId": "7fbd5d84-62d1-44c6-9c45-6cb173998bbd",
      "paymentEncumbranceId": "80c28fb4-c34e-48d6-b8c2-de6660c3e0aa",
      "source": "Invoice",
      "sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e",
      "sourceInvoiceId": "041c1fe8-adfa-44eb-b6b3-f85acdd71f81",
      "sourceInvoiceLineId": "2be1e551-be27-4b03-b770-30e5e8211d19",
      "tags": {
        "tagList": [
          "important"
        ]
      },
      "toFundId": "69640328-788e-43fc-9c3c-af39e243f3b7",
      "transactionType": "Payment"
    }
  ],
  "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 transactions -- 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 transactions -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

PUT /finance-storage/transactions/{id}

Update transaction item with given {transactionId}

PUT /finance-storage/transactions/{id}
URI Parameters
  • id: required (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}$)

    The UUID of a transaction

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#",
  "description": "A financial transaction",
  "type": "object",
  "extends": {
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Purchase order number prefix",
    "type": "object",
    "javaName": "entity",
    "properties": {
      "id": {
        "description": "UUID identifying this entity",
        "$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}$"
      }
    },
    "additionalProperties": false
  },
  "properties": {
    "id": {
      "description": "UUID of this transaction",
      "$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}$"
    },
    "amount": {
      "description": "The amount of this transaction. For encumbrances: This is initialAmountEncumbered - (amountAwaitingPayment + amountExpended)",
      "type": "number"
    },
    "awaitingPayment": {
      "description": "Pending payment sub-object - holds awaiting payment-specific information not applicable to other transaction types",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "type": "object",
      "properties": {
        "encumbranceId": {
          "description": "UUID of the encumbrance to updated",
          "$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}$"
        },
        "releaseEncumbrance": {
          "description": "Whether or not remaining encumbered money should be released",
          "type": "boolean",
          "default": false
        }
      },
      "additionalProperties": false
    },
    "currency": {
      "description": "Currency code for this transaction - from the system currency",
      "type": "string"
    },
    "description": {
      "description": "Description of this transaction",
      "type": "string"
    },
    "encumbrance": {
      "description": "Encumbrance sub-object - holds encumbrance-specific information not applicable to other transaction types",
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "properties": {
        "amountAwaitingPayment": {
          "default": 0,
          "description": "Deprecated! Going to be removed in next release. The amount of awaiting for payment",
          "type": "number"
        },
        "amountExpended": {
          "default": 0,
          "description": "The amount currently expended by this encumbrance",
          "type": "number"
        },
        "initialAmountEncumbered": {
          "default": 0,
          "description": "The initial amount of this encumbrance. Shouldn't change once create",
          "type": "number"
        },
        "status": {
          "default": "Unreleased",
          "description": "The status of this encumbrance",
          "type": "string",
          "enum": [
            "Released",
            "Unreleased",
            "Pending"
          ]
        },
        "orderType": {
          "description": "Taken from the purchase order",
          "type": "string",
          "enum": [
            "One-Time",
            "Ongoing"
          ]
        },
        "orderStatus": {
          "description": "Taken from the purchase order",
          "type": "string",
          "default": "Open",
          "enum": [
            "Pending",
            "Open",
            "Closed"
          ]
        },
        "subscription": {
          "description": "Taken from the purchase Order,for fiscal year rollover",
          "type": "boolean"
        },
        "reEncumber": {
          "description": "Taken from the purchase Order,for fiscal year rollover",
          "type": "boolean"
        },
        "sourcePurchaseOrderId": {
          "description": "UUID of the purchase order associated with this encumbrance",
          "$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}$"
        },
        "sourcePoLineId": {
          "description": "UUID of the poLine associated with this encumbrance",
          "$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}$"
        }
      },
      "additionalProperties": false,
      "required": [
        "initialAmountEncumbered",
        "status",
        "orderType",
        "subscription",
        "reEncumber",
        "sourcePurchaseOrderId",
        "sourcePoLineId"
      ]
    },
    "expenseClassId": {
      "description": "UUID of the associated expense class",
      "type": "string",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "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 that the transaction is taking place in",
      "$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}$"
    },
    "fromFundId": {
      "description": "UUID of the fund money is moving from",
      "$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}$"
    },
    "invoiceCancelled": {
      "description": "Indicates that related invoice was cancelled",
      "type": "boolean"
    },
    "paymentEncumbranceId": {
      "description": "UUID of the encumbrance associated with this payment/credit taking place.",
      "$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}$"
    },
    "source": {
      "description": "The readable identifier of the record that resulted in the creation of this transaction",
      "type": "string",
      "enum": [
        "User",
        "PoLine",
        "Invoice"
      ]
    },
    "sourceFiscalYearId": {
      "description": "UUID of the fiscal year that triggered the creation of this transaction (Used during fiscal year rollover)",
      "$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}$"
    },
    "sourceInvoiceId": {
      "description": "UUID of the Invoice that triggered the creation of this transaction",
      "$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}$"
    },
    "sourceInvoiceLineId": {
      "description": "UUID of the Invoice Line that triggered the creation of this transaction",
      "$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}$"
    },
    "tags": {
      "description": "Arbitrary tags associated with this transaction",
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "tags",
      "properties": {
        "tagList": {
          "description": "List of tags",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "toFundId": {
      "description": "UUID of the fund money is moving to",
      "$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}$"
    },
    "transactionType": {
      "description": "This describes the type of transaction",
      "enum": [
        "Allocation",
        "Credit",
        "Encumbrance",
        "Payment",
        "Pending payment",
        "Rollover transfer",
        "Transfer"
      ],
      "type": "string"
    },
    "metadata": {
      "readonly": true,
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Metadata Schema",
      "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
      "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"
      ]
    }
  },
  "required": [
    "amount",
    "currency",
    "fiscalYearId",
    "source",
    "transactionType"
  ],
  "additionalProperties": false
}

Example:

{
  "id": "12ac70a4-5c9d-112f-9acb-852adf67d7e1",
  "amount": 25,
  "currency": "USD",
  "description": "PO_Line: History of Incas",
  "fiscalYearId": "4438bc3b-4b4a-4e5e-9886-5f69b48a7a32",
  "fromFundId": "27f27438-3197-4281-a353-511829421d6e",
  "invoiceCancelled": false,
  "paymentEncumbranceId": "80c28fb4-c34e-48d6-b8c2-de6660c3e0aa",
  "source": "Invoice",
  "sourceFiscalYearId": "01705ce5-3c3d-4c30-b23d-a36feec28259",
  "sourceInvoiceId": "b360db6c-b825-4d74-ac63-5be506892e2b",
  "sourceInvoiceLineId": "2be1e551-be27-4b03-b770-30e5e8211d19",
  "tags": {
    "tagList": [
      "important"
    ]
  },
  "toFundId": "2e51c019-97f3-4523-87e9-59250e3b48bc",
  "transactionType": "Payment",
  "metadata": {
    "createdDate": "2018-07-19T00:00:00.000+0000",
    "createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
  }
}

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

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"transaction 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",
        "$schema": "http://json-schema.org/draft-04/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": {
            "type": "object",
            "description": "Error message parameters",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "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 /finance-storage/transactions/{id}

Retrieve transaction item with given {transactionId}

GET /finance-storage/transactions/{id}
URI Parameters
  • id: required (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}$)

    The UUID of a transaction

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#",
  "description": "A financial transaction",
  "type": "object",
  "extends": {
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Purchase order number prefix",
    "type": "object",
    "javaName": "entity",
    "properties": {
      "id": {
        "description": "UUID identifying this entity",
        "$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}$"
      }
    },
    "additionalProperties": false
  },
  "properties": {
    "id": {
      "description": "UUID of this transaction",
      "$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}$"
    },
    "amount": {
      "description": "The amount of this transaction. For encumbrances: This is initialAmountEncumbered - (amountAwaitingPayment + amountExpended)",
      "type": "number"
    },
    "awaitingPayment": {
      "description": "Pending payment sub-object - holds awaiting payment-specific information not applicable to other transaction types",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "type": "object",
      "properties": {
        "encumbranceId": {
          "description": "UUID of the encumbrance to updated",
          "$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}$"
        },
        "releaseEncumbrance": {
          "description": "Whether or not remaining encumbered money should be released",
          "type": "boolean",
          "default": false
        }
      },
      "additionalProperties": false
    },
    "currency": {
      "description": "Currency code for this transaction - from the system currency",
      "type": "string"
    },
    "description": {
      "description": "Description of this transaction",
      "type": "string"
    },
    "encumbrance": {
      "description": "Encumbrance sub-object - holds encumbrance-specific information not applicable to other transaction types",
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "properties": {
        "amountAwaitingPayment": {
          "default": 0,
          "description": "Deprecated! Going to be removed in next release. The amount of awaiting for payment",
          "type": "number"
        },
        "amountExpended": {
          "default": 0,
          "description": "The amount currently expended by this encumbrance",
          "type": "number"
        },
        "initialAmountEncumbered": {
          "default": 0,
          "description": "The initial amount of this encumbrance. Shouldn't change once create",
          "type": "number"
        },
        "status": {
          "default": "Unreleased",
          "description": "The status of this encumbrance",
          "type": "string",
          "enum": [
            "Released",
            "Unreleased",
            "Pending"
          ]
        },
        "orderType": {
          "description": "Taken from the purchase order",
          "type": "string",
          "enum": [
            "One-Time",
            "Ongoing"
          ]
        },
        "orderStatus": {
          "description": "Taken from the purchase order",
          "type": "string",
          "default": "Open",
          "enum": [
            "Pending",
            "Open",
            "Closed"
          ]
        },
        "subscription": {
          "description": "Taken from the purchase Order,for fiscal year rollover",
          "type": "boolean"
        },
        "reEncumber": {
          "description": "Taken from the purchase Order,for fiscal year rollover",
          "type": "boolean"
        },
        "sourcePurchaseOrderId": {
          "description": "UUID of the purchase order associated with this encumbrance",
          "$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}$"
        },
        "sourcePoLineId": {
          "description": "UUID of the poLine associated with this encumbrance",
          "$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}$"
        }
      },
      "additionalProperties": false,
      "required": [
        "initialAmountEncumbered",
        "status",
        "orderType",
        "subscription",
        "reEncumber",
        "sourcePurchaseOrderId",
        "sourcePoLineId"
      ]
    },
    "expenseClassId": {
      "description": "UUID of the associated expense class",
      "type": "string",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "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 that the transaction is taking place in",
      "$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}$"
    },
    "fromFundId": {
      "description": "UUID of the fund money is moving from",
      "$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}$"
    },
    "invoiceCancelled": {
      "description": "Indicates that related invoice was cancelled",
      "type": "boolean"
    },
    "paymentEncumbranceId": {
      "description": "UUID of the encumbrance associated with this payment/credit taking place.",
      "$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}$"
    },
    "source": {
      "description": "The readable identifier of the record that resulted in the creation of this transaction",
      "type": "string",
      "enum": [
        "User",
        "PoLine",
        "Invoice"
      ]
    },
    "sourceFiscalYearId": {
      "description": "UUID of the fiscal year that triggered the creation of this transaction (Used during fiscal year rollover)",
      "$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}$"
    },
    "sourceInvoiceId": {
      "description": "UUID of the Invoice that triggered the creation of this transaction",
      "$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}$"
    },
    "sourceInvoiceLineId": {
      "description": "UUID of the Invoice Line that triggered the creation of this transaction",
      "$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}$"
    },
    "tags": {
      "description": "Arbitrary tags associated with this transaction",
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "tags",
      "properties": {
        "tagList": {
          "description": "List of tags",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "toFundId": {
      "description": "UUID of the fund money is moving to",
      "$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}$"
    },
    "transactionType": {
      "description": "This describes the type of transaction",
      "enum": [
        "Allocation",
        "Credit",
        "Encumbrance",
        "Payment",
        "Pending payment",
        "Rollover transfer",
        "Transfer"
      ],
      "type": "string"
    },
    "metadata": {
      "readonly": true,
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Metadata Schema",
      "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
      "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"
      ]
    }
  },
  "required": [
    "amount",
    "currency",
    "fiscalYearId",
    "source",
    "transactionType"
  ],
  "additionalProperties": false
}

Example:

{
  "id": "12ac70a4-5c9d-112f-9acb-852adf67d7e1",
  "amount": 25,
  "currency": "USD",
  "description": "PO_Line: History of Incas",
  "fiscalYearId": "4438bc3b-4b4a-4e5e-9886-5f69b48a7a32",
  "fromFundId": "27f27438-3197-4281-a353-511829421d6e",
  "invoiceCancelled": false,
  "paymentEncumbranceId": "80c28fb4-c34e-48d6-b8c2-de6660c3e0aa",
  "source": "Invoice",
  "sourceFiscalYearId": "01705ce5-3c3d-4c30-b23d-a36feec28259",
  "sourceInvoiceId": "b360db6c-b825-4d74-ac63-5be506892e2b",
  "sourceInvoiceLineId": "2be1e551-be27-4b03-b770-30e5e8211d19",
  "tags": {
    "tagList": [
      "important"
    ]
  },
  "toFundId": "2e51c019-97f3-4523-87e9-59250e3b48bc",
  "transactionType": "Payment",
  "metadata": {
    "createdDate": "2018-07-19T00:00:00.000+0000",
    "createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
  }
}

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"transaction 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 /finance-storage/transactions/{id}

Delete transaction item with given {transactionId}

DELETE /finance-storage/transactions/{id}
URI Parameters
  • id: required (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}$)

    The UUID of a transaction

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

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

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