http://github.com/folio-org/mod-orders-storage
CRUD APIs used to manage relationship between order and invoice.
Collection of order-invoice-reln items.
Get list of relationships
GET /orders-storage/order-invoice-relns
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 purchaseOrderId
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
["purchaseOrderId", "55b97a4a-6601-4488-84e1-8b0d47a3f523"]
How to calculate the totalRecords property. "exact" for the correct number, "estimated" for an estimation, "auto" to automatically select "exact" or "estimated", "none" for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
none
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
Returns a list of order-invoice-reln items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of relationship between invoice and order",
"type": "object",
"properties": {
"orderInvoiceRelationships": {
"description": "Collection of relationship",
"type": "array",
"id": "order_invoice_relationship",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Relationship between order and invoice",
"properties": {
"id": {
"description": "UUID of this relationship record",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"purchaseOrderId": {
"description": "Purchase order id",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceId": {
"description": "Invoice id",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
}
},
"additionalProperties": false,
"required": [
"purchaseOrderId",
"invoiceId"
]
}
},
"totalRecords": {
"description": "The number of objects contained in this collection",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"orderInvoiceRelationships",
"totalRecords"
]
}
Example:
{
"orderInvoiceRelationships":
[
{
"id": "2A1030d4-C4EC-5A66-8EfC-3fc8e608e2De",
"purchaseOrderId": "0610be6d-0ddd-494b-b867-19f63d8b5d6d",
"invoiceId": "c0d08448-347b-418a-8c2f-5fb50248d67e"
},
{
"id": "DbDD493a-345c-4D0C-aFb5-6CdDB6a3FEE9",
"purchaseOrderId": "589a6016-3463-49f6-8aa2-dc315d0665fd",
"invoiceId": "9917d4a6-fbb2-4ed6-946d-6cf8c42369e4"
},
{
"id": "bA0A09Be-cAeB-2Fbd-a5fb-6bf962BCcBbF",
"purchaseOrderId": "9447d062-89ec-486e-a14b-572f3efb9f8c",
"invoiceId": "e6ac6e5b-2dde-4904-bc2d-def3a0b17052"
}
],
"totalRecords": 3
}
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: text/plain
Type: any
Example:
unable to list order-invoice-relns -- malformed parameter 'query', syntax error at column 6
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to list order-invoice-relns -- unauthorized
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Create a new order-invoice-reln item.
POST /orders-storage/order-invoice-relns
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Relationship between order and invoice",
"type": "object",
"properties": {
"id": {
"description": "UUID of this relationship record",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"purchaseOrderId": {
"description": "Purchase order id",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceId": {
"description": "Invoice id",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
}
},
"additionalProperties": false,
"required": [
"purchaseOrderId",
"invoiceId"
]
}
Example:
{
"purchaseOrderId": "0610be6d-0ddd-494b-b867-19f63d8b5d6d",
"invoiceId": "c0d08448-347b-418a-8c2f-5fb50248d67e"
}
Returns a newly created item, with server-controlled fields like 'id' populated
URI to the created order-invoice-reln item
Media type: application/json
Type: any
Example:
{
"purchaseOrderId": "0610be6d-0ddd-494b-b867-19f63d8b5d6d",
"invoiceId": "c0d08448-347b-418a-8c2f-5fb50248d67e"
}
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: text/plain
Type: any
Example:
"unable to add order-invoice-reln -- malformed JSON at 13:3"
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to create order-invoice-relns -- unauthorized
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Retrieve order-invoice-reln item with given {order-invoice-relnId}
GET /orders-storage/order-invoice-relns/{id}
The UUID of a relationship between order and invoice
Returns item with a given ID
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Relationship between order and invoice",
"type": "object",
"properties": {
"id": {
"description": "UUID of this relationship record",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"purchaseOrderId": {
"description": "Purchase order id",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceId": {
"description": "Invoice id",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
}
},
"additionalProperties": false,
"required": [
"purchaseOrderId",
"invoiceId"
]
}
Example:
{
"purchaseOrderId": "0610be6d-0ddd-494b-b867-19f63d8b5d6d",
"invoiceId": "c0d08448-347b-418a-8c2f-5fb50248d67e"
}
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"order-invoice-reln not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Delete order-invoice-reln item with given {order-invoice-relnId}
DELETE /orders-storage/order-invoice-relns/{id}
The UUID of a relationship between order and invoice
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: text/plain
Type: any
Example:
"unable to delete order-invoice-reln -- constraint violation"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"order-invoice-reln not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Update order-invoice-reln item with given {order-invoice-relnId}
PUT /orders-storage/order-invoice-relns/{id}
The UUID of a relationship between order and invoice
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Relationship between order and invoice",
"type": "object",
"properties": {
"id": {
"description": "UUID of this relationship record",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"purchaseOrderId": {
"description": "Purchase order id",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"invoiceId": {
"description": "Invoice id",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
}
},
"additionalProperties": false,
"required": [
"purchaseOrderId",
"invoiceId"
]
}
Example:
{
"purchaseOrderId": "0610be6d-0ddd-494b-b867-19f63d8b5d6d",
"invoiceId": "c0d08448-347b-418a-8c2f-5fb50248d67e"
}
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: text/plain
Type: any
Example:
"unable to update order-invoice-reln -- malformed JSON at 13:4"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"order-invoice-reln not found"
Optimistic locking version conflict
Media type: text/plain
Type: any
Example:
version conflict
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator