Finance Transaction Summaries version v1.1
https://github.com/folio-org/mod-finance
Transaction Summaries API
This documents the API calls that can be made to create Transaction summaries for Orders and Invoices
Create a transaction allocation
Create a new order transaction summary
Create a new order transaction summary, for an order with number of transactions(encumbrances)
post /finance/order-transaction-summaries
Create a new order transaction summary, for an order with number of transactions(encumbrances)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Order transactions summary",
"type": "object",
"properties": {
"id": {
"description": "UUID of this summary",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"numTransactions": {
"description": "Total number of transactions (encumbrances) expected for this order. Negative value indicates that all transactions have been processed",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"id",
"numTransactions"
]
}Example:
{
"id": "f2715f25-8504-4698-afd0-3025aa779ac6",
"numTransactions": 1
}
HTTP status code 201
Returns processing result of the order-transaction-summaries
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Order transactions summary",
"type": "object",
"properties": {
"id": {
"description": "UUID of this summary",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"numTransactions": {
"description": "Total number of transactions (encumbrances) expected for this order. Negative value indicates that all transactions have been processed",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"id",
"numTransactions"
]
}Example:
{
"id": "f2715f25-8504-4698-afd0-3025aa779ac6",
"numTransactions": 1
}
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 order-transaction-summary -- 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#",
"id": "errors.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#",
"id": "error.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": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"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 administratorCreate a new order transaction summary
Updated order transaction summary, for an order with number of transactions(encumbrances)
put /finance/order-transaction-summaries/{id}
Updated order transaction summary, for an order with number of transactions(encumbrances)
URI Parameters
- id: required(string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Order transactions summary",
"type": "object",
"properties": {
"id": {
"description": "UUID of this summary",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"numTransactions": {
"description": "Total number of transactions (encumbrances) expected for this order. Negative value indicates that all transactions have been processed",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"id",
"numTransactions"
]
}Example:
{
"id": "f2715f25-8504-4698-afd0-3025aa779ac6",
"numTransactions": 1
}
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 order-transaction-summary -- malformed JSON at 13:4"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"order-transaction-summary not found"
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.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#",
"id": "error.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": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"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 administratorCreate a transaction allocation
Create a new invoice transaction summary
Create a new invoice transaction summary, for an order with number of transactions(encumbrances) and number of payment credits
post /finance/invoice-transaction-summaries
Create a new invoice transaction summary, for an order with number of transactions(encumbrances) and number of payment credits
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Invoice transactions Summary",
"type": "object",
"properties": {
"id": {
"description": "UUID of this summary",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"numPendingPayments": {
"description": "Total number of pending payments(transactions) expected for this invoice. Negative value indicates that all transactions have been processed",
"type": "integer"
},
"numPaymentsCredits": {
"description": "Total number of payments/credits(transactions) expected for this invoice. Negative value indicates that all transactions have been processed",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"id",
"numPendingPayments",
"numPaymentsCredits"
]
}Example:
{
"id": "ff5bf77f-8e30-459b-bc98-ddcbd764e3f0",
"numPendingPayments": -10,
"numPaymentsCredits": 10
}
HTTP status code 201
Returns processing result of the invoice-transaction-summaries
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Invoice transactions Summary",
"type": "object",
"properties": {
"id": {
"description": "UUID of this summary",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"numPendingPayments": {
"description": "Total number of pending payments(transactions) expected for this invoice. Negative value indicates that all transactions have been processed",
"type": "integer"
},
"numPaymentsCredits": {
"description": "Total number of payments/credits(transactions) expected for this invoice. Negative value indicates that all transactions have been processed",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"id",
"numPendingPayments",
"numPaymentsCredits"
]
}Example:
{
"id": "ff5bf77f-8e30-459b-bc98-ddcbd764e3f0",
"numPendingPayments": -10,
"numPaymentsCredits": 10
}
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 invoice-transaction-summary -- 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#",
"id": "errors.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#",
"id": "error.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": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"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 administratorUpdate a new invoice transaction summary
Updated invoice transaction summary, for an invoice with number of pending payments and number of payment/credits
put /finance/invoice-transaction-summaries/{id}
Updated invoice transaction summary, for an invoice with number of pending payments and number of payment/credits
URI Parameters
- id: required(string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Invoice transactions Summary",
"type": "object",
"properties": {
"id": {
"description": "UUID of this summary",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"numPendingPayments": {
"description": "Total number of pending payments(transactions) expected for this invoice. Negative value indicates that all transactions have been processed",
"type": "integer"
},
"numPaymentsCredits": {
"description": "Total number of payments/credits(transactions) expected for this invoice. Negative value indicates that all transactions have been processed",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"id",
"numPendingPayments",
"numPaymentsCredits"
]
}Example:
{
"id": "ff5bf77f-8e30-459b-bc98-ddcbd764e3f0",
"numPendingPayments": -10,
"numPaymentsCredits": 10
}
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 invoice-transaction-summary -- malformed JSON at 13:4"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"invoice-transaction-summary not found"
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.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#",
"id": "error.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": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"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