Invoice version v5.0
http://localhost
Invoice API
This documents the API calls that can be made to manage invoices
/invoice
Manage Invoices
Post invoice. Only in case an acquisition unit has to be assigned to the invoice, it is required that user should have extra permission invoices.acquisitions-units-assignments.assign to create an Invoice.
Retrieve a list of invoice items.
post /invoice/invoices
Post invoice. Only in case an acquisition unit has to be assigned to the invoice, it is required that user should have extra permission invoices.acquisitions-units-assignments.assign to create an Invoice.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "invoice",
"javaName": "Invoice",
"type": "object",
"properties": {
"id": {
"description": "UUID of this invoice",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"accountingCode": {
"description": "Number that represents the vendor is an external accounting system which may include details like \"Address code\" in it. This is the number as stated on the invoice",
"type": "string"
},
"adjustments": {
"description": "List of invoice level adjustments. The adjustments can be pro-rated which are defined at the invoice level, but are applied to the invoice lines. A generic example is a shipping fee which should be spread out across all of the invoice lines so that all funds involved pay some portion of the fee.",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Adjustment",
"properties": {
"id": {
"description": "UUID of this adjustment",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"adjustmentId": {
"description": "UUID of the Invoice adjustment incase of prorated adjustments",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"description": {
"description": "Displayed in invoice line as a name for the input",
"type": "string"
},
"exportToAccounting": {
"description": "Whether or not to show this adjustment in batchedVoucherLines",
"type": "boolean",
"default": false
},
"fundDistributions": {
"description": "Fund distribution records from which this adjustment will be paid; only valid at invoice level",
"id": "fundDistributions",
"type": "array",
"items": {
"description": "fund distribution record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"code": {
"description": "The code of the fund associated with this fund distribution",
"type": "string"
},
"encumbrance": {
"description": "UUID of encumbrance record associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"fundId": {
"description": "UUID of the fund associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceLineId": {
"description": "UUID of the invoice line associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"distributionType": {
"description": "Percentage or amount type of the value property",
"type": "string",
"enum": [
"amount",
"percentage"
],
"default": "percentage"
},
"expenseClassId": {
"description": "UUID of the expense class associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"value": {
"description": "The percentage of the cost to be applied to this fund",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"fundId",
"distributionType",
"value"
]
}
},
"prorate": {
"description": "Displayed in invoice line per adjustment in toggled on in settings",
"type": "string",
"enum": [
"By line",
"By amount",
"By quantity",
"Not prorated"
],
"default": "Not prorated"
},
"relationToTotal": {
"description": "Relationship of this adjustment to the total;In addition to: added to subtotal;Included in: reported as subtotal portion;Separate from:calculated from subtotal",
"type": "string",
"enum": [
"In addition to",
"Included in",
"Separate from"
],
"default": "In addition to"
},
"type": {
"description": "Adjustment type",
"type": "string",
"enum": [
"Percentage",
"Amount"
]
},
"value": {
"description": "Adjustment value",
"type": "number"
},
"totalAmount": {
"description": "Total adjustment amount",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"description",
"exportToAccounting",
"prorate",
"relationToTotal",
"type",
"value"
]
}
},
"adjustmentsTotal": {
"description": "Total amount which is sum of all invoice line adjustments and all non-prorated invoice level adjustments. This amount is always calculated by system.",
"type": "number"
},
"approvedBy": {
"description": "UUID of user that approved this invoice",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"approvalDate": {
"description": "Date the invoice was approved for processing",
"type": "string",
"format": "date-time"
},
"batchGroupId": {
"description": "UUID of the batch group to use when generating batch vouchers",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"default": "2a2cb998-1437-41d1-88ad-01930aaeadd5"
},
"billTo": {
"description": "UUID of the billing address",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"chkSubscriptionOverlap": {
"description": "IF TRUE the system will check if there is another invoice for this subscription and whether the dates overlap. IF the dates overlap, the system should issue an alert.",
"type": "boolean"
},
"cancellationNote": {
"description": "The reason of the invoice cancellation.",
"type": "string"
},
"currency": {
"description": "Ideally this is the ISO code and not something the user defines",
"type": "string"
},
"enclosureNeeded": {
"description": "Indicates that an enclosure is needed",
"type": "boolean",
"default": false
},
"exchangeRate": {
"description": "Exchange rate",
"type": "number"
},
"operationMode": {
"description": "Operation mode performed on the exchange rate",
"type": "string"
},
"exportToAccounting": {
"description": "This would keep the invoice from being feed into the batch process (i.e. not generate an external voucher/payment) but would still move values in the system. This might be defined by the vendor relationship and exposed for override on the invoice.",
"type": "boolean",
"default": false
},
"folioInvoiceNo": {
"description": "Invoice number in folio system",
"type": "string"
},
"invoiceDate": {
"description": "Invoice date",
"type": "string",
"format": "date-time"
},
"lockTotal": {
"description": "Total amount which manually set by user. The calculated total must match this before the invoice can be approved",
"type": "number"
},
"note": {
"description": "Invoice note",
"type": "string"
},
"paymentDue": {
"description": "When this is required to be paid. Generally governed by the relationship with the Vendor",
"type": "string",
"format": "date-time"
},
"paymentDate": {
"description": "When the invoice was actually paid",
"type": "string",
"format": "date-time"
},
"paymentTerms": {
"description": "Invoice payment terms",
"type": "string"
},
"paymentMethod": {
"description": "Inherited from vendor record",
"type": "string"
},
"status": {
"description": "Open: Record has been created, Reviewed: details have been verified, Approved: Funds are release, Paid: confirmation that funds have been exchanged and check number has been returned amounts are frozen, cancelled.\nNote: invoices are never partially paid.",
"type": "string",
"enum": [
"Open",
"Reviewed",
"Approved",
"Paid",
"Cancelled"
]
},
"source": {
"description": "This does not denote a user ID but describes how the record was created. Eg. User, API, EDI",
"type": "string",
"enum": [
"User",
"API",
"EDI"
]
},
"subTotal": {
"description": "Invoice amount before adjustments are applied. This is sum of all subTotal amounts of the corresponding invoice lines. This amount is always calculated by system.",
"type": "number",
"readonly": true
},
"total": {
"description": "The total amount is calculated \"on the fly\" of this invoice which is sum of subTotal and adjustmentsTotal. Must be the same with existed \"lockTotal\", when approve invoice.",
"type": "number",
"readonly": true
},
"vendorInvoiceNo": {
"description": "This is the number from the vendor's invoice, which is different from the folioInvoiceNo",
"type": "string"
},
"disbursementNumber": {
"description": "The identifier for the physical transaction corresponding to a payment (Eg. Check #, EFT # etc.) Brought in from external source",
"type": "string"
},
"voucherNumber": {
"description": "Number generated by folio that will eventually identify the payment request sent out to external financial system.",
"type": "string"
},
"paymentId": {
"description": "Id of payment",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"disbursementDate": {
"description": "Date payment was made from financial system (eg. corresponding check date)",
"type": "string",
"format": "date-time"
},
"poNumbers": {
"description": "May or may not be provided; references the PO associated to the invoice",
"id": "poNumbers",
"type": "array",
"items": {
"description": "A human readable ID assigned to this purchase order",
"type": "string",
"pattern": "^[a-zA-Z0-9]{1,22}$"
}
},
"vendorId": {
"description": "UUID of vendor",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{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 fiscal year",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"accountNo": {
"description": "The unique number of the organization account",
"type": "string"
},
"manualPayment": {
"description": "This would keep the invoice from being feed into the batch process (Not generate a external voucher/payment) but would still move values in the system. Note: this is ideally defined by the vendor relationship and exposed for override on the invoice.",
"type": "boolean"
},
"acqUnitIds": {
"description": "acquisition unit ids associated with this invoice",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "The UUID format string",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
}
},
"nextInvoiceLineNumber": {
"description": "Number that will be used next time an invoice line is created",
"type": "integer",
"readonly": true
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.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"
]
},
"tags": {
"type": "object",
"description": "arbitrary tags associated with this invoice",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "tags.schema",
"title": "tags",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"batchGroupId",
"currency",
"invoiceDate",
"paymentMethod",
"status",
"source",
"vendorInvoiceNo",
"vendorId"
]
}
Example:
{
"id": "733cafd3-895f-4e33-87b7-bf40dc3c8069",
"accountingCode" : "0206",
"adjustments": [
{
"id": "14263aab-b22b-4ddc-9ecc-3434427c2c8f",
"description": "Shipping",
"exportToAccounting" : false,
"type": "Amount",
"value": 4.50,
"prorate": "By line",
"relationToTotal": "In addition to"
},
{
"description": "Some Tax",
"exportToAccounting" : false,
"fundDistributions": [
{
"code": "USHIST",
"encumbrance": "1c8fc9f4-d2cc-4bd1-aa9a-cb02291cbe65",
"fundId": "1d1574f1-9196-4a57-8d1f-3b2e4309eb81",
"distributionType": "percentage",
"value": 100
}
],
"type": "Amount",
"value": 10,
"prorate": "Not prorated",
"relationToTotal": "In addition to"
}
],
"adjustmentsTotal": 14.50,
"batchGroupId": "2a2cb998-1437-41d1-88ad-01930aaeadd5",
"chkSubscriptionOverlap": false,
"currency": "USD",
"enclosureNeeded" : false,
"exchangeRate" : 1.092,
"operationMode": "MULTIPLY",
"exportToAccounting": true,
"folioInvoiceNo": "123invoicenumber45",
"invoiceDate": "2018-07-20T00:00:00.000+0000",
"lockTotal": 64.50,
"note": "Some note",
"paymentDue": "2018-08-29T00:00:00.000+0000",
"paymentDate": "2018-08-29T00:10:00.000+0000",
"paymentTerms": "Payment in Advance",
"paymentMethod": "EFT",
"status": "Reviewed",
"source": "User",
"vendorInvoiceNo": "YK75851",
"disbursementNumber": "58",
"voucherNumber": "478",
"paymentId": "a5065f0d-fb88-4d23-b0c1-57e754fba40e",
"disbursementDate": "2018-08-19T00:00:00.000+0000",
"poNumbers": [
"AB268758XYZ"
],
"vendorId": "168f8a63-d612-406e-813f-c7527f241ac3",
"fiscalYearId": "ac2164c7-ba3d-1bc2-a12c-e35ceccbfaf2",
"accountNo": "GOBI-HIST-12",
"manualPayment": true,
"nextInvoiceLineNumber": 1,
"tags": {
"tagList": [
"tag"
]
},
"acqUnitIds": [
"1895e539-8dac-441e-b1f5-aab62b3fde60",
"47f504bd-0c1b-498e-a2ae-e2f0a0cea273"
],
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
HTTP status code 201
Returns a newly created item, with server-controlled fields like 'id' populated
Headers
- Location: required(string)
URI to the created invoice item
Body
Media type: application/json
Type: any
Example:
{
"id": "733cafd3-895f-4e33-87b7-bf40dc3c8069",
"accountingCode" : "0206",
"adjustments": [
{
"id": "14263aab-b22b-4ddc-9ecc-3434427c2c8f",
"description": "Shipping",
"exportToAccounting" : false,
"type": "Amount",
"value": 4.50,
"prorate": "By line",
"relationToTotal": "In addition to"
},
{
"description": "Some Tax",
"exportToAccounting" : false,
"fundDistributions": [
{
"code": "USHIST",
"encumbrance": "1c8fc9f4-d2cc-4bd1-aa9a-cb02291cbe65",
"fundId": "1d1574f1-9196-4a57-8d1f-3b2e4309eb81",
"distributionType": "percentage",
"value": 100
}
],
"type": "Amount",
"value": 10,
"prorate": "Not prorated",
"relationToTotal": "In addition to"
}
],
"adjustmentsTotal": 14.50,
"batchGroupId": "2a2cb998-1437-41d1-88ad-01930aaeadd5",
"chkSubscriptionOverlap": false,
"currency": "USD",
"enclosureNeeded" : false,
"exchangeRate" : 1.092,
"operationMode": "MULTIPLY",
"exportToAccounting": true,
"folioInvoiceNo": "123invoicenumber45",
"invoiceDate": "2018-07-20T00:00:00.000+0000",
"lockTotal": 64.50,
"note": "Some note",
"paymentDue": "2018-08-29T00:00:00.000+0000",
"paymentDate": "2018-08-29T00:10:00.000+0000",
"paymentTerms": "Payment in Advance",
"paymentMethod": "EFT",
"status": "Reviewed",
"source": "User",
"vendorInvoiceNo": "YK75851",
"disbursementNumber": "58",
"voucherNumber": "478",
"paymentId": "a5065f0d-fb88-4d23-b0c1-57e754fba40e",
"disbursementDate": "2018-08-19T00:00:00.000+0000",
"poNumbers": [
"AB268758XYZ"
],
"vendorId": "168f8a63-d612-406e-813f-c7527f241ac3",
"fiscalYearId": "ac2164c7-ba3d-1bc2-a12c-e35ceccbfaf2",
"accountNo": "GOBI-HIST-12",
"manualPayment": true,
"nextInvoiceLineNumber": 1,
"tags": {
"tagList": [
"tag"
]
},
"acqUnitIds": [
"1895e539-8dac-441e-b1f5-aab62b3fde60",
"47f504bd-0c1b-498e-a2ae-e2f0a0cea273"
],
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "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 add invoice -- malformed JSON at 13:3"
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 create invoices -- unauthorized
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 administrator
get /invoice/invoices
Retrieve a list of invoice items.
Query Parameters
- totalRecords: (string - default: auto - pattern: exact|estimated|none|auto)
How to calculate the totalRecords property. "exact" for the correct number, "estimated" for an estimation, "auto" to automatically select "exact" or "estimated", "none" for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
none
- offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)
Skip over a number of elements by specifying an offset value for the query
Example:
0
- limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)
Limit the number of elements returned in the response
Example:
10
- query: (string)
A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.
using CQL (indexes for invoice)
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode invoiceLineStatus=="Open"
HTTP status code 200
Returns a list of invoice items
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "collection of invoices",
"type": "object",
"properties": {
"invoices": {
"description": "an array of invoice records",
"id": "invoices",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "invoice",
"javaName": "Invoice",
"properties": {
"id": {
"description": "UUID of this invoice",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"accountingCode": {
"description": "Number that represents the vendor is an external accounting system which may include details like \"Address code\" in it. This is the number as stated on the invoice",
"type": "string"
},
"adjustments": {
"description": "List of invoice level adjustments. The adjustments can be pro-rated which are defined at the invoice level, but are applied to the invoice lines. A generic example is a shipping fee which should be spread out across all of the invoice lines so that all funds involved pay some portion of the fee.",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Adjustment",
"properties": {
"id": {
"description": "UUID of this adjustment",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"adjustmentId": {
"description": "UUID of the Invoice adjustment incase of prorated adjustments",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"description": {
"description": "Displayed in invoice line as a name for the input",
"type": "string"
},
"exportToAccounting": {
"description": "Whether or not to show this adjustment in batchedVoucherLines",
"type": "boolean",
"default": false
},
"fundDistributions": {
"description": "Fund distribution records from which this adjustment will be paid; only valid at invoice level",
"id": "fundDistributions",
"type": "array",
"items": {
"description": "fund distribution record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"code": {
"description": "The code of the fund associated with this fund distribution",
"type": "string"
},
"encumbrance": {
"description": "UUID of encumbrance record associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"fundId": {
"description": "UUID of the fund associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceLineId": {
"description": "UUID of the invoice line associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"distributionType": {
"description": "Percentage or amount type of the value property",
"type": "string",
"enum": [
"amount",
"percentage"
],
"default": "percentage"
},
"expenseClassId": {
"description": "UUID of the expense class associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"value": {
"description": "The percentage of the cost to be applied to this fund",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"fundId",
"distributionType",
"value"
]
}
},
"prorate": {
"description": "Displayed in invoice line per adjustment in toggled on in settings",
"type": "string",
"enum": [
"By line",
"By amount",
"By quantity",
"Not prorated"
],
"default": "Not prorated"
},
"relationToTotal": {
"description": "Relationship of this adjustment to the total;In addition to: added to subtotal;Included in: reported as subtotal portion;Separate from:calculated from subtotal",
"type": "string",
"enum": [
"In addition to",
"Included in",
"Separate from"
],
"default": "In addition to"
},
"type": {
"description": "Adjustment type",
"type": "string",
"enum": [
"Percentage",
"Amount"
]
},
"value": {
"description": "Adjustment value",
"type": "number"
},
"totalAmount": {
"description": "Total adjustment amount",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"description",
"exportToAccounting",
"prorate",
"relationToTotal",
"type",
"value"
]
}
},
"adjustmentsTotal": {
"description": "Total amount which is sum of all invoice line adjustments and all non-prorated invoice level adjustments. This amount is always calculated by system.",
"type": "number"
},
"approvedBy": {
"description": "UUID of user that approved this invoice",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"approvalDate": {
"description": "Date the invoice was approved for processing",
"type": "string",
"format": "date-time"
},
"batchGroupId": {
"description": "UUID of the batch group to use when generating batch vouchers",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"default": "2a2cb998-1437-41d1-88ad-01930aaeadd5"
},
"billTo": {
"description": "UUID of the billing address",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"chkSubscriptionOverlap": {
"description": "IF TRUE the system will check if there is another invoice for this subscription and whether the dates overlap. IF the dates overlap, the system should issue an alert.",
"type": "boolean"
},
"cancellationNote": {
"description": "The reason of the invoice cancellation.",
"type": "string"
},
"currency": {
"description": "Ideally this is the ISO code and not something the user defines",
"type": "string"
},
"enclosureNeeded": {
"description": "Indicates that an enclosure is needed",
"type": "boolean",
"default": false
},
"exchangeRate": {
"description": "Exchange rate",
"type": "number"
},
"operationMode": {
"description": "Operation mode performed on the exchange rate",
"type": "string"
},
"exportToAccounting": {
"description": "This would keep the invoice from being feed into the batch process (i.e. not generate an external voucher/payment) but would still move values in the system. This might be defined by the vendor relationship and exposed for override on the invoice.",
"type": "boolean",
"default": false
},
"folioInvoiceNo": {
"description": "Invoice number in folio system",
"type": "string"
},
"invoiceDate": {
"description": "Invoice date",
"type": "string",
"format": "date-time"
},
"lockTotal": {
"description": "Total amount which manually set by user. The calculated total must match this before the invoice can be approved",
"type": "number"
},
"note": {
"description": "Invoice note",
"type": "string"
},
"paymentDue": {
"description": "When this is required to be paid. Generally governed by the relationship with the Vendor",
"type": "string",
"format": "date-time"
},
"paymentDate": {
"description": "When the invoice was actually paid",
"type": "string",
"format": "date-time"
},
"paymentTerms": {
"description": "Invoice payment terms",
"type": "string"
},
"paymentMethod": {
"description": "Inherited from vendor record",
"type": "string"
},
"status": {
"description": "Open: Record has been created, Reviewed: details have been verified, Approved: Funds are release, Paid: confirmation that funds have been exchanged and check number has been returned amounts are frozen, cancelled.\nNote: invoices are never partially paid.",
"type": "string",
"enum": [
"Open",
"Reviewed",
"Approved",
"Paid",
"Cancelled"
]
},
"source": {
"description": "This does not denote a user ID but describes how the record was created. Eg. User, API, EDI",
"type": "string",
"enum": [
"User",
"API",
"EDI"
]
},
"subTotal": {
"description": "Invoice amount before adjustments are applied. This is sum of all subTotal amounts of the corresponding invoice lines. This amount is always calculated by system.",
"type": "number",
"readonly": true
},
"total": {
"description": "The total amount is calculated \"on the fly\" of this invoice which is sum of subTotal and adjustmentsTotal. Must be the same with existed \"lockTotal\", when approve invoice.",
"type": "number",
"readonly": true
},
"vendorInvoiceNo": {
"description": "This is the number from the vendor's invoice, which is different from the folioInvoiceNo",
"type": "string"
},
"disbursementNumber": {
"description": "The identifier for the physical transaction corresponding to a payment (Eg. Check #, EFT # etc.) Brought in from external source",
"type": "string"
},
"voucherNumber": {
"description": "Number generated by folio that will eventually identify the payment request sent out to external financial system.",
"type": "string"
},
"paymentId": {
"description": "Id of payment",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"disbursementDate": {
"description": "Date payment was made from financial system (eg. corresponding check date)",
"type": "string",
"format": "date-time"
},
"poNumbers": {
"description": "May or may not be provided; references the PO associated to the invoice",
"id": "poNumbers",
"type": "array",
"items": {
"description": "A human readable ID assigned to this purchase order",
"type": "string",
"pattern": "^[a-zA-Z0-9]{1,22}$"
}
},
"vendorId": {
"description": "UUID of vendor",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{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 fiscal year",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"accountNo": {
"description": "The unique number of the organization account",
"type": "string"
},
"manualPayment": {
"description": "This would keep the invoice from being feed into the batch process (Not generate a external voucher/payment) but would still move values in the system. Note: this is ideally defined by the vendor relationship and exposed for override on the invoice.",
"type": "boolean"
},
"acqUnitIds": {
"description": "acquisition unit ids associated with this invoice",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "The UUID format string",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
}
},
"nextInvoiceLineNumber": {
"description": "Number that will be used next time an invoice line is created",
"type": "integer",
"readonly": true
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.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"
]
},
"tags": {
"type": "object",
"description": "arbitrary tags associated with this invoice",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "tags.schema",
"title": "tags",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"batchGroupId",
"currency",
"invoiceDate",
"paymentMethod",
"status",
"source",
"vendorInvoiceNo",
"vendorId"
]
}
},
"totalRecords": {
"description": "total number of records in the array",
"type": "integer"
}
},
"required": [
"invoices",
"totalRecords"
]
}
Example:
{
"invoices": [
{
"id": "c0d08448-347b-418a-8c2f-5fb50248d67e",
"accountingCode": "0206",
"adjustments": [
{
"id": "14263aab-b22b-4ddc-9ecc-3434427c2c8f",
"description": "Shipping",
"exportToAccounting": false,
"type": "Amount",
"value": 4.50,
"prorate": "By line",
"relationToTotal": "In addition to"
}
],
"adjustmentsTotal": 4.50,
"approvedBy": "ab18897b-0e40-4f31-896b-9c9adc979a88",
"approvalDate": "2018-07-29T00:00:00.000+0000",
"batchGroupId": "2a2cb998-1437-41d1-88ad-01930aaeadd5",
"billTo": "1df71bab-818c-46ea-988b-a23676d91ae6",
"chkSubscriptionOverlap": false,
"currency": "USD",
"enclosureNeeded" : false,
"exchangeRate" : 1.092,
"folioInvoiceNo": "123invoicenumber45",
"invoiceDate": "2018-07-20T00:00:00.000+0000",
"lockTotal": 49.85,
"note": "Some note",
"paymentDue": "2018-08-29T00:00:00.000+0000",
"paymentTerms": "Payment in Advance",
"paymentMethod": "EFT",
"status": "Approved",
"source": "User",
"vendorInvoiceNo": "YK75851",
"disbursementNumber": "58",
"voucherNumber": "478",
"paymentId": "a5065f0d-fb88-4d23-b0c1-57e754fba40e",
"disbursementDate": "2018-08-19T00:00:00.000+0000",
"poNumbers": [
"AB268758XYZ"
],
"vendorId": "168f8a63-d612-406e-813f-c7527f241ac3",
"fiscalYearId": "ac2164c7-ba3d-1bc2-a12c-e35ceccbfaf2",
"manualPayment": true,
"tags": {
"tagList": [
"tag"
]
},
"acqUnitIds": [
"1895e539-8dac-441e-b1f5-aab62b3fde60",
"47f504bd-0c1b-498e-a2ae-e2f0a0cea273"
],
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
],
"totalRecords": 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 list invoices -- malformed parameter 'query', syntax error at column 6
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 list invoices -- unauthorized
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 administrator
Get, Delete or Update a specific invoice
Return an invoice with given {id}
Update invoice. Only in case an acquisition units list has to be changed, it is required that user should have extra permission invoices.acquisitions-units-assignments.manage to update an Invoice.
Delete an invoice with given {id}
get /invoice/invoices/{id}
Return an invoice with given {id}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of an invoice
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": "invoice",
"javaName": "Invoice",
"type": "object",
"properties": {
"id": {
"description": "UUID of this invoice",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"accountingCode": {
"description": "Number that represents the vendor is an external accounting system which may include details like \"Address code\" in it. This is the number as stated on the invoice",
"type": "string"
},
"adjustments": {
"description": "List of invoice level adjustments. The adjustments can be pro-rated which are defined at the invoice level, but are applied to the invoice lines. A generic example is a shipping fee which should be spread out across all of the invoice lines so that all funds involved pay some portion of the fee.",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Adjustment",
"properties": {
"id": {
"description": "UUID of this adjustment",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"adjustmentId": {
"description": "UUID of the Invoice adjustment incase of prorated adjustments",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"description": {
"description": "Displayed in invoice line as a name for the input",
"type": "string"
},
"exportToAccounting": {
"description": "Whether or not to show this adjustment in batchedVoucherLines",
"type": "boolean",
"default": false
},
"fundDistributions": {
"description": "Fund distribution records from which this adjustment will be paid; only valid at invoice level",
"id": "fundDistributions",
"type": "array",
"items": {
"description": "fund distribution record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"code": {
"description": "The code of the fund associated with this fund distribution",
"type": "string"
},
"encumbrance": {
"description": "UUID of encumbrance record associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"fundId": {
"description": "UUID of the fund associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceLineId": {
"description": "UUID of the invoice line associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"distributionType": {
"description": "Percentage or amount type of the value property",
"type": "string",
"enum": [
"amount",
"percentage"
],
"default": "percentage"
},
"expenseClassId": {
"description": "UUID of the expense class associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"value": {
"description": "The percentage of the cost to be applied to this fund",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"fundId",
"distributionType",
"value"
]
}
},
"prorate": {
"description": "Displayed in invoice line per adjustment in toggled on in settings",
"type": "string",
"enum": [
"By line",
"By amount",
"By quantity",
"Not prorated"
],
"default": "Not prorated"
},
"relationToTotal": {
"description": "Relationship of this adjustment to the total;In addition to: added to subtotal;Included in: reported as subtotal portion;Separate from:calculated from subtotal",
"type": "string",
"enum": [
"In addition to",
"Included in",
"Separate from"
],
"default": "In addition to"
},
"type": {
"description": "Adjustment type",
"type": "string",
"enum": [
"Percentage",
"Amount"
]
},
"value": {
"description": "Adjustment value",
"type": "number"
},
"totalAmount": {
"description": "Total adjustment amount",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"description",
"exportToAccounting",
"prorate",
"relationToTotal",
"type",
"value"
]
}
},
"adjustmentsTotal": {
"description": "Total amount which is sum of all invoice line adjustments and all non-prorated invoice level adjustments. This amount is always calculated by system.",
"type": "number"
},
"approvedBy": {
"description": "UUID of user that approved this invoice",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"approvalDate": {
"description": "Date the invoice was approved for processing",
"type": "string",
"format": "date-time"
},
"batchGroupId": {
"description": "UUID of the batch group to use when generating batch vouchers",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"default": "2a2cb998-1437-41d1-88ad-01930aaeadd5"
},
"billTo": {
"description": "UUID of the billing address",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"chkSubscriptionOverlap": {
"description": "IF TRUE the system will check if there is another invoice for this subscription and whether the dates overlap. IF the dates overlap, the system should issue an alert.",
"type": "boolean"
},
"cancellationNote": {
"description": "The reason of the invoice cancellation.",
"type": "string"
},
"currency": {
"description": "Ideally this is the ISO code and not something the user defines",
"type": "string"
},
"enclosureNeeded": {
"description": "Indicates that an enclosure is needed",
"type": "boolean",
"default": false
},
"exchangeRate": {
"description": "Exchange rate",
"type": "number"
},
"operationMode": {
"description": "Operation mode performed on the exchange rate",
"type": "string"
},
"exportToAccounting": {
"description": "This would keep the invoice from being feed into the batch process (i.e. not generate an external voucher/payment) but would still move values in the system. This might be defined by the vendor relationship and exposed for override on the invoice.",
"type": "boolean",
"default": false
},
"folioInvoiceNo": {
"description": "Invoice number in folio system",
"type": "string"
},
"invoiceDate": {
"description": "Invoice date",
"type": "string",
"format": "date-time"
},
"lockTotal": {
"description": "Total amount which manually set by user. The calculated total must match this before the invoice can be approved",
"type": "number"
},
"note": {
"description": "Invoice note",
"type": "string"
},
"paymentDue": {
"description": "When this is required to be paid. Generally governed by the relationship with the Vendor",
"type": "string",
"format": "date-time"
},
"paymentDate": {
"description": "When the invoice was actually paid",
"type": "string",
"format": "date-time"
},
"paymentTerms": {
"description": "Invoice payment terms",
"type": "string"
},
"paymentMethod": {
"description": "Inherited from vendor record",
"type": "string"
},
"status": {
"description": "Open: Record has been created, Reviewed: details have been verified, Approved: Funds are release, Paid: confirmation that funds have been exchanged and check number has been returned amounts are frozen, cancelled.\nNote: invoices are never partially paid.",
"type": "string",
"enum": [
"Open",
"Reviewed",
"Approved",
"Paid",
"Cancelled"
]
},
"source": {
"description": "This does not denote a user ID but describes how the record was created. Eg. User, API, EDI",
"type": "string",
"enum": [
"User",
"API",
"EDI"
]
},
"subTotal": {
"description": "Invoice amount before adjustments are applied. This is sum of all subTotal amounts of the corresponding invoice lines. This amount is always calculated by system.",
"type": "number",
"readonly": true
},
"total": {
"description": "The total amount is calculated \"on the fly\" of this invoice which is sum of subTotal and adjustmentsTotal. Must be the same with existed \"lockTotal\", when approve invoice.",
"type": "number",
"readonly": true
},
"vendorInvoiceNo": {
"description": "This is the number from the vendor's invoice, which is different from the folioInvoiceNo",
"type": "string"
},
"disbursementNumber": {
"description": "The identifier for the physical transaction corresponding to a payment (Eg. Check #, EFT # etc.) Brought in from external source",
"type": "string"
},
"voucherNumber": {
"description": "Number generated by folio that will eventually identify the payment request sent out to external financial system.",
"type": "string"
},
"paymentId": {
"description": "Id of payment",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"disbursementDate": {
"description": "Date payment was made from financial system (eg. corresponding check date)",
"type": "string",
"format": "date-time"
},
"poNumbers": {
"description": "May or may not be provided; references the PO associated to the invoice",
"id": "poNumbers",
"type": "array",
"items": {
"description": "A human readable ID assigned to this purchase order",
"type": "string",
"pattern": "^[a-zA-Z0-9]{1,22}$"
}
},
"vendorId": {
"description": "UUID of vendor",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{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 fiscal year",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"accountNo": {
"description": "The unique number of the organization account",
"type": "string"
},
"manualPayment": {
"description": "This would keep the invoice from being feed into the batch process (Not generate a external voucher/payment) but would still move values in the system. Note: this is ideally defined by the vendor relationship and exposed for override on the invoice.",
"type": "boolean"
},
"acqUnitIds": {
"description": "acquisition unit ids associated with this invoice",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "The UUID format string",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
}
},
"nextInvoiceLineNumber": {
"description": "Number that will be used next time an invoice line is created",
"type": "integer",
"readonly": true
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.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"
]
},
"tags": {
"type": "object",
"description": "arbitrary tags associated with this invoice",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "tags.schema",
"title": "tags",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"batchGroupId",
"currency",
"invoiceDate",
"paymentMethod",
"status",
"source",
"vendorInvoiceNo",
"vendorId"
]
}
Example:
{
"id": "733cafd3-895f-4e33-87b7-bf40dc3c8069",
"accountingCode" : "0206",
"adjustments": [
{
"id": "14263aab-b22b-4ddc-9ecc-3434427c2c8f",
"description": "Shipping",
"exportToAccounting" : false,
"type": "Amount",
"value": 4.50,
"prorate": "By line",
"relationToTotal": "In addition to"
},
{
"description": "Some Tax",
"exportToAccounting" : false,
"fundDistributions": [
{
"code": "USHIST",
"encumbrance": "1c8fc9f4-d2cc-4bd1-aa9a-cb02291cbe65",
"fundId": "1d1574f1-9196-4a57-8d1f-3b2e4309eb81",
"distributionType": "percentage",
"value": 100
}
],
"type": "Amount",
"value": 10,
"prorate": "Not prorated",
"relationToTotal": "In addition to"
}
],
"adjustmentsTotal": 14.50,
"batchGroupId": "2a2cb998-1437-41d1-88ad-01930aaeadd5",
"chkSubscriptionOverlap": false,
"currency": "USD",
"enclosureNeeded" : false,
"exchangeRate" : 1.092,
"operationMode": "MULTIPLY",
"exportToAccounting": true,
"folioInvoiceNo": "123invoicenumber45",
"invoiceDate": "2018-07-20T00:00:00.000+0000",
"lockTotal": 64.50,
"note": "Some note",
"paymentDue": "2018-08-29T00:00:00.000+0000",
"paymentDate": "2018-08-29T00:10:00.000+0000",
"paymentTerms": "Payment in Advance",
"paymentMethod": "EFT",
"status": "Reviewed",
"source": "User",
"vendorInvoiceNo": "YK75851",
"disbursementNumber": "58",
"voucherNumber": "478",
"paymentId": "a5065f0d-fb88-4d23-b0c1-57e754fba40e",
"disbursementDate": "2018-08-19T00:00:00.000+0000",
"poNumbers": [
"AB268758XYZ"
],
"vendorId": "168f8a63-d612-406e-813f-c7527f241ac3",
"fiscalYearId": "ac2164c7-ba3d-1bc2-a12c-e35ceccbfaf2",
"accountNo": "GOBI-HIST-12",
"manualPayment": true,
"nextInvoiceLineNumber": 1,
"tags": {
"tagList": [
"tag"
]
},
"acqUnitIds": [
"1895e539-8dac-441e-b1f5-aab62b3fde60",
"47f504bd-0c1b-498e-a2ae-e2f0a0cea273"
],
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
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:
"invoice 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
put /invoice/invoices/{id}
Update invoice. Only in case an acquisition units list has to be changed, it is required that user should have extra permission invoices.acquisitions-units-assignments.manage to update an Invoice.
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of an invoice
Query Parameters
- poLinePaymentStatus: (string - pattern: No Change|Awaiting Payment|Partially Paid|Fully Paid|Cancelled)
how to update the payment status of po lines when approving or cancelling the invoice; only applies to lines with releaseEncumbrance=true linked to po lines of one-time open orders; required when approving or cancelling an invoice in a past fiscal year containing lines with releaseEncumbrance=true linked to po lines of one-time open orders; invoice lines with releaseEncumbrance=false have their po line statuses changed from Awaiting Payment to Partially Paid
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "invoice",
"javaName": "Invoice",
"type": "object",
"properties": {
"id": {
"description": "UUID of this invoice",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"accountingCode": {
"description": "Number that represents the vendor is an external accounting system which may include details like \"Address code\" in it. This is the number as stated on the invoice",
"type": "string"
},
"adjustments": {
"description": "List of invoice level adjustments. The adjustments can be pro-rated which are defined at the invoice level, but are applied to the invoice lines. A generic example is a shipping fee which should be spread out across all of the invoice lines so that all funds involved pay some portion of the fee.",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Adjustment",
"properties": {
"id": {
"description": "UUID of this adjustment",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"adjustmentId": {
"description": "UUID of the Invoice adjustment incase of prorated adjustments",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"description": {
"description": "Displayed in invoice line as a name for the input",
"type": "string"
},
"exportToAccounting": {
"description": "Whether or not to show this adjustment in batchedVoucherLines",
"type": "boolean",
"default": false
},
"fundDistributions": {
"description": "Fund distribution records from which this adjustment will be paid; only valid at invoice level",
"id": "fundDistributions",
"type": "array",
"items": {
"description": "fund distribution record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"code": {
"description": "The code of the fund associated with this fund distribution",
"type": "string"
},
"encumbrance": {
"description": "UUID of encumbrance record associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"fundId": {
"description": "UUID of the fund associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceLineId": {
"description": "UUID of the invoice line associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"distributionType": {
"description": "Percentage or amount type of the value property",
"type": "string",
"enum": [
"amount",
"percentage"
],
"default": "percentage"
},
"expenseClassId": {
"description": "UUID of the expense class associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"value": {
"description": "The percentage of the cost to be applied to this fund",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"fundId",
"distributionType",
"value"
]
}
},
"prorate": {
"description": "Displayed in invoice line per adjustment in toggled on in settings",
"type": "string",
"enum": [
"By line",
"By amount",
"By quantity",
"Not prorated"
],
"default": "Not prorated"
},
"relationToTotal": {
"description": "Relationship of this adjustment to the total;In addition to: added to subtotal;Included in: reported as subtotal portion;Separate from:calculated from subtotal",
"type": "string",
"enum": [
"In addition to",
"Included in",
"Separate from"
],
"default": "In addition to"
},
"type": {
"description": "Adjustment type",
"type": "string",
"enum": [
"Percentage",
"Amount"
]
},
"value": {
"description": "Adjustment value",
"type": "number"
},
"totalAmount": {
"description": "Total adjustment amount",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"description",
"exportToAccounting",
"prorate",
"relationToTotal",
"type",
"value"
]
}
},
"adjustmentsTotal": {
"description": "Total amount which is sum of all invoice line adjustments and all non-prorated invoice level adjustments. This amount is always calculated by system.",
"type": "number"
},
"approvedBy": {
"description": "UUID of user that approved this invoice",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"approvalDate": {
"description": "Date the invoice was approved for processing",
"type": "string",
"format": "date-time"
},
"batchGroupId": {
"description": "UUID of the batch group to use when generating batch vouchers",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"default": "2a2cb998-1437-41d1-88ad-01930aaeadd5"
},
"billTo": {
"description": "UUID of the billing address",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"chkSubscriptionOverlap": {
"description": "IF TRUE the system will check if there is another invoice for this subscription and whether the dates overlap. IF the dates overlap, the system should issue an alert.",
"type": "boolean"
},
"cancellationNote": {
"description": "The reason of the invoice cancellation.",
"type": "string"
},
"currency": {
"description": "Ideally this is the ISO code and not something the user defines",
"type": "string"
},
"enclosureNeeded": {
"description": "Indicates that an enclosure is needed",
"type": "boolean",
"default": false
},
"exchangeRate": {
"description": "Exchange rate",
"type": "number"
},
"operationMode": {
"description": "Operation mode performed on the exchange rate",
"type": "string"
},
"exportToAccounting": {
"description": "This would keep the invoice from being feed into the batch process (i.e. not generate an external voucher/payment) but would still move values in the system. This might be defined by the vendor relationship and exposed for override on the invoice.",
"type": "boolean",
"default": false
},
"folioInvoiceNo": {
"description": "Invoice number in folio system",
"type": "string"
},
"invoiceDate": {
"description": "Invoice date",
"type": "string",
"format": "date-time"
},
"lockTotal": {
"description": "Total amount which manually set by user. The calculated total must match this before the invoice can be approved",
"type": "number"
},
"note": {
"description": "Invoice note",
"type": "string"
},
"paymentDue": {
"description": "When this is required to be paid. Generally governed by the relationship with the Vendor",
"type": "string",
"format": "date-time"
},
"paymentDate": {
"description": "When the invoice was actually paid",
"type": "string",
"format": "date-time"
},
"paymentTerms": {
"description": "Invoice payment terms",
"type": "string"
},
"paymentMethod": {
"description": "Inherited from vendor record",
"type": "string"
},
"status": {
"description": "Open: Record has been created, Reviewed: details have been verified, Approved: Funds are release, Paid: confirmation that funds have been exchanged and check number has been returned amounts are frozen, cancelled.\nNote: invoices are never partially paid.",
"type": "string",
"enum": [
"Open",
"Reviewed",
"Approved",
"Paid",
"Cancelled"
]
},
"source": {
"description": "This does not denote a user ID but describes how the record was created. Eg. User, API, EDI",
"type": "string",
"enum": [
"User",
"API",
"EDI"
]
},
"subTotal": {
"description": "Invoice amount before adjustments are applied. This is sum of all subTotal amounts of the corresponding invoice lines. This amount is always calculated by system.",
"type": "number",
"readonly": true
},
"total": {
"description": "The total amount is calculated \"on the fly\" of this invoice which is sum of subTotal and adjustmentsTotal. Must be the same with existed \"lockTotal\", when approve invoice.",
"type": "number",
"readonly": true
},
"vendorInvoiceNo": {
"description": "This is the number from the vendor's invoice, which is different from the folioInvoiceNo",
"type": "string"
},
"disbursementNumber": {
"description": "The identifier for the physical transaction corresponding to a payment (Eg. Check #, EFT # etc.) Brought in from external source",
"type": "string"
},
"voucherNumber": {
"description": "Number generated by folio that will eventually identify the payment request sent out to external financial system.",
"type": "string"
},
"paymentId": {
"description": "Id of payment",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"disbursementDate": {
"description": "Date payment was made from financial system (eg. corresponding check date)",
"type": "string",
"format": "date-time"
},
"poNumbers": {
"description": "May or may not be provided; references the PO associated to the invoice",
"id": "poNumbers",
"type": "array",
"items": {
"description": "A human readable ID assigned to this purchase order",
"type": "string",
"pattern": "^[a-zA-Z0-9]{1,22}$"
}
},
"vendorId": {
"description": "UUID of vendor",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{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 fiscal year",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"accountNo": {
"description": "The unique number of the organization account",
"type": "string"
},
"manualPayment": {
"description": "This would keep the invoice from being feed into the batch process (Not generate a external voucher/payment) but would still move values in the system. Note: this is ideally defined by the vendor relationship and exposed for override on the invoice.",
"type": "boolean"
},
"acqUnitIds": {
"description": "acquisition unit ids associated with this invoice",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "The UUID format string",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
}
},
"nextInvoiceLineNumber": {
"description": "Number that will be used next time an invoice line is created",
"type": "integer",
"readonly": true
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.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"
]
},
"tags": {
"type": "object",
"description": "arbitrary tags associated with this invoice",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "tags.schema",
"title": "tags",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"batchGroupId",
"currency",
"invoiceDate",
"paymentMethod",
"status",
"source",
"vendorInvoiceNo",
"vendorId"
]
}
Example:
{
"id": "733cafd3-895f-4e33-87b7-bf40dc3c8069",
"accountingCode" : "0206",
"adjustments": [
{
"id": "14263aab-b22b-4ddc-9ecc-3434427c2c8f",
"description": "Shipping",
"exportToAccounting" : false,
"type": "Amount",
"value": 4.50,
"prorate": "By line",
"relationToTotal": "In addition to"
},
{
"description": "Some Tax",
"exportToAccounting" : false,
"fundDistributions": [
{
"code": "USHIST",
"encumbrance": "1c8fc9f4-d2cc-4bd1-aa9a-cb02291cbe65",
"fundId": "1d1574f1-9196-4a57-8d1f-3b2e4309eb81",
"distributionType": "percentage",
"value": 100
}
],
"type": "Amount",
"value": 10,
"prorate": "Not prorated",
"relationToTotal": "In addition to"
}
],
"adjustmentsTotal": 14.50,
"batchGroupId": "2a2cb998-1437-41d1-88ad-01930aaeadd5",
"chkSubscriptionOverlap": false,
"currency": "USD",
"enclosureNeeded" : false,
"exchangeRate" : 1.092,
"operationMode": "MULTIPLY",
"exportToAccounting": true,
"folioInvoiceNo": "123invoicenumber45",
"invoiceDate": "2018-07-20T00:00:00.000+0000",
"lockTotal": 64.50,
"note": "Some note",
"paymentDue": "2018-08-29T00:00:00.000+0000",
"paymentDate": "2018-08-29T00:10:00.000+0000",
"paymentTerms": "Payment in Advance",
"paymentMethod": "EFT",
"status": "Reviewed",
"source": "User",
"vendorInvoiceNo": "YK75851",
"disbursementNumber": "58",
"voucherNumber": "478",
"paymentId": "a5065f0d-fb88-4d23-b0c1-57e754fba40e",
"disbursementDate": "2018-08-19T00:00:00.000+0000",
"poNumbers": [
"AB268758XYZ"
],
"vendorId": "168f8a63-d612-406e-813f-c7527f241ac3",
"fiscalYearId": "ac2164c7-ba3d-1bc2-a12c-e35ceccbfaf2",
"accountNo": "GOBI-HIST-12",
"manualPayment": true,
"nextInvoiceLineNumber": 1,
"tags": {
"tagList": [
"tag"
]
},
"acqUnitIds": [
"1895e539-8dac-441e-b1f5-aab62b3fde60",
"47f504bd-0c1b-498e-a2ae-e2f0a0cea273"
],
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-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: 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 -- malformed JSON at 13:4"
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:
"invoice not found"
HTTP status code 409
Optimistic locking version conflict
Body
Media type: text/plain
Type: any
Example:
version conflict
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 administrator
delete /invoice/invoices/{id}
Delete an invoice with given {id}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of an invoice
HTTP status code 204
Item deleted successfully
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 delete invoice -- constraint violation"
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:
"invoice 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
Manage documents associated with invoice
Get list of documents
Post document attachment/link;
get /invoice/invoices/{id}/documents
Get list of documents
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of an invoice
Query Parameters
- totalRecords: (string - default: auto - pattern: exact|estimated|none|auto)
How to calculate the totalRecords property. "exact" for the correct number, "estimated" for an estimation, "auto" to automatically select "exact" or "estimated", "none" for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
none
- offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)
Skip over a number of elements by specifying an offset value for the query
Example:
0
- limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)
Limit the number of elements returned in the response
Example:
10
- query: (string)
A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.
with valid searchable fields: for example metadata.createdDate
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode metadata.createdDate > '2018-07-19T00:00:00.000+0000'
HTTP status code 200
Returns a list of document items
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of documents",
"type": "object",
"properties": {
"documents": {
"description": "an array of document records",
"id": "documents",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Document metadata",
"properties": {
"id": {
"description": "UUID of the attached document",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"name": {
"description": "The original document name for display purposes (filename or link 'nickname')",
"type": "string"
},
"invoiceId": {
"description": "UUID of the invoice the document is attached 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}$"
},
"url": {
"description": "URL pointing to the document",
"type": "string",
"pattern": "\\b((?:[a-z][\\w-]+:(?:/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?]))"
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.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"
]
}
},
"additionalProperties": false,
"required": [
"name",
"invoiceId"
]
}
},
"totalRecords": {
"description": "total number of records in the array",
"type": "integer"
}
},
"required": [
"documents",
"totalRecords"
]
}
Example:
{
"documents": [
{
"id": "10a34f8a-98d1-45af-a9f6-14b7174ceb51",
"name": "sample.pdf",
"invoiceId": "733cafd3-895f-4e33-87b7-bf40dc3c8069",
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
},
{
"id": "36c07579-6699-496a-b9d8-b45c0fd90e35",
"name": "dummy.pdf",
"invoiceId": "733cafd3-895f-4e33-87b7-bf40dc3c8069",
"url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "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 list documents -- malformed parameter 'query', syntax error at column 6
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
post /invoice/invoices/{id}/documents
Post document attachment/link;
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of an invoice
Body
Media type: application/octet-stream
Type: any
Example:
{
"documentMetadata": {
"id": "10a34f8a-98d1-45af-a9f6-14b7174ceb51",
"name": "sample.pdf",
"invoiceId": "733cafd3-895f-4e33-87b7-bf40dc3c8069",
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9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Mqrra+fn5+EhYajpahgZGf2+PkRERGQkpPo6+0A/wATchRCAAABAHRSTlMA/gP+av7+/v7+lf7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v4I/t3tWNf+U/j+/nYQK3IBjx4XRwLnOqK9XsWbt6X+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8Dp+MUHAAAHOFJREFUeNrsmntMVOkZxhdnXUTWKc6oKDFxibhQRLxQ79e9tI0zAcfCUUTYlhQCpOpCm3EnO8AfgNhRdwc1Xa4ryMWyAg2OyCVcioqIqLDKKq6KKGCo2npZtZpt1/T9vvc7ZwbLoMCZA3/4JORNjAl8v3nf533Od+att97ojd7ojd5o8Fo6RhotHYVnX7Vo+eKVHy0bL4WWrfQcbZ/8ojXe4z+e47AWZfM613tUEVi6/KPxcxc4SCkv71F0/uVLfrUaPxzJOmDtWq/5o+X4nvM/nCPhwfnqMHd0EFi1+AM4/ggAIATGjIKP39tL6oObq9fIO+GKJQvWjhyAtXO9R7gHli9b0OcP+m/Lw31/G4z+aaF/8dq3b98v4OdHqkegh6B/EN29e/36rVuP2gUQI7wLYPwtPpGrd59fe7pzt1oFsleh/q+qiSJDpgQGhwVsTkiYEBQU7ef3xbeTki/u2XLqkw3TP9t+/PTe+PRzOQdyizKyTXkHS45WHy6rKa9rPtPT2nD5xvff/fBDRXe70AkjugtW/NJi9V99dG3aWPtXa5yMaopcPstphuMEZ2c7Ox+fdyZNGnvx3Xmn3vvZ9P2zJ7vtrTISAqWEQAUj0NXcyxPI+zMQ4DWCu2AR9D//SVz9y52NYQN98kKNoD0gC/GlPeCYkAA98B+/d77d9SfSA+9t+C3rgSP99MDN1oYrAMCkXve4ne88hxHzgTELzbN/+ye/Vx1cqJSALBIJzNiMBHy+YAQ+eQUB0gImtWri4w5h9EZqF6xcwAO4+vc7r3FwoRICMjUScAIAhICPHxKYBwSSgIAbI1Dah0DbmR7SAofUKvuo7g7Bf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RNHq/FA7RfjN1tsC9h68x4nQI1WBxUBxB8SDAGicni2tc6qgPWts0NFNAQIIT+d9ZNoe49gCHCpyuti4WindgdgqB4Viq+V85yiYHIE+vog7Gh0/Y2SbymeFo6+Z4ijwmmxJa9UhGzsCNBbPwmG4WV4fhZ82f3l04pOy8oKC/XT2u6Xynxa/4cJVdrbhK8+gPEqtLUTynibfPwI8DV5CXWi+kHAgwB9+0eJFXibOxvZF9DY2ewlVhFuu3+PbQH37reFiYUEw13VdwRWBQh3qrvCQWItQX+sqbq7cixghMbu6qaY3+rlw3HoDwciXaFqhgh1RQJhf5T8iwQdTBEkNjY2Njb/nL8AcRZRWA0Qpu4AAAAASUVORK5CYII="
},
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
HTTP status code 201
Returns a newly created item, with server-controlled fields like 'id' populated
Headers
- Location: required(string)
URI to the created Invoice Document item
Body
Media type: application/json
Type: any
Example:
{
"documentMetadata": {
"id": "10a34f8a-98d1-45af-a9f6-14b7174ceb51",
"name": "sample.pdf",
"invoiceId": "733cafd3-895f-4e33-87b7-bf40dc3c8069",
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
},
"contents": {
"data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAADAFBMVEVHcEz3+PgAAAD9/f0AAADz9PX19vf+/v79/f4AAAAAAAD6+vvx8vT5+fr7/Pzr7e/7+/v4+fnZ3eHb3uLz9fbk5+r8/P34+fru8PHa3uHi5ejp6+3q7O/09fbt7/D6+/vs7vDd4OTt7/H5+vrj5ur7+/zo6+3l6Ove4eXp7O4BAQHm6esAAAAAAAABAQEAAADv8fIBAQEAAAD29/drbW8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADs7fAAAAD////+/v4A/fj9/f329/j19vfb3+P7+/v4+Pn5+vr7/Pza3uLs7vD09fb8/f36+/v4+fr7+/z8/P39/f7t7/Hr7fDv8PLk5+ry8/Xx8vT8/Pzj5un5+fr+/v/9/v75+fnw6eX+///v8fPw8vPn6eze4uX3+Pnl6Ovp6+3z9Pbq7O7h5Ofm6ezp6+7f4ubz9fXo6u3i5ejg4+bc3+Pf4+fv8/v55O/x8/T5+vvh5Ojr7e/w8fPz9PXc4OPy8/Tg4+fz9fbv8fLw8vT09vfq7O/c4OTn6uzh5elrbW/n6u3m4OBHR0jm6evd4OTX3ODd4eXM09nZ3eLi5unp7O7V2uDI0NbY3OG+yNDS2N3BytLT2d7O1NrHztRJSkrK0ddMTEyuuMPQ1tzZ3eG6w8x9fX1FRkfQ1dvb3+TEzNO1v8motL+dqregrLm9xc60vcfe4ub3+Pixu8WksLyrtsCbqLVERUbS19vk6OvV2t64wcqBkaHt8PLb3+Lj5uqnsr2Rn62UorCirrra3uMqKiswMTKFlaX09ffY3ODx8/WXpLFpfI/j5+p8jZ0VFRV3iZpvgZQJCQmwsbI6PD8eHyBzhZcEBASMm6o0Nzmap7OYmJiLmqglJynx8/OPnqxDSU++wcM/QUTO09d4eXpydHWHl6a4uLlRVFdZXF9hdIeam5y1tbXFyMqrra+fn5+EhYajpahgZGf2+PkRERGQkpPo6+0A/wATchRCAAABAHRSTlMA/gP+av7+/v7+lf7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v4I/t3tWNf+U/j+/nYQK3IBjx4XRwLnOqK9XsWbt6X+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8Dp+MUHAAAHOFJREFUeNrsmntMVOkZxhdnXUTWKc6oKDFxibhQRLxQ79e9tI0zAcfCUUTYlhQCpOpCm3EnO8AfgNhRdwc1Xa4ryMWyAg2OyCVcioqIqLDKKq6KKGCo2npZtZpt1/T9vvc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AAAASUVORK5CYII="
},
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "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 add Invoice Document -- malformed JSON at 13:3"
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 create Invoice Document -- unauthorized
HTTP status code 413
Invoice Document too large
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 create Invoice Document -- unauthorized
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 administrator
Get and Delete a specific document attachments/links. Update operation is not allowed
Retrieve document item with given {documentId}
Delete document item with given {documentId}
get /invoice/invoices/{id}/documents/{documentId}
Retrieve document item with given {documentId}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of an invoice
- documentId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a document
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": "Document attached/associated with an invoice either via a hyperlink to the document or by direct upload and storage within FOLIO",
"type": "object",
"properties": {
"documentMetadata": {
"description": "Document metadata",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"id": {
"description": "UUID of the attached document",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"name": {
"description": "The original document name for display purposes (filename or link 'nickname')",
"type": "string"
},
"invoiceId": {
"description": "UUID of the invoice the document is attached 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}$"
},
"url": {
"description": "URL pointing to the document",
"type": "string",
"pattern": "\\b((?:[a-z][\\w-]+:(?:/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?]))"
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.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"
]
}
},
"additionalProperties": false,
"required": [
"name",
"invoiceId"
]
},
"contents": {
"description": "Base64 encoded file data",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"data": {
"description": "Base64 encoded file data",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"data"
]
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.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"
]
}
},
"additionalProperties": false,
"required": [
"documentMetadata"
]
}
Example:
{
"documentMetadata": {
"id": "10a34f8a-98d1-45af-a9f6-14b7174ceb51",
"name": "sample.pdf",
"invoiceId": "733cafd3-895f-4e33-87b7-bf40dc3c8069",
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
},
"contents": {
"data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAADAFBMVEVHcEz3+PgAAAD9/f0AAADz9PX19vf+/v79/f4AAAAAAAD6+vvx8vT5+fr7/Pzr7e/7+/v4+fnZ3eHb3uLz9fbk5+r8/P34+fru8PHa3uHi5ejp6+3q7O/09fbt7/D6+/vs7vDd4OTt7/H5+vrj5ur7+/zo6+3l6Ove4eXp7O4BAQHm6esAAAAAAAABAQEAAADv8fIBAQEAAAD29/drbW8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADs7fAAAAD////+/v4A/fj9/f329/j19vfb3+P7+/v4+Pn5+vr7/Pza3uLs7vD09fb8/f36+/v4+fr7+/z8/P39/f7t7/Hr7fDv8PLk5+ry8/Xx8vT8/Pzj5un5+fr+/v/9/v75+fnw6eX+///v8fPw8vPn6eze4uX3+Pnl6Ovp6+3z9Pbq7O7h5Ofm6ezp6+7f4ubz9fXo6u3i5ejg4+bc3+Pf4+fv8/v55O/x8/T5+vvh5Ojr7e/w8fPz9PXc4OPy8/Tg4+fz9fbv8fLw8vT09vfq7O/c4OTn6uzh5elrbW/n6u3m4OBHR0jm6evd4OTX3ODd4eXM09nZ3eLi5unp7O7V2uDI0NbY3OG+yNDS2N3BytLT2d7O1NrHztRJSkrK0ddMTEyuuMPQ1tzZ3eG6w8x9fX1FRkfQ1dvb3+TEzNO1v8motL+dqregrLm9xc60vcfe4ub3+Pixu8WksLyrtsCbqLVERUbS19vk6OvV2t64wcqBkaHt8PLb3+Lj5uqnsr2Rn62UorCirrra3uMqKiswMTKFlaX09ffY3ODx8/WXpLFpfI/j5+p8jZ0VFRV3iZpvgZQJCQmwsbI6PD8eHyBzhZcEBASMm6o0Nzmap7OYmJiLmqglJynx8/OPnqxDSU++wcM/QUTO09d4eXpydHWHl6a4uLlRVFdZXF9hdIeam5y1tbXFyMqrra+fn5+EhYajpahgZGf2+PkRERGQkpPo6+0A/wATchRCAAABAHRSTlMA/gP+av7+/v7+lf7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v4I/t3tWNf+U/j+/nYQK3IBjx4XRwLnOqK9XsWbt6X+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8Dp+MUHAAAHOFJREFUeNrsmntMVOkZxhdnXUTWKc6oKDFxibhQRLxQ79e9tI0zAcfCUUTYlhQCpOpCm3EnO8AfgNhRdwc1Xa4ryMWyAg2OyCVcioqIqLDKKq6KKGCo2npZtZpt1/T9vvc7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AAASUVORK5CYII="
},
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
HTTP status code 400
Bad request
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 process document -- constraint violation"
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:
"document 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
delete /invoice/invoices/{id}/documents/{documentId}
Delete document item with given {documentId}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of an invoice
- documentId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a document
HTTP status code 204
Item deleted successfully
HTTP status code 400
Bad request
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 process document -- constraint violation"
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:
"document 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
Past and present fiscal years associated with the invoice
Get a list of fiscal years to approve or pay the invoice
get /invoice/invoices/{id}/fiscal-years
Get a list of fiscal years to approve or pay the invoice
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of an invoice
HTTP status code 200
Returns a list of fiscal-year items
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A collection of fiscal years",
"type": "object",
"properties": {
"fiscalYears": {
"description": "The list of fiscal year objects in this collection",
"type": "array",
"id": "fiscal_years",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A fiscal year record",
"properties": {
"id": {
"description": "UUID of the fiscal year record",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"_version": {
"type": "integer",
"description": "Record version for optimistic locking"
},
"acqUnitIds": {
"description": "UUIDs of the acquisition units associated with this fiscal year",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "The UUID format string",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
}
},
"name": {
"description": "The name of the fiscal year",
"type": "string"
},
"code": {
"description": "The code of the fiscal year",
"type": "string"
},
"currency": {
"description": "Currency code which is recorded when the FY ends, otherwise the system currency can be assumed",
"type": "string"
},
"description": {
"description": "The description of the fiscal year",
"type": "string"
},
"periodStart": {
"description": "The start date of the fiscal year",
"type": "string",
"format": "date-time"
},
"periodEnd": {
"description": "The end date of the fiscal year",
"type": "string",
"format": "date-time"
},
"series": {
"description": "The fiscal year series",
"type": "string"
},
"financialSummary": {
"description": "Includes Funding information and Financial activity",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"allocated": {
"description": "Summary of all related to this fiscal year budgets allocated",
"type": "number",
"readonly": true
},
"available": {
"description": "Summary of all related to this fiscal year budgets available",
"type": "number",
"readonly": true
},
"unavailable": {
"description": "Summary of all related to this fiscal year budgets unavailable",
"type": "number",
"readonly": true
},
"initialAllocation": {
"description": "Summary of all related to this fiscal year budgets initialAllocation",
"type": "number",
"readonly": true
},
"allocationTo": {
"description": "Summary of all related to this fiscal year budgets allocationTo",
"type": "number",
"readonly": true
},
"allocationFrom": {
"description": "Summary of all related to this fiscal year budgets allocationFrom",
"type": "number",
"readonly": true
},
"totalFunding": {
"description": "Summary of all related to this fiscal year budgets totalFunding",
"type": "number",
"readonly": true
},
"cashBalance": {
"description": "Summary of all related to this fiscal year budgets cashBalance",
"type": "number",
"readonly": true
},
"awaitingPayment": {
"description": "Summary of all related to this fiscal year budgets awaitingPayment",
"type": "number",
"readonly": true
},
"credits": {
"description": "Summary of all related to this fiscal year budgets credits",
"type": "number",
"readonly": true
},
"encumbered": {
"description": "Summary of all related to this fiscal year budgets encumbered",
"type": "number",
"readonly": true
},
"expenditures": {
"description": "Summary of all related to this ledger budgets expenditures",
"type": "number",
"readonly": true
},
"overEncumbrance": {
"description": "Summary of all related to this ledger budgets overEncumbrance",
"type": "number",
"readonly": true
},
"overExpended": {
"description": "Summary of all related to this ledger budgets overExpended",
"type": "number",
"readonly": true
}
},
"additionalProperties": false
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.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"
]
}
},
"additionalProperties": false,
"required": [
"code",
"name",
"periodStart",
"periodEnd"
]
}
},
"totalRecords": {
"description": "The number of objects in this collection",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"fiscalYears",
"totalRecords"
]
}
Example:
{
"fiscalYears": [
{
"id": "ac2164c7-ba3d-1bc2-a12c-e35ceccbfaf2",
"name": "Fiscal Year 2017",
"code": "FY2017",
"currency": "USD",
"description": "January 1 - December 30",
"periodStart": "2017-01-01T00:00:00Z",
"periodEnd": "2017-12-30T23:59:59Z",
"series": "FY",
"metadata": {
"createdDate": "2016-12-17T14:12:42.497+0000",
"createdByUserId": "bfb64f23-818d-488a-a868-62c40d9510a1",
"updatedDate": "2017-12-28T08:37:19.263+0000",
"updatedByUserId": "498492aa-f909-42f6-b154-5bf66e6486ba"
}
},
{
"id": "517efc6a-f218-4d25-a832-10de4dc32f25",
"name": "Fiscal decade 2020-2029",
"code": "FY2029",
"description": "January 1 - December 30",
"periodStart": "2020-01-01T00:00:00Z",
"periodEnd": "2029-12-30T23:59:59Z",
"series": "FY",
"metadata": {
"createdDate": "2019-06-17T14:12:42.497+0000",
"createdByUserId": "498492aa-f909-42f6-b154-5bf66e6486ba",
"updatedDate": "2019-08-28T08:37:19.263+0000",
"updatedByUserId": "7ec56c96-e9f2-4079-9509-86b00f8dacd5"
}
}
],
"totalRecords": 2
}
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 fiscal-years -- malformed parameter 'query', syntax error at column 6
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
Manage Invoice lines
Retrieve a list of invoice-line items.
Post an invoice lines to corresponding invoice
get /invoice/invoice-lines
Retrieve a list of invoice-line items.
Query Parameters
- totalRecords: (string - default: auto - pattern: exact|estimated|none|auto)
How to calculate the totalRecords property. "exact" for the correct number, "estimated" for an estimation, "auto" to automatically select "exact" or "estimated", "none" for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
none
- offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)
Skip over a number of elements by specifying an offset value for the query
Example:
0
- limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)
Limit the number of elements returned in the response
Example:
10
- query: (string)
A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.
using CQL (indexes for invoice lines)
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode status=="Open"
HTTP status code 200
Returns a list of invoice-line items
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "collection of invoice lines",
"type": "object",
"properties": {
"invoiceLines": {
"description": "an array of invoice line records",
"id": "invoiceLines",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "invoice line",
"javaName": "InvoiceLine",
"properties": {
"id": {
"description": "UUID of this invoice line",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"accountingCode": {
"description": "Pulled based on account number.",
"type": "string"
},
"accountNumber": {
"description": "Account number that the vendor assigned",
"type": "string"
},
"adjustments": {
"description": "Defined in settings - the amount field will be editable and pro-rate toggle will be editable if enabled for that adjustment",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Adjustment",
"properties": {
"id": {
"description": "UUID of this adjustment",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"adjustmentId": {
"description": "UUID of the Invoice adjustment incase of prorated adjustments",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"description": {
"description": "Displayed in invoice line as a name for the input",
"type": "string"
},
"exportToAccounting": {
"description": "Whether or not to show this adjustment in batchedVoucherLines",
"type": "boolean",
"default": false
},
"fundDistributions": {
"description": "Fund distribution records from which this adjustment will be paid; only valid at invoice level",
"id": "fundDistributions",
"type": "array",
"items": {
"description": "fund distribution record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"code": {
"description": "The code of the fund associated with this fund distribution",
"type": "string"
},
"encumbrance": {
"description": "UUID of encumbrance record associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"fundId": {
"description": "UUID of the fund associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceLineId": {
"description": "UUID of the invoice line associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"distributionType": {
"description": "Percentage or amount type of the value property",
"type": "string",
"enum": [
"amount",
"percentage"
],
"default": "percentage"
},
"expenseClassId": {
"description": "UUID of the expense class associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"value": {
"description": "The percentage of the cost to be applied to this fund",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"fundId",
"distributionType",
"value"
]
}
},
"prorate": {
"description": "Displayed in invoice line per adjustment in toggled on in settings",
"type": "string",
"enum": [
"By line",
"By amount",
"By quantity",
"Not prorated"
],
"default": "Not prorated"
},
"relationToTotal": {
"description": "Relationship of this adjustment to the total;In addition to: added to subtotal;Included in: reported as subtotal portion;Separate from:calculated from subtotal",
"type": "string",
"enum": [
"In addition to",
"Included in",
"Separate from"
],
"default": "In addition to"
},
"type": {
"description": "Adjustment type",
"type": "string",
"enum": [
"Percentage",
"Amount"
]
},
"value": {
"description": "Adjustment value",
"type": "number"
},
"totalAmount": {
"description": "Total adjustment amount",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"description",
"exportToAccounting",
"prorate",
"relationToTotal",
"type",
"value"
]
}
},
"adjustmentsTotal": {
"description": "Sum of all invoice line adjustments. This amount is always calculated by system.",
"type": "number"
},
"comment": {
"description": "Free form commentary",
"type": "string"
},
"description": {
"description": "Title as captured in the Purchase Order Line. In the absence of a POL link this could be used to describe the POL",
"type": "string"
},
"fundDistributions": {
"description": "List of fund distributions",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Invoice/voucher line fund distribution",
"properties": {
"code": {
"description": "The code of the fund associated with this fund distribution",
"type": "string"
},
"encumbrance": {
"description": "UUID of encumbrance record associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"fundId": {
"description": "UUID of the fund associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceLineId": {
"description": "UUID of the invoice line associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"distributionType": {
"description": "Percentage or amount type of the value property",
"type": "string",
"enum": [
"amount",
"percentage"
],
"default": "percentage"
},
"expenseClassId": {
"description": "UUID of the expense class associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"value": {
"description": "The percentage of the cost to be applied to this fund",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"fundId",
"distributionType",
"value"
]
}
},
"invoiceId": {
"description": "UUID of this parent invoice",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceLineNumber": {
"description": "Sequentially generated and not editable by the user.",
"type": "string"
},
"invoiceLineStatus": {
"description": "Invoice line status",
"type": "string",
"enum": [
"Open",
"Reviewed",
"Approved",
"Paid",
"Cancelled",
"Error"
]
},
"poLineId": {
"description": "UUID of the corresponding purchase order line this invoice line is based on",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"productId": {
"description": "product identifier",
"type": "string"
},
"productIdType": {
"description": "the type of product id",
"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}$"
},
"quantity": {
"description": "quantity",
"type": "integer"
},
"releaseEncumbrance": {
"description": "This is intended to not only release encumbrances but to indicate that this is the final invoice line for corresponding order line. This should take into account the fiscal year. We may release encumbrance for this FY but for on-going orders expect to encumber again next year.",
"type": "boolean",
"default": true
},
"subscriptionInfo": {
"description": "The user should use this field to provide info on the subscription (eg. which volumes are being invoiced). It is MANDATORY if the chk_subscription_overlap is FALSE AND there is no start date provided",
"type": "string"
},
"subscriptionStart": {
"description": "Subscription start date",
"type": "string",
"format": "date-time"
},
"subscriptionEnd": {
"description": "Subscription end date",
"type": "string",
"format": "date-time"
},
"subTotal": {
"description": "Invoice line amount before adjustments are applied",
"type": "number"
},
"total": {
"description": "Invoice line total amount which is sum of subTotal and adjustmentsTotal. This amount is always calculated by system.",
"type": "number"
},
"referenceNumbers": {
"description": "Reference number items array",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Reference number item",
"type": "object",
"properties": {
"refNumber": {
"description": "a reference number for this purchase order line",
"type": "string"
},
"refNumberType": {
"description": "the reference number type",
"type": "string",
"enum": [
"Vendor continuation reference number",
"Vendor order reference number",
"Vendor subscription reference number",
"Vendor internal number",
"Vendor title number"
],
"javaEnums": [
"CONTINUATION_REF_NUMBER",
"ORDER_REF_NUMBER",
"SUBSCRIPTION_REF_NUMBER",
"INTERNAL_NUMBER",
"TITLE_NUMBER"
]
},
"vendorDetailsSource": {
"description": "the reference number type",
"type": "string",
"enum": [
"OrderLine",
"InvoiceLine"
],
"javaEnums": [
"ORDER_LINE",
"INVOICE_LINE"
]
}
},
"additionalProperties": false
},
"additionalProperties": false
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.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"
]
},
"tags": {
"type": "object",
"description": "arbitrary tags associated with this invoice line",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "tags.schema",
"title": "tags",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"description",
"invoiceId",
"invoiceLineStatus",
"subTotal",
"quantity",
"releaseEncumbrance"
]
}
},
"totalRecords": {
"description": "total number of records in the array",
"type": "integer"
}
},
"required": [
"invoiceLines",
"totalRecords"
]
}
Example:
{
"invoiceLines": [
{
"id": "e0d08448-343b-118a-8c2f-4fb50248d672",
"accountingCode": "0206",
"accountNumber": "GOBI-HIST-12",
"adjustments": [
{
"description":"Service Fee",
"exportToAccounting" : false,
"type":"Amount",
"value":2.25,
"prorate":"Not prorated",
"relationToTotal":"In addition to"
},
{
"description":"Shipping",
"exportToAccounting" : false,
"type":"Amount",
"value":2.75,
"prorate":"Not prorated",
"relationToTotal":"In addition to"
}
],
"adjustmentsTotal": 5.00,
"description": "Some description",
"fundDistributions": [
{
"code": "USHIST",
"encumbrance": "949c9e5d-2c7d-45d6-bd7f-8e82a0b27889",
"fundId": "1d1574f1-9196-4a57-8d1f-3b2e4309eb81",
"distributionType": "percentage",
"value": 100
}
],
"poLineId": "e8971620-8ee4-4f3b-b5b5-93b864df16ed",
"invoiceId": "c0d08448-347b-418a-8c2f-5fb50248d67e",
"invoiceLineNumber": "1",
"invoiceLineStatus": "Open",
"referenceNumbers": [
{
"refNumber": "refNumExample",
"refNumberType": "Vendor title number",
"vendorDetailsSource": "InvoiceLine"
}
],
"productId": "9780764354113",
"productIdType": "8261054f-be78-422d-bd51-4ed9f33c3422",
"comment": "Sample invoice line",
"quantity": 3,
"releaseEncumbrance": true,
"subscriptionInfo": "Subscription information",
"subscriptionStart": "2018-08-01T00:00:00.000+0000",
"subscriptionEnd": "2020-01-01T00:00:00.000+0000",
"subTotal": 125.00,
"total": 130.00,
"tags": {
"tagList": [
"tag"
]
},
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
],
"totalRecords": 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 list invoice-lines -- malformed parameter 'query', syntax error at column 6
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 list invoice-lines -- unauthorized
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 administrator
post /invoice/invoice-lines
Post an invoice lines to corresponding invoice
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "invoice line",
"javaName": "InvoiceLine",
"type": "object",
"properties": {
"id": {
"description": "UUID of this invoice line",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"accountingCode": {
"description": "Pulled based on account number.",
"type": "string"
},
"accountNumber": {
"description": "Account number that the vendor assigned",
"type": "string"
},
"adjustments": {
"description": "Defined in settings - the amount field will be editable and pro-rate toggle will be editable if enabled for that adjustment",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Adjustment",
"properties": {
"id": {
"description": "UUID of this adjustment",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"adjustmentId": {
"description": "UUID of the Invoice adjustment incase of prorated adjustments",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"description": {
"description": "Displayed in invoice line as a name for the input",
"type": "string"
},
"exportToAccounting": {
"description": "Whether or not to show this adjustment in batchedVoucherLines",
"type": "boolean",
"default": false
},
"fundDistributions": {
"description": "Fund distribution records from which this adjustment will be paid; only valid at invoice level",
"id": "fundDistributions",
"type": "array",
"items": {
"description": "fund distribution record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"code": {
"description": "The code of the fund associated with this fund distribution",
"type": "string"
},
"encumbrance": {
"description": "UUID of encumbrance record associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"fundId": {
"description": "UUID of the fund associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceLineId": {
"description": "UUID of the invoice line associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"distributionType": {
"description": "Percentage or amount type of the value property",
"type": "string",
"enum": [
"amount",
"percentage"
],
"default": "percentage"
},
"expenseClassId": {
"description": "UUID of the expense class associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"value": {
"description": "The percentage of the cost to be applied to this fund",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"fundId",
"distributionType",
"value"
]
}
},
"prorate": {
"description": "Displayed in invoice line per adjustment in toggled on in settings",
"type": "string",
"enum": [
"By line",
"By amount",
"By quantity",
"Not prorated"
],
"default": "Not prorated"
},
"relationToTotal": {
"description": "Relationship of this adjustment to the total;In addition to: added to subtotal;Included in: reported as subtotal portion;Separate from:calculated from subtotal",
"type": "string",
"enum": [
"In addition to",
"Included in",
"Separate from"
],
"default": "In addition to"
},
"type": {
"description": "Adjustment type",
"type": "string",
"enum": [
"Percentage",
"Amount"
]
},
"value": {
"description": "Adjustment value",
"type": "number"
},
"totalAmount": {
"description": "Total adjustment amount",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"description",
"exportToAccounting",
"prorate",
"relationToTotal",
"type",
"value"
]
}
},
"adjustmentsTotal": {
"description": "Sum of all invoice line adjustments. This amount is always calculated by system.",
"type": "number"
},
"comment": {
"description": "Free form commentary",
"type": "string"
},
"description": {
"description": "Title as captured in the Purchase Order Line. In the absence of a POL link this could be used to describe the POL",
"type": "string"
},
"fundDistributions": {
"description": "List of fund distributions",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Invoice/voucher line fund distribution",
"properties": {
"code": {
"description": "The code of the fund associated with this fund distribution",
"type": "string"
},
"encumbrance": {
"description": "UUID of encumbrance record associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"fundId": {
"description": "UUID of the fund associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceLineId": {
"description": "UUID of the invoice line associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"distributionType": {
"description": "Percentage or amount type of the value property",
"type": "string",
"enum": [
"amount",
"percentage"
],
"default": "percentage"
},
"expenseClassId": {
"description": "UUID of the expense class associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"value": {
"description": "The percentage of the cost to be applied to this fund",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"fundId",
"distributionType",
"value"
]
}
},
"invoiceId": {
"description": "UUID of this parent invoice",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceLineNumber": {
"description": "Sequentially generated and not editable by the user.",
"type": "string"
},
"invoiceLineStatus": {
"description": "Invoice line status",
"type": "string",
"enum": [
"Open",
"Reviewed",
"Approved",
"Paid",
"Cancelled",
"Error"
]
},
"poLineId": {
"description": "UUID of the corresponding purchase order line this invoice line is based on",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"productId": {
"description": "product identifier",
"type": "string"
},
"productIdType": {
"description": "the type of product id",
"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}$"
},
"quantity": {
"description": "quantity",
"type": "integer"
},
"releaseEncumbrance": {
"description": "This is intended to not only release encumbrances but to indicate that this is the final invoice line for corresponding order line. This should take into account the fiscal year. We may release encumbrance for this FY but for on-going orders expect to encumber again next year.",
"type": "boolean",
"default": true
},
"subscriptionInfo": {
"description": "The user should use this field to provide info on the subscription (eg. which volumes are being invoiced). It is MANDATORY if the chk_subscription_overlap is FALSE AND there is no start date provided",
"type": "string"
},
"subscriptionStart": {
"description": "Subscription start date",
"type": "string",
"format": "date-time"
},
"subscriptionEnd": {
"description": "Subscription end date",
"type": "string",
"format": "date-time"
},
"subTotal": {
"description": "Invoice line amount before adjustments are applied",
"type": "number"
},
"total": {
"description": "Invoice line total amount which is sum of subTotal and adjustmentsTotal. This amount is always calculated by system.",
"type": "number"
},
"referenceNumbers": {
"description": "Reference number items array",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Reference number item",
"type": "object",
"properties": {
"refNumber": {
"description": "a reference number for this purchase order line",
"type": "string"
},
"refNumberType": {
"description": "the reference number type",
"type": "string",
"enum": [
"Vendor continuation reference number",
"Vendor order reference number",
"Vendor subscription reference number",
"Vendor internal number",
"Vendor title number"
],
"javaEnums": [
"CONTINUATION_REF_NUMBER",
"ORDER_REF_NUMBER",
"SUBSCRIPTION_REF_NUMBER",
"INTERNAL_NUMBER",
"TITLE_NUMBER"
]
},
"vendorDetailsSource": {
"description": "the reference number type",
"type": "string",
"enum": [
"OrderLine",
"InvoiceLine"
],
"javaEnums": [
"ORDER_LINE",
"INVOICE_LINE"
]
}
},
"additionalProperties": false
},
"additionalProperties": false
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.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"
]
},
"tags": {
"type": "object",
"description": "arbitrary tags associated with this invoice line",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "tags.schema",
"title": "tags",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"description",
"invoiceId",
"invoiceLineStatus",
"subTotal",
"quantity",
"releaseEncumbrance"
]
}
Example:
{
"id": "2be1e551-be27-4b03-b770-30e5e8211d19",
"accountingCode": "0206",
"accountNumber": "GOBI-HIST-12",
"adjustments": [
{
"description":"Service Fee",
"exportToAccounting" : false,
"type":"Amount",
"value":4.00,
"prorate":"Not prorated",
"relationToTotal":"In addition to"
},
{
"description":"Sales Tax",
"exportToAccounting" : false,
"type":"Percentage",
"value":8,
"prorate":"Not prorated",
"relationToTotal":"In addition to"
},
{
"adjustmentId": "14263aab-b22b-4ddc-9ecc-3434427c2c8f",
"exportToAccounting" : false,
"description":"Shipping",
"type":"Amount",
"value":2.50,
"prorate":"By line",
"relationToTotal":"In addition to"
}
],
"adjustmentsTotal": 8.50,
"comment": "Sample invoice line",
"description": "Some description",
"fundDistributions": [
{
"code": "USHIST",
"encumbrance": "1c8fc9f4-d2cc-4bd1-aa9a-cb02291cbe65",
"expenseClassId" : "5b5ebe3a-cf8b-4f16-a880-46873ef21388",
"fundId": "1d1574f1-9196-4a57-8d1f-3b2e4309eb81",
"distributionType": "percentage",
"value": 50
},
{
"code": "EUHIST",
"expenseClassId" : "5b5ebe3a-cf8b-4f16-a880-46873ef21388",
"encumbrance": "5f9bfc74-f6ff-4877-be1f-793f8ce90ade",
"fundId": "63157e96-0693-426d-b0df-948bacdfdb08",
"distributionType": "percentage",
"value": 50
}
],
"invoiceId": "c0d08448-347b-418a-8c2f-5fb50248d67e",
"invoiceLineNumber": "1",
"invoiceLineStatus": "Open",
"poLineId": "e8971620-8ee4-4f3b-b5b5-93b864df16ed",
"productId": "9780764354113",
"productIdType": "8261054f-be78-422d-bd51-4ed9f33c3422",
"quantity": 3,
"referenceNumbers": [
{
"refNumber": "refNumExample",
"refNumberType": "Vendor title number",
"vendorDetailsSource": "InvoiceLine"
}
],
"releaseEncumbrance": true,
"subscriptionInfo": "Subscription information",
"subscriptionStart": "2018-08-01T00:00:00.000+0000",
"subscriptionEnd": "2019-01-01T00:00:00.000+0000",
"subTotal": 25.00,
"total": 33.50,
"tags": {
"tagList": [
"tag"
]
},
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
HTTP status code 201
Returns a newly created item, with server-controlled fields like 'id' populated
Headers
- Location: required(string)
URI to the created invoice-line item
Body
Media type: application/json
Type: any
Example:
{
"id": "2be1e551-be27-4b03-b770-30e5e8211d19",
"accountingCode": "0206",
"accountNumber": "GOBI-HIST-12",
"adjustments": [
{
"description":"Service Fee",
"exportToAccounting" : false,
"type":"Amount",
"value":4.00,
"prorate":"Not prorated",
"relationToTotal":"In addition to"
},
{
"description":"Sales Tax",
"exportToAccounting" : false,
"type":"Percentage",
"value":8,
"prorate":"Not prorated",
"relationToTotal":"In addition to"
},
{
"adjustmentId": "14263aab-b22b-4ddc-9ecc-3434427c2c8f",
"exportToAccounting" : false,
"description":"Shipping",
"type":"Amount",
"value":2.50,
"prorate":"By line",
"relationToTotal":"In addition to"
}
],
"adjustmentsTotal": 8.50,
"comment": "Sample invoice line",
"description": "Some description",
"fundDistributions": [
{
"code": "USHIST",
"encumbrance": "1c8fc9f4-d2cc-4bd1-aa9a-cb02291cbe65",
"expenseClassId" : "5b5ebe3a-cf8b-4f16-a880-46873ef21388",
"fundId": "1d1574f1-9196-4a57-8d1f-3b2e4309eb81",
"distributionType": "percentage",
"value": 50
},
{
"code": "EUHIST",
"expenseClassId" : "5b5ebe3a-cf8b-4f16-a880-46873ef21388",
"encumbrance": "5f9bfc74-f6ff-4877-be1f-793f8ce90ade",
"fundId": "63157e96-0693-426d-b0df-948bacdfdb08",
"distributionType": "percentage",
"value": 50
}
],
"invoiceId": "c0d08448-347b-418a-8c2f-5fb50248d67e",
"invoiceLineNumber": "1",
"invoiceLineStatus": "Open",
"poLineId": "e8971620-8ee4-4f3b-b5b5-93b864df16ed",
"productId": "9780764354113",
"productIdType": "8261054f-be78-422d-bd51-4ed9f33c3422",
"quantity": 3,
"referenceNumbers": [
{
"refNumber": "refNumExample",
"refNumberType": "Vendor title number",
"vendorDetailsSource": "InvoiceLine"
}
],
"releaseEncumbrance": true,
"subscriptionInfo": "Subscription information",
"subscriptionStart": "2018-08-01T00:00:00.000+0000",
"subscriptionEnd": "2019-01-01T00:00:00.000+0000",
"subTotal": 25.00,
"total": 33.50,
"tags": {
"tagList": [
"tag"
]
},
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "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 add invoice-line -- malformed JSON at 13:3"
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 create invoice-lines -- unauthorized
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 administrator
Manage invoice line by id
Return an invoice line with given {id}
Update an invoice line with given {id}
Delete an invoice line with given {id}
get /invoice/invoice-lines/{id}
Return an invoice line with given {id}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a invoice line
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": "invoice line",
"javaName": "InvoiceLine",
"type": "object",
"properties": {
"id": {
"description": "UUID of this invoice line",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"accountingCode": {
"description": "Pulled based on account number.",
"type": "string"
},
"accountNumber": {
"description": "Account number that the vendor assigned",
"type": "string"
},
"adjustments": {
"description": "Defined in settings - the amount field will be editable and pro-rate toggle will be editable if enabled for that adjustment",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Adjustment",
"properties": {
"id": {
"description": "UUID of this adjustment",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"adjustmentId": {
"description": "UUID of the Invoice adjustment incase of prorated adjustments",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"description": {
"description": "Displayed in invoice line as a name for the input",
"type": "string"
},
"exportToAccounting": {
"description": "Whether or not to show this adjustment in batchedVoucherLines",
"type": "boolean",
"default": false
},
"fundDistributions": {
"description": "Fund distribution records from which this adjustment will be paid; only valid at invoice level",
"id": "fundDistributions",
"type": "array",
"items": {
"description": "fund distribution record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"code": {
"description": "The code of the fund associated with this fund distribution",
"type": "string"
},
"encumbrance": {
"description": "UUID of encumbrance record associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"fundId": {
"description": "UUID of the fund associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceLineId": {
"description": "UUID of the invoice line associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"distributionType": {
"description": "Percentage or amount type of the value property",
"type": "string",
"enum": [
"amount",
"percentage"
],
"default": "percentage"
},
"expenseClassId": {
"description": "UUID of the expense class associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"value": {
"description": "The percentage of the cost to be applied to this fund",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"fundId",
"distributionType",
"value"
]
}
},
"prorate": {
"description": "Displayed in invoice line per adjustment in toggled on in settings",
"type": "string",
"enum": [
"By line",
"By amount",
"By quantity",
"Not prorated"
],
"default": "Not prorated"
},
"relationToTotal": {
"description": "Relationship of this adjustment to the total;In addition to: added to subtotal;Included in: reported as subtotal portion;Separate from:calculated from subtotal",
"type": "string",
"enum": [
"In addition to",
"Included in",
"Separate from"
],
"default": "In addition to"
},
"type": {
"description": "Adjustment type",
"type": "string",
"enum": [
"Percentage",
"Amount"
]
},
"value": {
"description": "Adjustment value",
"type": "number"
},
"totalAmount": {
"description": "Total adjustment amount",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"description",
"exportToAccounting",
"prorate",
"relationToTotal",
"type",
"value"
]
}
},
"adjustmentsTotal": {
"description": "Sum of all invoice line adjustments. This amount is always calculated by system.",
"type": "number"
},
"comment": {
"description": "Free form commentary",
"type": "string"
},
"description": {
"description": "Title as captured in the Purchase Order Line. In the absence of a POL link this could be used to describe the POL",
"type": "string"
},
"fundDistributions": {
"description": "List of fund distributions",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Invoice/voucher line fund distribution",
"properties": {
"code": {
"description": "The code of the fund associated with this fund distribution",
"type": "string"
},
"encumbrance": {
"description": "UUID of encumbrance record associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"fundId": {
"description": "UUID of the fund associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceLineId": {
"description": "UUID of the invoice line associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"distributionType": {
"description": "Percentage or amount type of the value property",
"type": "string",
"enum": [
"amount",
"percentage"
],
"default": "percentage"
},
"expenseClassId": {
"description": "UUID of the expense class associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"value": {
"description": "The percentage of the cost to be applied to this fund",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"fundId",
"distributionType",
"value"
]
}
},
"invoiceId": {
"description": "UUID of this parent invoice",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceLineNumber": {
"description": "Sequentially generated and not editable by the user.",
"type": "string"
},
"invoiceLineStatus": {
"description": "Invoice line status",
"type": "string",
"enum": [
"Open",
"Reviewed",
"Approved",
"Paid",
"Cancelled",
"Error"
]
},
"poLineId": {
"description": "UUID of the corresponding purchase order line this invoice line is based on",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"productId": {
"description": "product identifier",
"type": "string"
},
"productIdType": {
"description": "the type of product id",
"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}$"
},
"quantity": {
"description": "quantity",
"type": "integer"
},
"releaseEncumbrance": {
"description": "This is intended to not only release encumbrances but to indicate that this is the final invoice line for corresponding order line. This should take into account the fiscal year. We may release encumbrance for this FY but for on-going orders expect to encumber again next year.",
"type": "boolean",
"default": true
},
"subscriptionInfo": {
"description": "The user should use this field to provide info on the subscription (eg. which volumes are being invoiced). It is MANDATORY if the chk_subscription_overlap is FALSE AND there is no start date provided",
"type": "string"
},
"subscriptionStart": {
"description": "Subscription start date",
"type": "string",
"format": "date-time"
},
"subscriptionEnd": {
"description": "Subscription end date",
"type": "string",
"format": "date-time"
},
"subTotal": {
"description": "Invoice line amount before adjustments are applied",
"type": "number"
},
"total": {
"description": "Invoice line total amount which is sum of subTotal and adjustmentsTotal. This amount is always calculated by system.",
"type": "number"
},
"referenceNumbers": {
"description": "Reference number items array",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Reference number item",
"type": "object",
"properties": {
"refNumber": {
"description": "a reference number for this purchase order line",
"type": "string"
},
"refNumberType": {
"description": "the reference number type",
"type": "string",
"enum": [
"Vendor continuation reference number",
"Vendor order reference number",
"Vendor subscription reference number",
"Vendor internal number",
"Vendor title number"
],
"javaEnums": [
"CONTINUATION_REF_NUMBER",
"ORDER_REF_NUMBER",
"SUBSCRIPTION_REF_NUMBER",
"INTERNAL_NUMBER",
"TITLE_NUMBER"
]
},
"vendorDetailsSource": {
"description": "the reference number type",
"type": "string",
"enum": [
"OrderLine",
"InvoiceLine"
],
"javaEnums": [
"ORDER_LINE",
"INVOICE_LINE"
]
}
},
"additionalProperties": false
},
"additionalProperties": false
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.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"
]
},
"tags": {
"type": "object",
"description": "arbitrary tags associated with this invoice line",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "tags.schema",
"title": "tags",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"description",
"invoiceId",
"invoiceLineStatus",
"subTotal",
"quantity",
"releaseEncumbrance"
]
}
Example:
{
"id": "2be1e551-be27-4b03-b770-30e5e8211d19",
"accountingCode": "0206",
"accountNumber": "GOBI-HIST-12",
"adjustments": [
{
"description":"Service Fee",
"exportToAccounting" : false,
"type":"Amount",
"value":4.00,
"prorate":"Not prorated",
"relationToTotal":"In addition to"
},
{
"description":"Sales Tax",
"exportToAccounting" : false,
"type":"Percentage",
"value":8,
"prorate":"Not prorated",
"relationToTotal":"In addition to"
},
{
"adjustmentId": "14263aab-b22b-4ddc-9ecc-3434427c2c8f",
"exportToAccounting" : false,
"description":"Shipping",
"type":"Amount",
"value":2.50,
"prorate":"By line",
"relationToTotal":"In addition to"
}
],
"adjustmentsTotal": 8.50,
"comment": "Sample invoice line",
"description": "Some description",
"fundDistributions": [
{
"code": "USHIST",
"encumbrance": "1c8fc9f4-d2cc-4bd1-aa9a-cb02291cbe65",
"expenseClassId" : "5b5ebe3a-cf8b-4f16-a880-46873ef21388",
"fundId": "1d1574f1-9196-4a57-8d1f-3b2e4309eb81",
"distributionType": "percentage",
"value": 50
},
{
"code": "EUHIST",
"expenseClassId" : "5b5ebe3a-cf8b-4f16-a880-46873ef21388",
"encumbrance": "5f9bfc74-f6ff-4877-be1f-793f8ce90ade",
"fundId": "63157e96-0693-426d-b0df-948bacdfdb08",
"distributionType": "percentage",
"value": 50
}
],
"invoiceId": "c0d08448-347b-418a-8c2f-5fb50248d67e",
"invoiceLineNumber": "1",
"invoiceLineStatus": "Open",
"poLineId": "e8971620-8ee4-4f3b-b5b5-93b864df16ed",
"productId": "9780764354113",
"productIdType": "8261054f-be78-422d-bd51-4ed9f33c3422",
"quantity": 3,
"referenceNumbers": [
{
"refNumber": "refNumExample",
"refNumberType": "Vendor title number",
"vendorDetailsSource": "InvoiceLine"
}
],
"releaseEncumbrance": true,
"subscriptionInfo": "Subscription information",
"subscriptionStart": "2018-08-01T00:00:00.000+0000",
"subscriptionEnd": "2019-01-01T00:00:00.000+0000",
"subTotal": 25.00,
"total": 33.50,
"tags": {
"tagList": [
"tag"
]
},
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
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:
"invoice-line 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: 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
put /invoice/invoice-lines/{id}
Update an invoice line with given {id}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a invoice line
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "invoice line",
"javaName": "InvoiceLine",
"type": "object",
"properties": {
"id": {
"description": "UUID of this invoice line",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"accountingCode": {
"description": "Pulled based on account number.",
"type": "string"
},
"accountNumber": {
"description": "Account number that the vendor assigned",
"type": "string"
},
"adjustments": {
"description": "Defined in settings - the amount field will be editable and pro-rate toggle will be editable if enabled for that adjustment",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Adjustment",
"properties": {
"id": {
"description": "UUID of this adjustment",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"adjustmentId": {
"description": "UUID of the Invoice adjustment incase of prorated adjustments",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"description": {
"description": "Displayed in invoice line as a name for the input",
"type": "string"
},
"exportToAccounting": {
"description": "Whether or not to show this adjustment in batchedVoucherLines",
"type": "boolean",
"default": false
},
"fundDistributions": {
"description": "Fund distribution records from which this adjustment will be paid; only valid at invoice level",
"id": "fundDistributions",
"type": "array",
"items": {
"description": "fund distribution record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"code": {
"description": "The code of the fund associated with this fund distribution",
"type": "string"
},
"encumbrance": {
"description": "UUID of encumbrance record associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"fundId": {
"description": "UUID of the fund associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceLineId": {
"description": "UUID of the invoice line associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"distributionType": {
"description": "Percentage or amount type of the value property",
"type": "string",
"enum": [
"amount",
"percentage"
],
"default": "percentage"
},
"expenseClassId": {
"description": "UUID of the expense class associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"value": {
"description": "The percentage of the cost to be applied to this fund",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"fundId",
"distributionType",
"value"
]
}
},
"prorate": {
"description": "Displayed in invoice line per adjustment in toggled on in settings",
"type": "string",
"enum": [
"By line",
"By amount",
"By quantity",
"Not prorated"
],
"default": "Not prorated"
},
"relationToTotal": {
"description": "Relationship of this adjustment to the total;In addition to: added to subtotal;Included in: reported as subtotal portion;Separate from:calculated from subtotal",
"type": "string",
"enum": [
"In addition to",
"Included in",
"Separate from"
],
"default": "In addition to"
},
"type": {
"description": "Adjustment type",
"type": "string",
"enum": [
"Percentage",
"Amount"
]
},
"value": {
"description": "Adjustment value",
"type": "number"
},
"totalAmount": {
"description": "Total adjustment amount",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"description",
"exportToAccounting",
"prorate",
"relationToTotal",
"type",
"value"
]
}
},
"adjustmentsTotal": {
"description": "Sum of all invoice line adjustments. This amount is always calculated by system.",
"type": "number"
},
"comment": {
"description": "Free form commentary",
"type": "string"
},
"description": {
"description": "Title as captured in the Purchase Order Line. In the absence of a POL link this could be used to describe the POL",
"type": "string"
},
"fundDistributions": {
"description": "List of fund distributions",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Invoice/voucher line fund distribution",
"properties": {
"code": {
"description": "The code of the fund associated with this fund distribution",
"type": "string"
},
"encumbrance": {
"description": "UUID of encumbrance record associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"fundId": {
"description": "UUID of the fund associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceLineId": {
"description": "UUID of the invoice line associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"distributionType": {
"description": "Percentage or amount type of the value property",
"type": "string",
"enum": [
"amount",
"percentage"
],
"default": "percentage"
},
"expenseClassId": {
"description": "UUID of the expense class associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"value": {
"description": "The percentage of the cost to be applied to this fund",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"fundId",
"distributionType",
"value"
]
}
},
"invoiceId": {
"description": "UUID of this parent invoice",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceLineNumber": {
"description": "Sequentially generated and not editable by the user.",
"type": "string"
},
"invoiceLineStatus": {
"description": "Invoice line status",
"type": "string",
"enum": [
"Open",
"Reviewed",
"Approved",
"Paid",
"Cancelled",
"Error"
]
},
"poLineId": {
"description": "UUID of the corresponding purchase order line this invoice line is based on",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"productId": {
"description": "product identifier",
"type": "string"
},
"productIdType": {
"description": "the type of product id",
"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}$"
},
"quantity": {
"description": "quantity",
"type": "integer"
},
"releaseEncumbrance": {
"description": "This is intended to not only release encumbrances but to indicate that this is the final invoice line for corresponding order line. This should take into account the fiscal year. We may release encumbrance for this FY but for on-going orders expect to encumber again next year.",
"type": "boolean",
"default": true
},
"subscriptionInfo": {
"description": "The user should use this field to provide info on the subscription (eg. which volumes are being invoiced). It is MANDATORY if the chk_subscription_overlap is FALSE AND there is no start date provided",
"type": "string"
},
"subscriptionStart": {
"description": "Subscription start date",
"type": "string",
"format": "date-time"
},
"subscriptionEnd": {
"description": "Subscription end date",
"type": "string",
"format": "date-time"
},
"subTotal": {
"description": "Invoice line amount before adjustments are applied",
"type": "number"
},
"total": {
"description": "Invoice line total amount which is sum of subTotal and adjustmentsTotal. This amount is always calculated by system.",
"type": "number"
},
"referenceNumbers": {
"description": "Reference number items array",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Reference number item",
"type": "object",
"properties": {
"refNumber": {
"description": "a reference number for this purchase order line",
"type": "string"
},
"refNumberType": {
"description": "the reference number type",
"type": "string",
"enum": [
"Vendor continuation reference number",
"Vendor order reference number",
"Vendor subscription reference number",
"Vendor internal number",
"Vendor title number"
],
"javaEnums": [
"CONTINUATION_REF_NUMBER",
"ORDER_REF_NUMBER",
"SUBSCRIPTION_REF_NUMBER",
"INTERNAL_NUMBER",
"TITLE_NUMBER"
]
},
"vendorDetailsSource": {
"description": "the reference number type",
"type": "string",
"enum": [
"OrderLine",
"InvoiceLine"
],
"javaEnums": [
"ORDER_LINE",
"INVOICE_LINE"
]
}
},
"additionalProperties": false
},
"additionalProperties": false
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.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"
]
},
"tags": {
"type": "object",
"description": "arbitrary tags associated with this invoice line",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "tags.schema",
"title": "tags",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"description",
"invoiceId",
"invoiceLineStatus",
"subTotal",
"quantity",
"releaseEncumbrance"
]
}
Example:
{
"id": "2be1e551-be27-4b03-b770-30e5e8211d19",
"accountingCode": "0206",
"accountNumber": "GOBI-HIST-12",
"adjustments": [
{
"description":"Service Fee",
"exportToAccounting" : false,
"type":"Amount",
"value":4.00,
"prorate":"Not prorated",
"relationToTotal":"In addition to"
},
{
"description":"Sales Tax",
"exportToAccounting" : false,
"type":"Percentage",
"value":8,
"prorate":"Not prorated",
"relationToTotal":"In addition to"
},
{
"adjustmentId": "14263aab-b22b-4ddc-9ecc-3434427c2c8f",
"exportToAccounting" : false,
"description":"Shipping",
"type":"Amount",
"value":2.50,
"prorate":"By line",
"relationToTotal":"In addition to"
}
],
"adjustmentsTotal": 8.50,
"comment": "Sample invoice line",
"description": "Some description",
"fundDistributions": [
{
"code": "USHIST",
"encumbrance": "1c8fc9f4-d2cc-4bd1-aa9a-cb02291cbe65",
"expenseClassId" : "5b5ebe3a-cf8b-4f16-a880-46873ef21388",
"fundId": "1d1574f1-9196-4a57-8d1f-3b2e4309eb81",
"distributionType": "percentage",
"value": 50
},
{
"code": "EUHIST",
"expenseClassId" : "5b5ebe3a-cf8b-4f16-a880-46873ef21388",
"encumbrance": "5f9bfc74-f6ff-4877-be1f-793f8ce90ade",
"fundId": "63157e96-0693-426d-b0df-948bacdfdb08",
"distributionType": "percentage",
"value": 50
}
],
"invoiceId": "c0d08448-347b-418a-8c2f-5fb50248d67e",
"invoiceLineNumber": "1",
"invoiceLineStatus": "Open",
"poLineId": "e8971620-8ee4-4f3b-b5b5-93b864df16ed",
"productId": "9780764354113",
"productIdType": "8261054f-be78-422d-bd51-4ed9f33c3422",
"quantity": 3,
"referenceNumbers": [
{
"refNumber": "refNumExample",
"refNumberType": "Vendor title number",
"vendorDetailsSource": "InvoiceLine"
}
],
"releaseEncumbrance": true,
"subscriptionInfo": "Subscription information",
"subscriptionStart": "2018-08-01T00:00:00.000+0000",
"subscriptionEnd": "2019-01-01T00:00:00.000+0000",
"subTotal": 25.00,
"total": 33.50,
"tags": {
"tagList": [
"tag"
]
},
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-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: 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-line -- malformed JSON at 13:4"
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:
"invoice-line not found"
HTTP status code 409
Optimistic locking version conflict
Body
Media type: text/plain
Type: any
Example:
version conflict
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 administrator
delete /invoice/invoice-lines/{id}
Delete an invoice line with given {id}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a invoice line
HTTP status code 204
Item deleted successfully
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 delete invoice-line -- constraint violation"
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:
"invoice-line 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: 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
Validate is total amount equals to sum of all fund distributions
put /invoice/invoice-lines/fund-distributions/validate
Validate is total amount equals to sum of all fund distributions
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Fund distribution amount validation",
"type": "object",
"properties": {
"subTotal": {
"description": "Invoice line amount before adjustments are applied",
"type": "number"
},
"currency": {
"description": "An ISO currency code",
"type": "string"
},
"fundDistribution": {
"description": "fund distribution records for this purchase order line",
"id": "fundDistribution",
"type": "array",
"items": {
"description": "a fund distribution record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"code": {
"description": "The code of the fund associated with this fund distribution",
"type": "string"
},
"encumbrance": {
"description": "UUID of encumbrance record associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"fundId": {
"description": "UUID of the fund associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceLineId": {
"description": "UUID of the invoice line associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"distributionType": {
"description": "Percentage or amount type of the value property",
"type": "string",
"enum": [
"amount",
"percentage"
],
"default": "percentage"
},
"expenseClassId": {
"description": "UUID of the expense class associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"value": {
"description": "The percentage of the cost to be applied to this fund",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"fundId",
"distributionType",
"value"
]
}
},
"adjustments": {
"description": "Defined in settings - the amount field will be editable and pro-rate toggle will be editable if enabled for that adjustment",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Adjustment",
"properties": {
"id": {
"description": "UUID of this adjustment",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"adjustmentId": {
"description": "UUID of the Invoice adjustment incase of prorated adjustments",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"description": {
"description": "Displayed in invoice line as a name for the input",
"type": "string"
},
"exportToAccounting": {
"description": "Whether or not to show this adjustment in batchedVoucherLines",
"type": "boolean",
"default": false
},
"fundDistributions": {
"description": "Fund distribution records from which this adjustment will be paid; only valid at invoice level",
"id": "fundDistributions",
"type": "array",
"items": {
"description": "fund distribution record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"code": {
"description": "The code of the fund associated with this fund distribution",
"type": "string"
},
"encumbrance": {
"description": "UUID of encumbrance record associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"fundId": {
"description": "UUID of the fund associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceLineId": {
"description": "UUID of the invoice line associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"distributionType": {
"description": "Percentage or amount type of the value property",
"type": "string",
"enum": [
"amount",
"percentage"
],
"default": "percentage"
},
"expenseClassId": {
"description": "UUID of the expense class associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"value": {
"description": "The percentage of the cost to be applied to this fund",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"fundId",
"distributionType",
"value"
]
}
},
"prorate": {
"description": "Displayed in invoice line per adjustment in toggled on in settings",
"type": "string",
"enum": [
"By line",
"By amount",
"By quantity",
"Not prorated"
],
"default": "Not prorated"
},
"relationToTotal": {
"description": "Relationship of this adjustment to the total;In addition to: added to subtotal;Included in: reported as subtotal portion;Separate from:calculated from subtotal",
"type": "string",
"enum": [
"In addition to",
"Included in",
"Separate from"
],
"default": "In addition to"
},
"type": {
"description": "Adjustment type",
"type": "string",
"enum": [
"Percentage",
"Amount"
]
},
"value": {
"description": "Adjustment value",
"type": "number"
},
"totalAmount": {
"description": "Total adjustment amount",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"description",
"exportToAccounting",
"prorate",
"relationToTotal",
"type",
"value"
]
}
}
},
"additionalProperties": false,
"required": [
"subTotal",
"currency",
"fundDistribution"
]
}
Example:
{
"subTotal": 100,
"currency": "USD",
"fundDistribution": [
{
"code": "HIST",
"fundId": "63157e96-0693-426d-b0df-948bacdfdb08",
"distributionType": "percentage",
"value": 50.00
},
{
"code": "EUROHIST",
"fundId": "e9285a1c-1dfc-4380-868c-e74073003f43",
"distributionType": "amount",
"value": 50.00
}
]
}
Manage Invoice Number
Get system generated Invoice Number
get /invoice/invoice-number
Get system generated Invoice Number
HTTP status code 200
Returns a list of invoice-number items
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "collection of invoices",
"type": "object",
"properties": {
"invoices": {
"description": "an array of invoice records",
"id": "invoices",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "invoice",
"javaName": "Invoice",
"properties": {
"id": {
"description": "UUID of this invoice",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"accountingCode": {
"description": "Number that represents the vendor is an external accounting system which may include details like \"Address code\" in it. This is the number as stated on the invoice",
"type": "string"
},
"adjustments": {
"description": "List of invoice level adjustments. The adjustments can be pro-rated which are defined at the invoice level, but are applied to the invoice lines. A generic example is a shipping fee which should be spread out across all of the invoice lines so that all funds involved pay some portion of the fee.",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Adjustment",
"properties": {
"id": {
"description": "UUID of this adjustment",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"adjustmentId": {
"description": "UUID of the Invoice adjustment incase of prorated adjustments",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"description": {
"description": "Displayed in invoice line as a name for the input",
"type": "string"
},
"exportToAccounting": {
"description": "Whether or not to show this adjustment in batchedVoucherLines",
"type": "boolean",
"default": false
},
"fundDistributions": {
"description": "Fund distribution records from which this adjustment will be paid; only valid at invoice level",
"id": "fundDistributions",
"type": "array",
"items": {
"description": "fund distribution record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"code": {
"description": "The code of the fund associated with this fund distribution",
"type": "string"
},
"encumbrance": {
"description": "UUID of encumbrance record associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"fundId": {
"description": "UUID of the fund associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceLineId": {
"description": "UUID of the invoice line associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"distributionType": {
"description": "Percentage or amount type of the value property",
"type": "string",
"enum": [
"amount",
"percentage"
],
"default": "percentage"
},
"expenseClassId": {
"description": "UUID of the expense class associated with this fund distribution",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"value": {
"description": "The percentage of the cost to be applied to this fund",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"fundId",
"distributionType",
"value"
]
}
},
"prorate": {
"description": "Displayed in invoice line per adjustment in toggled on in settings",
"type": "string",
"enum": [
"By line",
"By amount",
"By quantity",
"Not prorated"
],
"default": "Not prorated"
},
"relationToTotal": {
"description": "Relationship of this adjustment to the total;In addition to: added to subtotal;Included in: reported as subtotal portion;Separate from:calculated from subtotal",
"type": "string",
"enum": [
"In addition to",
"Included in",
"Separate from"
],
"default": "In addition to"
},
"type": {
"description": "Adjustment type",
"type": "string",
"enum": [
"Percentage",
"Amount"
]
},
"value": {
"description": "Adjustment value",
"type": "number"
},
"totalAmount": {
"description": "Total adjustment amount",
"type": "number"
}
},
"additionalProperties": false,
"required": [
"description",
"exportToAccounting",
"prorate",
"relationToTotal",
"type",
"value"
]
}
},
"adjustmentsTotal": {
"description": "Total amount which is sum of all invoice line adjustments and all non-prorated invoice level adjustments. This amount is always calculated by system.",
"type": "number"
},
"approvedBy": {
"description": "UUID of user that approved this invoice",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"approvalDate": {
"description": "Date the invoice was approved for processing",
"type": "string",
"format": "date-time"
},
"batchGroupId": {
"description": "UUID of the batch group to use when generating batch vouchers",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"default": "2a2cb998-1437-41d1-88ad-01930aaeadd5"
},
"billTo": {
"description": "UUID of the billing address",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"chkSubscriptionOverlap": {
"description": "IF TRUE the system will check if there is another invoice for this subscription and whether the dates overlap. IF the dates overlap, the system should issue an alert.",
"type": "boolean"
},
"cancellationNote": {
"description": "The reason of the invoice cancellation.",
"type": "string"
},
"currency": {
"description": "Ideally this is the ISO code and not something the user defines",
"type": "string"
},
"enclosureNeeded": {
"description": "Indicates that an enclosure is needed",
"type": "boolean",
"default": false
},
"exchangeRate": {
"description": "Exchange rate",
"type": "number"
},
"operationMode": {
"description": "Operation mode performed on the exchange rate",
"type": "string"
},
"exportToAccounting": {
"description": "This would keep the invoice from being feed into the batch process (i.e. not generate an external voucher/payment) but would still move values in the system. This might be defined by the vendor relationship and exposed for override on the invoice.",
"type": "boolean",
"default": false
},
"folioInvoiceNo": {
"description": "Invoice number in folio system",
"type": "string"
},
"invoiceDate": {
"description": "Invoice date",
"type": "string",
"format": "date-time"
},
"lockTotal": {
"description": "Total amount which manually set by user. The calculated total must match this before the invoice can be approved",
"type": "number"
},
"note": {
"description": "Invoice note",
"type": "string"
},
"paymentDue": {
"description": "When this is required to be paid. Generally governed by the relationship with the Vendor",
"type": "string",
"format": "date-time"
},
"paymentDate": {
"description": "When the invoice was actually paid",
"type": "string",
"format": "date-time"
},
"paymentTerms": {
"description": "Invoice payment terms",
"type": "string"
},
"paymentMethod": {
"description": "Inherited from vendor record",
"type": "string"
},
"status": {
"description": "Open: Record has been created, Reviewed: details have been verified, Approved: Funds are release, Paid: confirmation that funds have been exchanged and check number has been returned amounts are frozen, cancelled.\nNote: invoices are never partially paid.",
"type": "string",
"enum": [
"Open",
"Reviewed",
"Approved",
"Paid",
"Cancelled"
]
},
"source": {
"description": "This does not denote a user ID but describes how the record was created. Eg. User, API, EDI",
"type": "string",
"enum": [
"User",
"API",
"EDI"
]
},
"subTotal": {
"description": "Invoice amount before adjustments are applied. This is sum of all subTotal amounts of the corresponding invoice lines. This amount is always calculated by system.",
"type": "number",
"readonly": true
},
"total": {
"description": "The total amount is calculated \"on the fly\" of this invoice which is sum of subTotal and adjustmentsTotal. Must be the same with existed \"lockTotal\", when approve invoice.",
"type": "number",
"readonly": true
},
"vendorInvoiceNo": {
"description": "This is the number from the vendor's invoice, which is different from the folioInvoiceNo",
"type": "string"
},
"disbursementNumber": {
"description": "The identifier for the physical transaction corresponding to a payment (Eg. Check #, EFT # etc.) Brought in from external source",
"type": "string"
},
"voucherNumber": {
"description": "Number generated by folio that will eventually identify the payment request sent out to external financial system.",
"type": "string"
},
"paymentId": {
"description": "Id of payment",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"disbursementDate": {
"description": "Date payment was made from financial system (eg. corresponding check date)",
"type": "string",
"format": "date-time"
},
"poNumbers": {
"description": "May or may not be provided; references the PO associated to the invoice",
"id": "poNumbers",
"type": "array",
"items": {
"description": "A human readable ID assigned to this purchase order",
"type": "string",
"pattern": "^[a-zA-Z0-9]{1,22}$"
}
},
"vendorId": {
"description": "UUID of vendor",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{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 fiscal year",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"accountNo": {
"description": "The unique number of the organization account",
"type": "string"
},
"manualPayment": {
"description": "This would keep the invoice from being feed into the batch process (Not generate a external voucher/payment) but would still move values in the system. Note: this is ideally defined by the vendor relationship and exposed for override on the invoice.",
"type": "boolean"
},
"acqUnitIds": {
"description": "acquisition unit ids associated with this invoice",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "The UUID format string",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
}
},
"nextInvoiceLineNumber": {
"description": "Number that will be used next time an invoice line is created",
"type": "integer",
"readonly": true
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.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"
]
},
"tags": {
"type": "object",
"description": "arbitrary tags associated with this invoice",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "tags.schema",
"title": "tags",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"batchGroupId",
"currency",
"invoiceDate",
"paymentMethod",
"status",
"source",
"vendorInvoiceNo",
"vendorId"
]
}
},
"totalRecords": {
"description": "total number of records in the array",
"type": "integer"
}
},
"required": [
"invoices",
"totalRecords"
]
}
Example:
{
"invoices": [
{
"id": "c0d08448-347b-418a-8c2f-5fb50248d67e",
"accountingCode": "0206",
"adjustments": [
{
"id": "14263aab-b22b-4ddc-9ecc-3434427c2c8f",
"description": "Shipping",
"exportToAccounting": false,
"type": "Amount",
"value": 4.50,
"prorate": "By line",
"relationToTotal": "In addition to"
}
],
"adjustmentsTotal": 4.50,
"approvedBy": "ab18897b-0e40-4f31-896b-9c9adc979a88",
"approvalDate": "2018-07-29T00:00:00.000+0000",
"batchGroupId": "2a2cb998-1437-41d1-88ad-01930aaeadd5",
"billTo": "1df71bab-818c-46ea-988b-a23676d91ae6",
"chkSubscriptionOverlap": false,
"currency": "USD",
"enclosureNeeded" : false,
"exchangeRate" : 1.092,
"folioInvoiceNo": "123invoicenumber45",
"invoiceDate": "2018-07-20T00:00:00.000+0000",
"lockTotal": 49.85,
"note": "Some note",
"paymentDue": "2018-08-29T00:00:00.000+0000",
"paymentTerms": "Payment in Advance",
"paymentMethod": "EFT",
"status": "Approved",
"source": "User",
"vendorInvoiceNo": "YK75851",
"disbursementNumber": "58",
"voucherNumber": "478",
"paymentId": "a5065f0d-fb88-4d23-b0c1-57e754fba40e",
"disbursementDate": "2018-08-19T00:00:00.000+0000",
"poNumbers": [
"AB268758XYZ"
],
"vendorId": "168f8a63-d612-406e-813f-c7527f241ac3",
"fiscalYearId": "ac2164c7-ba3d-1bc2-a12c-e35ceccbfaf2",
"manualPayment": true,
"tags": {
"tagList": [
"tag"
]
},
"acqUnitIds": [
"1895e539-8dac-441e-b1f5-aab62b3fde60",
"47f504bd-0c1b-498e-a2ae-e2f0a0cea273"
],
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
],
"totalRecords": 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 list invoice-number -- malformed parameter 'query', syntax error at column 6
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 administrator