http://localhost
This documents the API calls that can be made to 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.
POST /invoice/invoices
Requested language. Optional. [lang=en]
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "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"
}
},
"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"
},
"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"
},
"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}$"
},
"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}$"
}
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
},
"tags": {
"type": "object",
"description": "arbitrary tags associated with this invoice",
"$schema": "http://json-schema.org/draft-04/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,
"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",
"accountNo": "GOBI-HIST-12",
"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"
}
}
Returns a newly created item, with server-controlled fields like 'id' populated
URI to the created invoice item
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,
"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",
"accountNo": "GOBI-HIST-12",
"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"
}
}
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.
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"
Not authorized to perform requested action
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
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
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
Retrieve a list of invoice items.
GET /invoice/invoices
Skip over a number of elements by specifying an offset value for the query
Example:
0
Limit the number of elements returned in the response
Example:
10
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"
Requested language. Optional. [lang=en]
Returns a list of invoice items
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",
"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"
}
},
"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"
},
"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"
},
"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}$"
},
"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}$"
}
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
},
"tags": {
"type": "object",
"description": "arbitrary tags associated with this invoice",
"$schema": "http://json-schema.org/draft-04/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",
"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
}
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.
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
Not authorized to perform requested action
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
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
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
Return an invoice with given {id}
GET /invoice/invoices/{id}
The UUID of an invoice
Requested language. Optional. [lang=en]
Returns item with a given ID
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "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"
}
},
"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"
},
"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"
},
"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}$"
},
"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}$"
}
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
},
"tags": {
"type": "object",
"description": "arbitrary tags associated with this invoice",
"$schema": "http://json-schema.org/draft-04/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,
"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",
"accountNo": "GOBI-HIST-12",
"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"
}
}
Item with a given ID not found
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"
Internal server error, e.g. due to misconfiguration
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Update 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.
PUT /invoice/invoices/{id}
The UUID of an invoice
Requested language. Optional. [lang=en]
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "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"
}
},
"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"
},
"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"
},
"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}$"
},
"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}$"
}
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
},
"tags": {
"type": "object",
"description": "arbitrary tags associated with this invoice",
"$schema": "http://json-schema.org/draft-04/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,
"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",
"accountNo": "GOBI-HIST-12",
"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"
}
}
Item successfully updated
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.
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"
Item with a given ID not found
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"
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
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 an invoice with given {id}
DELETE /invoice/invoices/{id}
The UUID of an invoice
Requested language. Optional. [lang=en]
Item deleted successfully
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.
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"
Item with a given ID not found
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"
Internal server error, e.g. due to misconfiguration
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 list of documents
GET /invoice/invoices/{id}/documents
The UUID of an invoice
Skip over a number of elements by specifying an offset value for the query
Example:
0
Limit the number of elements returned in the response
Example:
10
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'
Requested language. Optional. [lang=en]
Returns a list of document items
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#",
"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"
}
}
]
}
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.
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
Internal server error, e.g. due to misconfiguration
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 document attachment/link;
POST /invoice/invoices/{id}/documents
The UUID of an invoice
Requested language. Optional. [lang=en]
Media type: application/octet-stream
Type: any
Returns a newly created item, with server-controlled fields like 'id' populated
URI to the created Invoice Document item
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": "JVBERi0xLjMNCiXi48/TDQoNCjEgMCBvYmoNCjw8DQovVHlwZSAvQ2F0YWxvZw0KL091dGxpbmVzIDIgMCBSDQovUGFnZXMgMyAwIFINCj4+DQplbmRvYmoNCg0KMiAwIG9iag0KPDwNCi9UeXBlIC9PdXRsaW5lcw0KL0NvdW50IDANCj4+DQplbmRvYmoNCg0KMyAwIG9iag0KPDwNCi9UeXBlIC9QYWdlcw0KL0NvdW50IDINCi9LaWRzIFsgNCAwIFIgNiAwIFIgXSANCj4+DQplbmRvYmoNCg0KNCAwIG9iag0KPDwNCi9UeXBlIC9QYWdlDQovUGFyZW50IDMgMCBSDQovUmVzb3VyY2VzIDw8DQovRm9udCA8PA0KL0YxIDkgMCBSIA0KPj4NCi9Qcm9jU2V0IDggMCBSDQo+Pg0KL01lZGlhQm94IFswIDAgNjEyLjAwMDAgNzkyLjAwMDBdDQovQ29udGVudHMgNSAwIFINCj4+DQplbmRvYmoNCg0KNSAwIG9iag0KPDwgL0xlbmd0aCAxMDc0ID4+DQpzdHJlYW0NCjIgSg0KQlQNCjAgMCAwIHJnDQovRjEgMDAyNyBUZg0KNTcuMzc1MCA3MjIuMjgwMCBUZA0KKCBBIFNpbXBsZSBQREYgRmlsZSApIFRqDQpFVA0KQlQNCi9GMSAwMDEwIFRmDQo2OS4yNTAwIDY4OC42MDgwIFRkDQooIFRoaXMgaXMgYSBzbWFsbCBkZW1vbnN0cmF0aW9uIC5wZGYgZmlsZSAtICkgVGoNCkVUDQpCVA0KL0YxIDAwMTAgVGYNCjY5LjI1MDAgNjY0LjcwNDAgVGQNCigganVzdCBmb3IgdXNlIGluIHRoZSBWaXJ0dWFsIE1lY2hhbmljcyB0dXRvcmlhbHMuIE1vcmUgdGV4dC4gQW5kIG1vcmUgKSBUag0KRVQNCkJUDQovRjEgMDAxMCBUZg0KNjkuMjUwMCA2NTIuNzUyMCBUZA0KKCB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiApIFRqDQpFVA0KQlQNCi9GMSAwMDEwIFRmDQo2OS4yNTAwIDYyOC44NDgwIFRkDQooIEFuZCBtb3JlIHRleHQuIEFuZCBtb3JlIHRleHQuIEFuZCBtb3JlIHRleHQuIEFuZCBtb3JlIHRleHQuIEFuZCBtb3JlICkgVGoNCkVUDQpCVA0KL0YxIDAwMTAgVGYNCjY5LjI1MDAgNjE2Ljg5NjAgVGQNCiggdGV4dC4gQW5kIG1vcmUgdGV4dC4gQm9yaW5nLCB6enp6ei4gQW5kIG1vcmUgdGV4dC4gQW5kIG1vcmUgdGV4dC4gQW5kICkgVGoNCkVUDQpCVA0KL0YxIDAwMTAgVGYNCjY5LjI1MDAgNjA0Ljk0NDAgVGQNCiggbW9yZSB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiApIFRqDQpFVA0KQlQNCi9GMSAwMDEwIFRmDQo2OS4yNTAwIDU5Mi45OTIwIFRkDQooIEFuZCBtb3JlIHRleHQuIEFuZCBtb3JlIHRleHQuICkgVGoNCkVUDQpCVA0KL0YxIDAwMTAgVGYNCjY5LjI1MDAgNTY5LjA4ODAgVGQNCiggQW5kIG1vcmUgdGV4dC4gQW5kIG1vcmUgdGV4dC4gQW5kIG1vcmUgdGV4dC4gQW5kIG1vcmUgdGV4dC4gQW5kIG1vcmUgKSBUag0KRVQNCkJUDQovRjEgMDAxMCBUZg0KNjkuMjUwMCA1NTcuMTM2MCBUZA0KKCB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiBFdmVuIG1vcmUuIENvbnRpbnVlZCBvbiBwYWdlIDIgLi4uKSBUag0KRVQNCmVuZHN0cmVhbQ0KZW5kb2JqDQoNCjYgMCBvYmoNCjw8DQovVHlwZSAvUGFnZQ0KL1BhcmVudCAzIDAgUg0KL1Jlc291cmNlcyA8PA0KL0ZvbnQgPDwNCi9GMSA5IDAgUiANCj4+DQovUHJvY1NldCA4IDAgUg0KPj4NCi9NZWRpYUJveCBbMCAwIDYxMi4wMDAwIDc5Mi4wMDAwXQ0KL0NvbnRlbnRzIDcgMCBSDQo+Pg0KZW5kb2JqDQoNCjcgMCBvYmoNCjw8IC9MZW5ndGggNjc2ID4+DQpzdHJlYW0NCjIgSg0KQlQNCjAgMCAwIHJnDQovRjEgMDAyNyBUZg0KNTcuMzc1MCA3MjIuMjgwMCBUZA0KKCBTaW1wbGUgUERGIEZpbGUgMiApIFRqDQpFVA0KQlQNCi9GMSAwMDEwIFRmDQo2OS4yNTAwIDY4OC42MDgwIFRkDQooIC4uLmNvbnRpbnVlZCBmcm9tIHBhZ2UgMS4gWWV0IG1vcmUgdGV4dC4gQW5kIG1vcmUgdGV4dC4gQW5kIG1vcmUgdGV4dC4gKSBUag0KRVQNCkJUDQovRjEgMDAxMCBUZg0KNjkuMjUwMCA2NzYuNjU2MCBUZA0KKCBBbmQgbW9yZSB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiBBbmQgbW9yZSApIFRqDQpFVA0KQlQNCi9GMSAwMDEwIFRmDQo2OS4yNTAwIDY2NC43MDQwIFRkDQooIHRleHQuIE9oLCBob3cgYm9yaW5nIHR5cGluZyB0aGlzIHN0dWZmLiBCdXQgbm90IGFzIGJvcmluZyBhcyB3YXRjaGluZyApIFRqDQpFVA0KQlQNCi9GMSAwMDEwIFRmDQo2OS4yNTAwIDY1Mi43NTIwIFRkDQooIHBhaW50IGRyeS4gQW5kIG1vcmUgdGV4dC4gQW5kIG1vcmUgdGV4dC4gQW5kIG1vcmUgdGV4dC4gQW5kIG1vcmUgdGV4dC4gKSBUag0KRVQNCkJUDQovRjEgMDAxMCBUZg0KNjkuMjUwMCA2NDAuODAwMCBUZA0KKCBCb3JpbmcuICBNb3JlLCBhIGxpdHRsZSBtb3JlIHRleHQuIFRoZSBlbmQsIGFuZCBqdXN0IGFzIHdlbGwuICkgVGoNCkVUDQplbmRzdHJlYW0NCmVuZG9iag0KDQo4IDAgb2JqDQpbL1BERiAvVGV4dF0NCmVuZG9iag0KDQo5IDAgb2JqDQo8PA0KL1R5cGUgL0ZvbnQNCi9TdWJ0eXBlIC9UeXBlMQ0KL05hbWUgL0YxDQovQmFzZUZvbnQgL0hlbHZldGljYQ0KL0VuY29kaW5nIC9XaW5BbnNpRW5jb2RpbmcNCj4+DQplbmRvYmoNCg0KMTAgMCBvYmoNCjw8DQovQ3JlYXRvciAoUmF2ZSBcKGh0dHA6Ly93d3cubmV2cm9uYS5jb20vcmF2ZVwpKQ0KL1Byb2R1Y2VyIChOZXZyb25hIERlc2lnbnMpDQovQ3JlYXRpb25EYXRlIChEOjIwMDYwMzAxMDcyODI2KQ0KPj4NCmVuZG9iag0KDQp4cmVmDQowIDExDQowMDAwMDAwMDAwIDY1NTM1IGYNCjAwMDAwMDAwMTkgMDAwMDAgbg0KMDAwMDAwMDA5MyAwMDAwMCBuDQowMDAwMDAwMTQ3IDAwMDAwIG4NCjAwMDAwMDAyMjIgMDAwMDAgbg0KMDAwMDAwMDM5MCAwMDAwMCBuDQowMDAwMDAxNTIyIDAwMDAwIG4NCjAwMDAwMDE2OTAgMDAwMDAgbg0KMDAwMDAwMjQyMyAwMDAwMCBuDQowMDAwMDAyNDU2IDAwMDAwIG4NCjAwMDAwMDI1NzQgMDAwMDAgbg0KDQp0cmFpbGVyDQo8PA0KL1NpemUgMTENCi9Sb290IDEgMCBSDQovSW5mbyAxMCAwIFINCj4+DQoNCnN0YXJ0eHJlZg0KMjcxNA0KJSVFT0YNCg=="
},
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
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.
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"
Not authorized to perform requested action
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
Invoice Document too large
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
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
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
Retrieve document item with given {documentId}
GET /invoice/invoices/{id}/documents/{documentId}
The UUID of an invoice
The UUID of a document
Requested language. Optional. [lang=en]
Returns item with a given ID
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#",
"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#",
"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": "JVBERi0xLjMNCiXi48/TDQoNCjEgMCBvYmoNCjw8DQovVHlwZSAvQ2F0YWxvZw0KL091dGxpbmVzIDIgMCBSDQovUGFnZXMgMyAwIFINCj4+DQplbmRvYmoNCg0KMiAwIG9iag0KPDwNCi9UeXBlIC9PdXRsaW5lcw0KL0NvdW50IDANCj4+DQplbmRvYmoNCg0KMyAwIG9iag0KPDwNCi9UeXBlIC9QYWdlcw0KL0NvdW50IDINCi9LaWRzIFsgNCAwIFIgNiAwIFIgXSANCj4+DQplbmRvYmoNCg0KNCAwIG9iag0KPDwNCi9UeXBlIC9QYWdlDQovUGFyZW50IDMgMCBSDQovUmVzb3VyY2VzIDw8DQovRm9udCA8PA0KL0YxIDkgMCBSIA0KPj4NCi9Qcm9jU2V0IDggMCBSDQo+Pg0KL01lZGlhQm94IFswIDAgNjEyLjAwMDAgNzkyLjAwMDBdDQovQ29udGVudHMgNSAwIFINCj4+DQplbmRvYmoNCg0KNSAwIG9iag0KPDwgL0xlbmd0aCAxMDc0ID4+DQpzdHJlYW0NCjIgSg0KQlQNCjAgMCAwIHJnDQovRjEgMDAyNyBUZg0KNTcuMzc1MCA3MjIuMjgwMCBUZA0KKCBBIFNpbXBsZSBQREYgRmlsZSApIFRqDQpFVA0KQlQNCi9GMSAwMDEwIFRmDQo2OS4yNTAwIDY4OC42MDgwIFRkDQooIFRoaXMgaXMgYSBzbWFsbCBkZW1vbnN0cmF0aW9uIC5wZGYgZmlsZSAtICkgVGoNCkVUDQpCVA0KL0YxIDAwMTAgVGYNCjY5LjI1MDAgNjY0LjcwNDAgVGQNCigganVzdCBmb3IgdXNlIGluIHRoZSBWaXJ0dWFsIE1lY2hhbmljcyB0dXRvcmlhbHMuIE1vcmUgdGV4dC4gQW5kIG1vcmUgKSBUag0KRVQNCkJUDQovRjEgMDAxMCBUZg0KNjkuMjUwMCA2NTIuNzUyMCBUZA0KKCB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiApIFRqDQpFVA0KQlQNCi9GMSAwMDEwIFRmDQo2OS4yNTAwIDYyOC44NDgwIFRkDQooIEFuZCBtb3JlIHRleHQuIEFuZCBtb3JlIHRleHQuIEFuZCBtb3JlIHRleHQuIEFuZCBtb3JlIHRleHQuIEFuZCBtb3JlICkgVGoNCkVUDQpCVA0KL0YxIDAwMTAgVGYNCjY5LjI1MDAgNjE2Ljg5NjAgVGQNCiggdGV4dC4gQW5kIG1vcmUgdGV4dC4gQm9yaW5nLCB6enp6ei4gQW5kIG1vcmUgdGV4dC4gQW5kIG1vcmUgdGV4dC4gQW5kICkgVGoNCkVUDQpCVA0KL0YxIDAwMTAgVGYNCjY5LjI1MDAgNjA0Ljk0NDAgVGQNCiggbW9yZSB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiApIFRqDQpFVA0KQlQNCi9GMSAwMDEwIFRmDQo2OS4yNTAwIDU5Mi45OTIwIFRkDQooIEFuZCBtb3JlIHRleHQuIEFuZCBtb3JlIHRleHQuICkgVGoNCkVUDQpCVA0KL0YxIDAwMTAgVGYNCjY5LjI1MDAgNTY5LjA4ODAgVGQNCiggQW5kIG1vcmUgdGV4dC4gQW5kIG1vcmUgdGV4dC4gQW5kIG1vcmUgdGV4dC4gQW5kIG1vcmUgdGV4dC4gQW5kIG1vcmUgKSBUag0KRVQNCkJUDQovRjEgMDAxMCBUZg0KNjkuMjUwMCA1NTcuMTM2MCBUZA0KKCB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiBFdmVuIG1vcmUuIENvbnRpbnVlZCBvbiBwYWdlIDIgLi4uKSBUag0KRVQNCmVuZHN0cmVhbQ0KZW5kb2JqDQoNCjYgMCBvYmoNCjw8DQovVHlwZSAvUGFnZQ0KL1BhcmVudCAzIDAgUg0KL1Jlc291cmNlcyA8PA0KL0ZvbnQgPDwNCi9GMSA5IDAgUiANCj4+DQovUHJvY1NldCA4IDAgUg0KPj4NCi9NZWRpYUJveCBbMCAwIDYxMi4wMDAwIDc5Mi4wMDAwXQ0KL0NvbnRlbnRzIDcgMCBSDQo+Pg0KZW5kb2JqDQoNCjcgMCBvYmoNCjw8IC9MZW5ndGggNjc2ID4+DQpzdHJlYW0NCjIgSg0KQlQNCjAgMCAwIHJnDQovRjEgMDAyNyBUZg0KNTcuMzc1MCA3MjIuMjgwMCBUZA0KKCBTaW1wbGUgUERGIEZpbGUgMiApIFRqDQpFVA0KQlQNCi9GMSAwMDEwIFRmDQo2OS4yNTAwIDY4OC42MDgwIFRkDQooIC4uLmNvbnRpbnVlZCBmcm9tIHBhZ2UgMS4gWWV0IG1vcmUgdGV4dC4gQW5kIG1vcmUgdGV4dC4gQW5kIG1vcmUgdGV4dC4gKSBUag0KRVQNCkJUDQovRjEgMDAxMCBUZg0KNjkuMjUwMCA2NzYuNjU2MCBUZA0KKCBBbmQgbW9yZSB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiBBbmQgbW9yZSB0ZXh0LiBBbmQgbW9yZSApIFRqDQpFVA0KQlQNCi9GMSAwMDEwIFRmDQo2OS4yNTAwIDY2NC43MDQwIFRkDQooIHRleHQuIE9oLCBob3cgYm9yaW5nIHR5cGluZyB0aGlzIHN0dWZmLiBCdXQgbm90IGFzIGJvcmluZyBhcyB3YXRjaGluZyApIFRqDQpFVA0KQlQNCi9GMSAwMDEwIFRmDQo2OS4yNTAwIDY1Mi43NTIwIFRkDQooIHBhaW50IGRyeS4gQW5kIG1vcmUgdGV4dC4gQW5kIG1vcmUgdGV4dC4gQW5kIG1vcmUgdGV4dC4gQW5kIG1vcmUgdGV4dC4gKSBUag0KRVQNCkJUDQovRjEgMDAxMCBUZg0KNjkuMjUwMCA2NDAuODAwMCBUZA0KKCBCb3JpbmcuICBNb3JlLCBhIGxpdHRsZSBtb3JlIHRleHQuIFRoZSBlbmQsIGFuZCBqdXN0IGFzIHdlbGwuICkgVGoNCkVUDQplbmRzdHJlYW0NCmVuZG9iag0KDQo4IDAgb2JqDQpbL1BERiAvVGV4dF0NCmVuZG9iag0KDQo5IDAgb2JqDQo8PA0KL1R5cGUgL0ZvbnQNCi9TdWJ0eXBlIC9UeXBlMQ0KL05hbWUgL0YxDQovQmFzZUZvbnQgL0hlbHZldGljYQ0KL0VuY29kaW5nIC9XaW5BbnNpRW5jb2RpbmcNCj4+DQplbmRvYmoNCg0KMTAgMCBvYmoNCjw8DQovQ3JlYXRvciAoUmF2ZSBcKGh0dHA6Ly93d3cubmV2cm9uYS5jb20vcmF2ZVwpKQ0KL1Byb2R1Y2VyIChOZXZyb25hIERlc2lnbnMpDQovQ3JlYXRpb25EYXRlIChEOjIwMDYwMzAxMDcyODI2KQ0KPj4NCmVuZG9iag0KDQp4cmVmDQowIDExDQowMDAwMDAwMDAwIDY1NTM1IGYNCjAwMDAwMDAwMTkgMDAwMDAgbg0KMDAwMDAwMDA5MyAwMDAwMCBuDQowMDAwMDAwMTQ3IDAwMDAwIG4NCjAwMDAwMDAyMjIgMDAwMDAgbg0KMDAwMDAwMDM5MCAwMDAwMCBuDQowMDAwMDAxNTIyIDAwMDAwIG4NCjAwMDAwMDE2OTAgMDAwMDAgbg0KMDAwMDAwMjQyMyAwMDAwMCBuDQowMDAwMDAyNDU2IDAwMDAwIG4NCjAwMDAwMDI1NzQgMDAwMDAgbg0KDQp0cmFpbGVyDQo8PA0KL1NpemUgMTENCi9Sb290IDEgMCBSDQovSW5mbyAxMCAwIFINCj4+DQoNCnN0YXJ0eHJlZg0KMjcxNA0KJSVFT0YNCg=="
},
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
Bad request
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"
Item with a given ID not found
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"
Internal server error, e.g. due to misconfiguration
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 document item with given {documentId}
DELETE /invoice/invoices/{id}/documents/{documentId}
The UUID of an invoice
The UUID of a document
Requested language. Optional. [lang=en]
Item deleted successfully
Bad request
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"
Item with a given ID not found
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"
Internal server error, e.g. due to misconfiguration
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
Retrieve a list of invoice-line items.
GET /invoice/invoice-lines
Skip over a number of elements by specifying an offset value for the query
Example:
0
Limit the number of elements returned in the response
Example:
10
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"
Requested language. Optional. [lang=en]
Returns a list of invoice-line items
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",
"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"
}
},
"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#",
"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#",
"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": "123invoicenumber45-1",
"invoiceLineStatus": "Open",
"vendorRefNo": "2019-184",
"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
}
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.
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
Not authorized to perform requested action
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
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
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 an invoice lines to corresponding invoice
POST /invoice/invoice-lines
Requested language. Optional. [lang=en]
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "invoice line",
"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"
}
},
"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#",
"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#",
"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": "123invoicenumber45-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,
"vendorRefNo": "1",
"tags": {
"tagList": [
"tag"
]
},
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
Returns a newly created item, with server-controlled fields like 'id' populated
URI to the created invoice-line item
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": "123invoicenumber45-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,
"vendorRefNo": "1",
"tags": {
"tagList": [
"tag"
]
},
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
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.
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"
Not authorized to perform requested action
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
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
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
Return an invoice line with given {id}
GET /invoice/invoice-lines/{id}
The UUID of a invoice line
Requested language. Optional. [lang=en]
Returns item with a given ID
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "invoice line",
"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"
}
},
"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#",
"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#",
"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": "123invoicenumber45-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,
"vendorRefNo": "1",
"tags": {
"tagList": [
"tag"
]
},
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
Item with a given ID not found
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"
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Update an invoice line with given {id}
PUT /invoice/invoice-lines/{id}
The UUID of a invoice line
Requested language. Optional. [lang=en]
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "invoice line",
"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"
}
},
"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#",
"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#",
"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": "123invoicenumber45-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,
"vendorRefNo": "1",
"tags": {
"tagList": [
"tag"
]
},
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
Item successfully updated
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.
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"
Item with a given ID not found
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"
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
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 an invoice line with given {id}
DELETE /invoice/invoice-lines/{id}
The UUID of a invoice line
Requested language. Optional. [lang=en]
Item deleted successfully
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.
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"
Item with a given ID not found
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"
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
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 system generated Invoice Number
GET /invoice/invoice-number
Requested language. Optional. [lang=en]
Returns a list of invoice-number items
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",
"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"
}
},
"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"
},
"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"
},
"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}$"
},
"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}$"
}
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
},
"tags": {
"type": "object",
"description": "arbitrary tags associated with this invoice",
"$schema": "http://json-schema.org/draft-04/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",
"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
}
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.
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
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
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