http://github.com/folio-org/mod-invoice-storage
CRUD APIs used to manage acquisitions unit assignments.
Collection of acquisitions-unit-assignment items.
Create new acquisitions unit assignment
POST /invoice-storage/acquisitions-unit-assignmentsRequested language. Optional. [lang=en]
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Relationship between a record (purchase order, invoice, etc...) and acquisition unit",
"type": "object",
"properties": {
"id": {
"description": "UUID of this acquisitions unit assignment 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}$"
},
"recordId": {
"description": "UUID of the PO to associate with this acquisitions unit",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"acquisitionsUnitId": {
"description": "UUID of acquisitions unit associated with this PO ",
"type": "string",
"pattern": "^[0-9a-fA-F]{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",
"$ref": "../../../raml-util/schemas/metadata.schema",
"readonly": true
}
},
"additionalProperties": false,
"required": [
"recordId",
"acquisitionsUnitId"
]
}
Example:
{
"recordId": "57b575a1-c6bc-4b6e-b91a-06bc0034b768",
"acquisitionsUnitId": "c2d6608f-6d1f-45f7-8817-5d32c2416116"
}
Returns a newly created item, with server-controlled fields like 'id' populated
URI to the created acquisitions-unit-assignment item
Media type: application/json
Type: any
Example:
{
"recordId": "57b575a1-c6bc-4b6e-b91a-06bc0034b768",
"acquisitionsUnitId": "c2d6608f-6d1f-45f7-8817-5d32c2416116"
}
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 acquisitions-unit-assignment -- malformed JSON at 13:3"
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to create acquisitions-unit-assignments -- unauthorizedValidation 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",
"$ref": "error.schema"
}
},
"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: text/plain
Type: any
Example:
Internal server error, contact administratorGet list of acquisitions unit assignments
GET /invoice-storage/acquisitions-unit-assignmentsA 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 recordId
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
["recordId", "68a8d546-33e0-4613-8a47-a72fca7f576b"]
Skip over a number of elements by specifying an offset value for the query
Example:
0Limit the number of elements returned in the response
Example:
10Requested language. Optional. [lang=en]
Returns a list of acquisitions-unit-assignment items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "collection of acquisitions unit assignment records",
"type": "object",
"properties": {
"acquisitionsUnitAssignments": {
"description": "collection of acquisitions unit assignment records",
"type": "array",
"id": "acquisitionsUnitAssignments",
"items": {
"type": "object",
"$ref": "acquisitions_unit_assignment.json"
}
},
"totalRecords": {
"description": "The number of objects contained in this collection",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"acquisitionsUnitAssignments",
"totalRecords"
]
}
Example:
{
"acquisitionsUnitAssignments": [
{
"id": "8ad580ee-d3f1-4271-bff4-c7c80ccb22e5",
"recordId": "57b575a1-c6bc-4b6e-b91a-06bc0034b768",
"acquisitionsUnitId": "c2d6608f-6d1f-45f7-8817-5d32c2416116",
"metadata": {
"createdDate": "2018-08-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: text/plain
Type: any
Example:
unable to list acquisitions-unit-assignments -- malformed parameter 'query', syntax error at column 6Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to list acquisitions-unit-assignments -- unauthorizedInternal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administratorUpdate acquisitions unit assignment
PUT /invoice-storage/acquisitions-unit-assignments/{id}The UUID of a acquisitions unit assignment
Requested language. Optional. [lang=en]
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Relationship between a record (purchase order, invoice, etc...) and acquisition unit",
"type": "object",
"properties": {
"id": {
"description": "UUID of this acquisitions unit assignment 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}$"
},
"recordId": {
"description": "UUID of the PO to associate with this acquisitions unit",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"acquisitionsUnitId": {
"description": "UUID of acquisitions unit associated with this PO ",
"type": "string",
"pattern": "^[0-9a-fA-F]{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",
"$ref": "../../../raml-util/schemas/metadata.schema",
"readonly": true
}
},
"additionalProperties": false,
"required": [
"recordId",
"acquisitionsUnitId"
]
}
Example:
{
"id": "8ad580ee-d3f1-4271-bff4-c7c80ccb22e5",
"recordId": "57b575a1-c6bc-4b6e-b91a-06bc0034b768",
"acquisitionsUnitId": "c2d6608f-6d1f-45f7-8817-5d32c2416116",
"metadata": {
"createdDate": "2018-08-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: text/plain
Type: any
Example:
"unable to update acquisitions-unit-assignment -- malformed JSON at 13:4"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"acquisitions-unit-assignment 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",
"$ref": "error.schema"
}
},
"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: text/plain
Type: any
Example:
internal server error, contact administratorRetrieve acquisitions-unit-assignment item with given {acquisitions-unit-assignmentId}
GET /invoice-storage/acquisitions-unit-assignments/{id}The UUID of a acquisitions unit assignment
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": "Relationship between a record (purchase order, invoice, etc...) and acquisition unit",
"type": "object",
"properties": {
"id": {
"description": "UUID of this acquisitions unit assignment 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}$"
},
"recordId": {
"description": "UUID of the PO to associate with this acquisitions unit",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"acquisitionsUnitId": {
"description": "UUID of acquisitions unit associated with this PO ",
"type": "string",
"pattern": "^[0-9a-fA-F]{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",
"$ref": "../../../raml-util/schemas/metadata.schema",
"readonly": true
}
},
"additionalProperties": false,
"required": [
"recordId",
"acquisitionsUnitId"
]
}
Example:
{
"id": "8ad580ee-d3f1-4271-bff4-c7c80ccb22e5",
"recordId": "57b575a1-c6bc-4b6e-b91a-06bc0034b768",
"acquisitionsUnitId": "c2d6608f-6d1f-45f7-8817-5d32c2416116",
"metadata": {
"createdDate": "2018-08-19T00:00:00.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"acquisitions-unit-assignment not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administratorDelete acquisitions-unit-assignment item with given {acquisitions-unit-assignmentId}
DELETE /invoice-storage/acquisitions-unit-assignments/{id}The UUID of a acquisitions unit assignment
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: text/plain
Type: any
Example:
"unable to delete acquisitions-unit-assignment -- constraint violation"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"acquisitions-unit-assignment not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator