mod-finance version v1.1
https://github.com/folio-org/mod-finance
mod-finance (Transactions)
CRUD APIs used to manage transactions.
/finance
Create an allocation
Create an allocation by transaction
post /finance/allocations
Create an allocation by 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}$"
},
"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": "ee683f15-b1e1-40c8-866d-4e70da03c723",
"amount": 25,
"currency": "USD",
"description": "PO_Line: History of Incas",
"fiscalYearId": "4438bc3b-4b4a-4e5e-9886-5f69b48a7a32",
"fromFundId": "27f27438-3197-4281-a353-511829421d6e",
"paymentEncumbranceId": "80c28fb4-c34e-48d6-b8c2-de6660c3e0aa",
"source": "Invoice",
"sourceFiscalYearId": "01705ce5-3c3d-4c30-b23d-a36feec28259",
"tags": {
"tagList": [
"important"
]
},
"toFundId": "2e51c019-97f3-4523-87e9-59250e3b48bc",
"transactionType": "Allocation",
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1",
"updatedDate" : "2018-07-19T00:00:00.000+0000",
"updatedByUserId" : "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
HTTP status code 201
Returns processing result of the allocations
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}$"
},
"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": "ee683f15-b1e1-40c8-866d-4e70da03c723",
"amount": 25,
"currency": "USD",
"description": "PO_Line: History of Incas",
"fiscalYearId": "4438bc3b-4b4a-4e5e-9886-5f69b48a7a32",
"fromFundId": "27f27438-3197-4281-a353-511829421d6e",
"paymentEncumbranceId": "80c28fb4-c34e-48d6-b8c2-de6660c3e0aa",
"source": "Invoice",
"sourceFiscalYearId": "01705ce5-3c3d-4c30-b23d-a36feec28259",
"tags": {
"tagList": [
"important"
]
},
"toFundId": "2e51c019-97f3-4523-87e9-59250e3b48bc",
"transactionType": "Allocation",
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1",
"updatedDate" : "2018-07-19T00:00:00.000+0000",
"updatedByUserId" : "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
HTTP status code 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 update allocation -- malformed JSON at 13:4"
HTTP status code 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"
}
]
}
]
}
HTTP status code 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
Create a transfer
Create a transfer by transaction
post /finance/transfers
Create a transfer by 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}$"
},
"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": "72d8192d-4e32-47d8-848f-4d84eb047726",
"amount": 25,
"currency": "USD",
"description": "PO_Line: History of Incas",
"fiscalYearId": "4438bc3b-4b4a-4e5e-9886-5f69b48a7a32",
"fromFundId": "27f27438-3197-4281-a353-511829421d6e",
"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": "Transfer",
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1",
"updatedDate": "2018-07-19T00:00:00.000+0000",
"updatedByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
HTTP status code 201
Returns processing result of the transfers
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}$"
},
"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": "72d8192d-4e32-47d8-848f-4d84eb047726",
"amount": 25,
"currency": "USD",
"description": "PO_Line: History of Incas",
"fiscalYearId": "4438bc3b-4b4a-4e5e-9886-5f69b48a7a32",
"fromFundId": "27f27438-3197-4281-a353-511829421d6e",
"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": "Transfer",
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1",
"updatedDate": "2018-07-19T00:00:00.000+0000",
"updatedByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
HTTP status code 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 update transfer -- malformed JSON at 13:4"
HTTP status code 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"
}
]
}
]
}
HTTP status code 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
Create a encumbrance
Create an encumbrance by transaction
post /finance/encumbrances
Create an encumbrance by 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}$"
},
"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": "b7553168-60af-4e6d-bcd3-078199a0b353",
"amount": 25.17,
"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",
"paymentEncumbranceId": "80c28fb4-c34e-48d6-b8c2-de6660c3e0aa",
"source": "Invoice",
"sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e",
"sourceInvoiceId": "b360db6c-b825-4d74-ac63-5be506892e2b",
"sourceInvoiceLineId": "2be1e551-be27-4b03-b770-30e5e8211d19",
"tags": {
"tagList": [
"important"
]
},
"toFundId": "69640328-788e-43fc-9c3c-af39e243f3b7",
"transactionType": "Encumbrance",
"metadata": {
"createdDate": "2019-10-31T09:21:44.386+0000",
"createdByUserId": "02408630-bce2-5a82-b577-9be500e9b324",
"updatedDate": "2019-10-31T09:21:44.386+0000",
"updatedByUserId": "02408630-bce2-5a82-b577-9be500e9b324"
}
}
HTTP status code 201
Returns processing result of the encumbrances
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}$"
},
"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": "b7553168-60af-4e6d-bcd3-078199a0b353",
"amount": 25.17,
"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",
"paymentEncumbranceId": "80c28fb4-c34e-48d6-b8c2-de6660c3e0aa",
"source": "Invoice",
"sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e",
"sourceInvoiceId": "b360db6c-b825-4d74-ac63-5be506892e2b",
"sourceInvoiceLineId": "2be1e551-be27-4b03-b770-30e5e8211d19",
"tags": {
"tagList": [
"important"
]
},
"toFundId": "69640328-788e-43fc-9c3c-af39e243f3b7",
"transactionType": "Encumbrance",
"metadata": {
"createdDate": "2019-10-31T09:21:44.386+0000",
"createdByUserId": "02408630-bce2-5a82-b577-9be500e9b324",
"updatedDate": "2019-10-31T09:21:44.386+0000",
"updatedByUserId": "02408630-bce2-5a82-b577-9be500e9b324"
}
}
HTTP status code 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 update encumbrance -- malformed JSON at 13:4"
HTTP status code 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"
}
]
}
]
}
HTTP status code 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
Update a Transaction instance
put /finance/encumbrances/{id}
Update a Transaction instance
URI Parameters
- id: 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#",
"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}$"
},
"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
}
Create a payment
Create a payment by transaction
post /finance/payments
Create a payment by 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}$"
},
"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": "c5732efb-9536-4a49-a22e-1ec6ca8a7922",
"amount": 25,
"currency": "USD",
"description": "PO_Line: History of Incas",
"fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e",
"fromFundId": "7fbd5d84-62d1-44c6-9c45-6cb173998bbd",
"paymentEncumbranceId": "cb0b0c16-59a0-4ece-8e43-8d2310c9883c",
"source": "Invoice",
"sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e",
"sourceInvoiceId": "5925e966-f242-4842-9d5e-b33a651bb390",
"sourceInvoiceLineId": "ee60ee78-f487-4940-adcf-fa0726989823",
"transactionType": "Payment",
"metadata": {
"createdDate": "2020-01-09T20:53:43.984+0000",
"createdByUserId": "28d0fb04-d137-11e8-a8d5-f2801f1b9fd1",
"updatedDate": "2020-01-09T20:53:43.984+0000",
"updatedByUserId": "28d0fb04-d137-11e8-a8d5-f2801f1b9fd1"
}
}
HTTP status code 201
Returns processing result of the payments
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}$"
},
"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": "c5732efb-9536-4a49-a22e-1ec6ca8a7922",
"amount": 25,
"currency": "USD",
"description": "PO_Line: History of Incas",
"fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e",
"fromFundId": "7fbd5d84-62d1-44c6-9c45-6cb173998bbd",
"paymentEncumbranceId": "cb0b0c16-59a0-4ece-8e43-8d2310c9883c",
"source": "Invoice",
"sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e",
"sourceInvoiceId": "5925e966-f242-4842-9d5e-b33a651bb390",
"sourceInvoiceLineId": "ee60ee78-f487-4940-adcf-fa0726989823",
"transactionType": "Payment",
"metadata": {
"createdDate": "2020-01-09T20:53:43.984+0000",
"createdByUserId": "28d0fb04-d137-11e8-a8d5-f2801f1b9fd1",
"updatedDate": "2020-01-09T20:53:43.984+0000",
"updatedByUserId": "28d0fb04-d137-11e8-a8d5-f2801f1b9fd1"
}
}
HTTP status code 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 update payment -- malformed JSON at 13:4"
HTTP status code 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"
}
]
}
]
}
HTTP status code 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
Create a pending payment
Create a pending payment by transaction
post /finance/pending-payments
Create a pending payment by 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}$"
},
"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": "c5732efb-9536-4a49-a22e-1ec6ca8a7922",
"amount": 25,
"awaitingPayment": {
"encumbranceId": "12ac70a4-5c9d-112f-9acb-852adf67d7e1",
"releaseEncumbrance": "true"
},
"currency": "USD",
"description": "PO_Line: History of Incas",
"fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e",
"fromFundId": "7fbd5d84-62d1-44c6-9c45-6cb173998bbd",
"source": "Invoice",
"sourceInvoiceId": "5925e966-f242-4842-9d5e-b33a651bb390",
"sourceInvoiceLineId": "ee60ee78-f487-4940-adcf-fa0726989823",
"transactionType": "Pending payment",
"metadata": {
"createdDate": "2020-01-09T20:53:43.984+0000",
"createdByUserId": "28d0fb04-d137-11e8-a8d5-f2801f1b9fd1",
"updatedDate": "2020-01-09T20:53:43.984+0000",
"updatedByUserId": "28d0fb04-d137-11e8-a8d5-f2801f1b9fd1"
}
}
HTTP status code 201
Returns processing result of the pending-payments
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}$"
},
"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": "c5732efb-9536-4a49-a22e-1ec6ca8a7922",
"amount": 25,
"awaitingPayment": {
"encumbranceId": "12ac70a4-5c9d-112f-9acb-852adf67d7e1",
"releaseEncumbrance": "true"
},
"currency": "USD",
"description": "PO_Line: History of Incas",
"fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e",
"fromFundId": "7fbd5d84-62d1-44c6-9c45-6cb173998bbd",
"source": "Invoice",
"sourceInvoiceId": "5925e966-f242-4842-9d5e-b33a651bb390",
"sourceInvoiceLineId": "ee60ee78-f487-4940-adcf-fa0726989823",
"transactionType": "Pending payment",
"metadata": {
"createdDate": "2020-01-09T20:53:43.984+0000",
"createdByUserId": "28d0fb04-d137-11e8-a8d5-f2801f1b9fd1",
"updatedDate": "2020-01-09T20:53:43.984+0000",
"updatedByUserId": "28d0fb04-d137-11e8-a8d5-f2801f1b9fd1"
}
}
HTTP status code 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 update pending-payment -- malformed JSON at 13:4"
HTTP status code 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"
}
]
}
]
}
HTTP status code 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
Update a pending payment
Update a pending payment by transaction
put /finance/pending-payments/{id}
Update a pending payment by transaction
URI Parameters
- id: 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#",
"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}$"
},
"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": "c5732efb-9536-4a49-a22e-1ec6ca8a7922",
"amount": 25,
"awaitingPayment": {
"encumbranceId": "12ac70a4-5c9d-112f-9acb-852adf67d7e1",
"releaseEncumbrance": "true"
},
"currency": "USD",
"description": "PO_Line: History of Incas",
"fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e",
"fromFundId": "7fbd5d84-62d1-44c6-9c45-6cb173998bbd",
"source": "Invoice",
"sourceInvoiceId": "5925e966-f242-4842-9d5e-b33a651bb390",
"sourceInvoiceLineId": "ee60ee78-f487-4940-adcf-fa0726989823",
"transactionType": "Pending payment",
"metadata": {
"createdDate": "2020-01-09T20:53:43.984+0000",
"createdByUserId": "28d0fb04-d137-11e8-a8d5-f2801f1b9fd1",
"updatedDate": "2020-01-09T20:53:43.984+0000",
"updatedByUserId": "28d0fb04-d137-11e8-a8d5-f2801f1b9fd1"
}
}
HTTP status code 204
Item successfully updated
HTTP status code 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 pending-payment -- malformed JSON at 13:4"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"pending-payment not found"
HTTP status code 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"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Create a credit
Create a credit by transaction
post /finance/credits
Create a credit by 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}$"
},
"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": "21425789-acdb-44b2-b44f-f2291cc48b42",
"amount": 25,
"currency": "USD",
"description": "PO_Line: History of Incas",
"fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e",
"source": "Invoice",
"sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e",
"sourceInvoiceId": "041c1fe8-adfa-44eb-b6b3-f85acdd71f81",
"sourceInvoiceLineId": "ee60ee78-f487-4940-adcf-fa0726989823",
"toFundId": "7fbd5d84-62d1-44c6-9c45-6cb173998bbd",
"transactionType": "Credit",
"metadata": {
"createdDate": "2020-01-09T20:53:43.984+0000",
"createdByUserId": "28d0fb04-d137-11e8-a8d5-f2801f1b9fd1",
"updatedDate": "2020-01-09T20:53:43.984+0000",
"updatedByUserId": "28d0fb04-d137-11e8-a8d5-f2801f1b9fd1"
}
}
HTTP status code 201
Returns processing result of the credits
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}$"
},
"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": "21425789-acdb-44b2-b44f-f2291cc48b42",
"amount": 25,
"currency": "USD",
"description": "PO_Line: History of Incas",
"fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e",
"source": "Invoice",
"sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e",
"sourceInvoiceId": "041c1fe8-adfa-44eb-b6b3-f85acdd71f81",
"sourceInvoiceLineId": "ee60ee78-f487-4940-adcf-fa0726989823",
"toFundId": "7fbd5d84-62d1-44c6-9c45-6cb173998bbd",
"transactionType": "Credit",
"metadata": {
"createdDate": "2020-01-09T20:53:43.984+0000",
"createdByUserId": "28d0fb04-d137-11e8-a8d5-f2801f1b9fd1",
"updatedDate": "2020-01-09T20:53:43.984+0000",
"updatedByUserId": "28d0fb04-d137-11e8-a8d5-f2801f1b9fd1"
}
}
HTTP status code 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 update credit -- malformed JSON at 13:4"
HTTP status code 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"
}
]
}
]
}
HTTP status code 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
Transaction collection
Retrieve a list of transaction items.
get /finance/transactions
Retrieve a list of transaction items.
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 currency = USD
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode currency=USD
- 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]
HTTP status code 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}$"
},
"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:
{
"$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}$"
},
"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"
]
}
HTTP status code 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 transactions -- malformed parameter 'query', syntax error at column 6
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
"unable to list instances -- unauthorized"
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 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
Get a specific Transaction instance
Retrieve transaction item with given {transactionId}
get /finance/transactions/{id}
Retrieve transaction item with given {transactionId}
URI Parameters
- id: required(string)
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
HTTP status code 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}$"
},
"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:
{
"$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}$"
},
"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
}
HTTP status code 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 get retrieve transaction -- unauthorized
HTTP status code 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:
"transaction not found"
HTTP status code 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