mod-orders version v1.0
http://github.com/folio-org/mod-orders
Orders configuration
API for managing purchase orders configuration
/orders/configuration
Collection of reasons-for-closure items.
Create new reason for closure
Get list of reasons for closure
post /orders/configuration/reasons-for-closure
Create new reason for closure
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Reason for closure object",
"type": "object",
"javaType": "org.folio.rest.jaxrs.model.ReasonForClosure",
"extends": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number prefix",
"type": "object",
"javaName": "entity",
"properties": {
"id": {
"description": "UUID identifying this entity",
"$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}$"
}
},
"additionalProperties": false
},
"properties": {
"id": {
"description": "UUID of this Reason for closure record",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"reason": {
"description": "Reason for closure",
"type": "string"
},
"source": {
"description": "Source of reason for closure",
"type": "string",
"enum": [
"User",
"System"
],
"default": "User"
}
},
"additionalProperties": false,
"required": [
"reason",
"source"
]
}
Example:
{
"reason": "Lack of funds",
"source": "System"
}
HTTP status code 201
Returns a newly created item, with server-controlled fields like 'id' populated
Headers
- Location: required(string)
URI to the created reasons-for-closure item
Body
Media type: application/json
Type: any
Example:
{
"reason": "Lack of funds",
"source": "System"
}
HTTP status code 400
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Body
Media type: text/plain
Type: any
Example:
"unable to add reasons-for-closure -- malformed JSON at 13:3"
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to create reasons-for-closure -- unauthorized
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
get /orders/configuration/reasons-for-closure
Get list of reasons for closure
Query Parameters
- query: (string)
A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.
with valid searchable fields: for example reasonForClosure
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode ["reasonForClosure", "Denied", "="]
- offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)
Skip over a number of elements by specifying an offset value for the query
Example:
0
- limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)
Limit the number of elements returned in the response
Example:
10
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
HTTP status code 200
Returns a list of reasons-for-closure items
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of reasons for closure",
"type": "object",
"properties": {
"reasonsForClosure": {
"description": "Collection of reasons for closure",
"type": "array",
"id": "reasonsForClosure",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Reason for closure object",
"javaType": "org.folio.rest.jaxrs.model.ReasonForClosure",
"extends": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number prefix",
"type": "object",
"javaName": "entity",
"properties": {
"id": {
"description": "UUID identifying this entity",
"$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}$"
}
},
"additionalProperties": false
},
"properties": {
"id": {
"description": "UUID of this Reason for closure record",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"reason": {
"description": "Reason for closure",
"type": "string"
},
"source": {
"description": "Source of reason for closure",
"type": "string",
"enum": [
"User",
"System"
],
"default": "User"
}
},
"additionalProperties": false,
"required": [
"reason",
"source"
]
}
},
"totalRecords": {
"description": "The number of objects contained in this collection",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"reasonsForClosure",
"totalRecords"
]
}
Example:
{
"reasonsForClosure":
[
{
"id": "41153a11-6bb8-4217-93b8-0c83c8b019f5",
"reason": "Lack of funds",
"source": "System"
}
],
"totalRecords": 1
}
HTTP status code 400
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Body
Media type: text/plain
Type: any
Example:
unable to list reasons-for-closure -- malformed parameter 'query', syntax error at column 6
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to list reasons-for-closure -- unauthorized
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Entity representing a reasons-for-closure
Update reason for closure
Retrieve reasons-for-closure item with given {reasons-for-closureId}
Delete reasons-for-closure item with given {reasons-for-closureId}
put /orders/configuration/reasons-for-closure/{id}
Update reason for closure
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a reason for closure
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Reason for closure object",
"type": "object",
"javaType": "org.folio.rest.jaxrs.model.ReasonForClosure",
"extends": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number prefix",
"type": "object",
"javaName": "entity",
"properties": {
"id": {
"description": "UUID identifying this entity",
"$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}$"
}
},
"additionalProperties": false
},
"properties": {
"id": {
"description": "UUID of this Reason for closure record",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"reason": {
"description": "Reason for closure",
"type": "string"
},
"source": {
"description": "Source of reason for closure",
"type": "string",
"enum": [
"User",
"System"
],
"default": "User"
}
},
"additionalProperties": false,
"required": [
"reason",
"source"
]
}
Example:
{
"id": "41153a11-6bb8-4217-93b8-0c83c8b019f5",
"reason": "Lack of funds",
"source": "System"
}
HTTP status code 204
Item successfully updated
HTTP status code 400
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Body
Media type: text/plain
Type: any
Example:
"unable to update reasons-for-closure -- malformed JSON at 13:4"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"reasons-for-closure not found"
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
get /orders/configuration/reasons-for-closure/{id}
Retrieve reasons-for-closure item with given {reasons-for-closureId}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a reason for closure
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
HTTP status code 200
Returns item with a given ID
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Reason for closure object",
"type": "object",
"javaType": "org.folio.rest.jaxrs.model.ReasonForClosure",
"extends": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number prefix",
"type": "object",
"javaName": "entity",
"properties": {
"id": {
"description": "UUID identifying this entity",
"$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}$"
}
},
"additionalProperties": false
},
"properties": {
"id": {
"description": "UUID of this Reason for closure record",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"reason": {
"description": "Reason for closure",
"type": "string"
},
"source": {
"description": "Source of reason for closure",
"type": "string",
"enum": [
"User",
"System"
],
"default": "User"
}
},
"additionalProperties": false,
"required": [
"reason",
"source"
]
}
Example:
{
"id": "41153a11-6bb8-4217-93b8-0c83c8b019f5",
"reason": "Lack of funds",
"source": "System"
}
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"reasons-for-closure not found"
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
delete /orders/configuration/reasons-for-closure/{id}
Delete reasons-for-closure item with given {reasons-for-closureId}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a reason for closure
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
HTTP status code 204
Item deleted successfully
HTTP status code 400
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Body
Media type: text/plain
Type: any
Example:
"unable to delete reasons-for-closure -- constraint violation"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"reasons-for-closure not found"
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Collection of prefix items.
Create new prefix
Get list of prefixes
post /orders/configuration/prefixes
Create new prefix
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number prefix",
"type": "object",
"extends": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number prefix",
"type": "object",
"javaName": "entity",
"properties": {
"id": {
"description": "UUID identifying this entity",
"$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}$"
}
},
"additionalProperties": false
},
"properties": {
"id": {
"description": "UUID of this prefix",
"$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": "Prefix name",
"type": "string"
},
"description": {
"description": "Prefix description",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"name"
]
}
Example:
{
"name": "Custom prefix",
"description": "Custom prefix description"
}
HTTP status code 201
Returns a newly created item, with server-controlled fields like 'id' populated
Headers
- Location: required(string)
URI to the created prefix item
Body
Media type: application/json
Type: any
Example:
{
"name": "Custom prefix",
"description": "Custom prefix description"
}
HTTP status code 400
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Body
Media type: text/plain
Type: any
Example:
"unable to add prefix -- malformed JSON at 13:3"
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to create prefixes -- unauthorized
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
get /orders/configuration/prefixes
Get list of prefixes
Query Parameters
- query: (string)
A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.
with valid searchable fields: for example prefix
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode ["prefix", "Prx", "="]
- offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)
Skip over a number of elements by specifying an offset value for the query
Example:
0
- limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)
Limit the number of elements returned in the response
Example:
10
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
HTTP status code 200
Returns a list of prefix items
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of purchase order number prefixes",
"type": "object",
"properties": {
"prefixes": {
"description": "Collection of prefixes",
"type": "array",
"id": "prefixes",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number prefix",
"extends": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number prefix",
"type": "object",
"javaName": "entity",
"properties": {
"id": {
"description": "UUID identifying this entity",
"$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}$"
}
},
"additionalProperties": false
},
"properties": {
"id": {
"description": "UUID of this prefix",
"$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": "Prefix name",
"type": "string"
},
"description": {
"description": "Prefix description",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"name"
]
}
},
"totalRecords": {
"description": "The number of objects contained in this collection",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"prefixes",
"totalRecords"
]
}
Example:
{
"prefixes":
[
{
"id": "db9f5d17-0ca3-4d14-ae49-16b63c8fc083",
"name": "Custom prefix",
"description": "Custom prefix description"
}
],
"totalRecords": 1
}
HTTP status code 400
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Body
Media type: text/plain
Type: any
Example:
unable to list prefixes -- malformed parameter 'query', syntax error at column 6
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to list prefixes -- unauthorized
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Entity representing a prefix
Update prefix
Retrieve prefix item with given {prefixId}
Delete prefix item with given {prefixId}
put /orders/configuration/prefixes/{id}
Update prefix
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a prefix
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number prefix",
"type": "object",
"extends": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number prefix",
"type": "object",
"javaName": "entity",
"properties": {
"id": {
"description": "UUID identifying this entity",
"$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}$"
}
},
"additionalProperties": false
},
"properties": {
"id": {
"description": "UUID of this prefix",
"$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": "Prefix name",
"type": "string"
},
"description": {
"description": "Prefix description",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"name"
]
}
Example:
{
"id": "db9f5d17-0ca3-4d14-ae49-16b63c8fc083",
"name": "Custom prefix",
"description": "Custom prefix description"
}
HTTP status code 204
Item successfully updated
HTTP status code 400
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Body
Media type: text/plain
Type: any
Example:
"unable to update prefix -- malformed JSON at 13:4"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"prefix not found"
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
get /orders/configuration/prefixes/{id}
Retrieve prefix item with given {prefixId}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a prefix
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
HTTP status code 200
Returns item with a given ID
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number prefix",
"type": "object",
"extends": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number prefix",
"type": "object",
"javaName": "entity",
"properties": {
"id": {
"description": "UUID identifying this entity",
"$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}$"
}
},
"additionalProperties": false
},
"properties": {
"id": {
"description": "UUID of this prefix",
"$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": "Prefix name",
"type": "string"
},
"description": {
"description": "Prefix description",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"name"
]
}
Example:
{
"id": "db9f5d17-0ca3-4d14-ae49-16b63c8fc083",
"name": "Custom prefix",
"description": "Custom prefix description"
}
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"prefix not found"
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
delete /orders/configuration/prefixes/{id}
Delete prefix item with given {prefixId}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a prefix
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
HTTP status code 204
Item deleted successfully
HTTP status code 400
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Body
Media type: text/plain
Type: any
Example:
"unable to delete prefix -- constraint violation"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"prefix not found"
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Collection of suffix items.
Create new suffix
Get list of suffixes
post /orders/configuration/suffixes
Create new suffix
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number suffix",
"type": "object",
"extends": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number prefix",
"type": "object",
"javaName": "entity",
"properties": {
"id": {
"description": "UUID identifying this entity",
"$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}$"
}
},
"additionalProperties": false
},
"properties": {
"id": {
"description": "UUID of this suffix",
"$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": "Suffix name",
"type": "string"
},
"description": {
"description": "Suffix description",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"name"
]
}
Example:
{
"name": "Custom suffix",
"description": "Custom suffix description"
}
HTTP status code 201
Returns a newly created item, with server-controlled fields like 'id' populated
Headers
- Location: required(string)
URI to the created suffix item
Body
Media type: application/json
Type: any
Example:
{
"name": "Custom suffix",
"description": "Custom suffix description"
}
HTTP status code 400
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Body
Media type: text/plain
Type: any
Example:
"unable to add suffix -- malformed JSON at 13:3"
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to create suffixes -- unauthorized
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
get /orders/configuration/suffixes
Get list of suffixes
Query Parameters
- query: (string)
A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.
with valid searchable fields: for example suffix
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode ["code", "Sfx", "="]
- offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)
Skip over a number of elements by specifying an offset value for the query
Example:
0
- limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)
Limit the number of elements returned in the response
Example:
10
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
HTTP status code 200
Returns a list of suffix items
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of purchase order number suffixes",
"type": "object",
"properties": {
"suffixes": {
"description": "Collection of suffixes",
"type": "array",
"id": "suffixes",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number suffix",
"extends": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number prefix",
"type": "object",
"javaName": "entity",
"properties": {
"id": {
"description": "UUID identifying this entity",
"$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}$"
}
},
"additionalProperties": false
},
"properties": {
"id": {
"description": "UUID of this suffix",
"$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": "Suffix name",
"type": "string"
},
"description": {
"description": "Suffix description",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"name"
]
}
},
"totalRecords": {
"description": "The number of objects contained in this collection",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"suffixes",
"totalRecords"
]
}
Example:
{
"suffixes":
[
{
"id": "0c966bd2-0ca6-43a2-9388-3a4403f19e6f",
"name": "Custom suffix",
"description": "Custom suffix description"
}
],
"totalRecords": 1
}
HTTP status code 400
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Body
Media type: text/plain
Type: any
Example:
unable to list suffixes -- malformed parameter 'query', syntax error at column 6
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to list suffixes -- unauthorized
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Entity representing a suffix
Update suffix
Retrieve suffix item with given {suffixId}
Delete suffix item with given {suffixId}
put /orders/configuration/suffixes/{id}
Update suffix
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a suffix
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number suffix",
"type": "object",
"extends": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number prefix",
"type": "object",
"javaName": "entity",
"properties": {
"id": {
"description": "UUID identifying this entity",
"$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}$"
}
},
"additionalProperties": false
},
"properties": {
"id": {
"description": "UUID of this suffix",
"$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": "Suffix name",
"type": "string"
},
"description": {
"description": "Suffix description",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"name"
]
}
Example:
{
"id": "0c966bd2-0ca6-43a2-9388-3a4403f19e6f",
"name": "Custom suffix",
"description": "Custom suffix description"
}
HTTP status code 204
Item successfully updated
HTTP status code 400
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Body
Media type: text/plain
Type: any
Example:
"unable to update suffix -- malformed JSON at 13:4"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"suffix not found"
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
get /orders/configuration/suffixes/{id}
Retrieve suffix item with given {suffixId}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a suffix
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
HTTP status code 200
Returns item with a given ID
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number suffix",
"type": "object",
"extends": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Purchase order number prefix",
"type": "object",
"javaName": "entity",
"properties": {
"id": {
"description": "UUID identifying this entity",
"$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}$"
}
},
"additionalProperties": false
},
"properties": {
"id": {
"description": "UUID of this suffix",
"$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": "Suffix name",
"type": "string"
},
"description": {
"description": "Suffix description",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"name"
]
}
Example:
{
"id": "0c966bd2-0ca6-43a2-9388-3a4403f19e6f",
"name": "Custom suffix",
"description": "Custom suffix description"
}
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"suffix not found"
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
delete /orders/configuration/suffixes/{id}
Delete suffix item with given {suffixId}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a suffix
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
HTTP status code 204
Item deleted successfully
HTTP status code 400
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Body
Media type: text/plain
Type: any
Example:
"unable to delete suffix -- constraint violation"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"suffix not found"
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator