Orders Storage API documentation version v3
http://github.com/org/folio/mod-orders-storage
EResources
CRUD API
/orders-storage/eresources
Collection of eresource items.
Get list of eresources
Create a new eresource item.
get /orders-storage/eresources
Get list of eresources
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 code
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode ["code", "MEDGRANT", "="] - 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 eresource items
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "collection of eresource records",
"type": "object",
"properties": {
"eresources": {
"description": "collection of eresource records",
"type": "array",
"id": "eresources",
"items": {
"type": "object",
"$ref": "eresource.json"
}
},
"total_records": {
"description": "The number of objects contained in this collection",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"eresources",
"total_records"
]
}
Example:
{
"eresources":
[
{
"id": "468b679c-378b-4009-9a17-a6711cefc85f",
"access_provider": "ba3f3d45-247d-41f6-8dc9-6488adcad329",
"activated": false,
"activation_due": 10,
"create_inventory": true,
"expected_activation": "2018-10-09T00:00:00.000Z",
"license": "7c063655-b384-4a6f-b367-3c2f95f7a49c",
"trial": false,
"user_limit": 10,
"po_line_id": "8c778aee-97fa-4586-b131-3ea588a728e2"
}
],
"total_records": 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 eresources -- malformed parameter 'query', syntax error at column 6HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to list eresources -- unauthorizedHTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administratorpost /orders-storage/eresources
Create a new eresource item.
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 line e-resource details",
"type": "object",
"properties": {
"id": {
"description": "UUID of this eresource 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}$"
},
"activated": {
"description": "whether or not this resource is activated",
"type": "boolean"
},
"activation_due": {
"description": "number of days until activation, from date of order placement",
"type": "integer"
},
"create_inventory": {
"description": "whether or not to create an inventory record for this resource",
"type": "boolean"
},
"trial": {
"description": "whether or not this is a trial",
"type": "boolean"
},
"expected_activation": {
"description": "expected date the resource will be activated",
"type": "string",
"format": "date-time"
},
"user_limit": {
"description": "the concurrent user-limit",
"type": "integer"
},
"access_provider": {
"description": "UUID of the access provider",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"po_line_id": {
"description": "UUID of the purchase order line this record is associated with",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"license": {
"description": "UUID of the license 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}$"
}
},
"additionalProperties": false
}
Example:
{
"id": "468b679c-378b-4009-9a17-a6711cefc85f",
"access_provider": "ba3f3d45-247d-41f6-8dc9-6488adcad329",
"activated": false,
"activation_due": 10,
"create_inventory": true,
"expected_activation": "2018-10-09T00:00:00.000Z",
"license": "7c063655-b384-4a6f-b367-3c2f95f7a49c",
"trial": false,
"user_limit": 10,
"po_line_id": "8c778aee-97fa-4586-b131-3ea588a728e2"
}
HTTP status code 201
Returns a newly created item, with server-controlled fields like 'id' populated
Headers
- Location: required (string)
URI to the created eresource item
Body
Media type: application/json
Type: any
Example:
{
"id": "468b679c-378b-4009-9a17-a6711cefc85f",
"access_provider": "ba3f3d45-247d-41f6-8dc9-6488adcad329",
"activated": false,
"activation_due": 10,
"create_inventory": true,
"expected_activation": "2018-10-09T00:00:00.000Z",
"license": "7c063655-b384-4a6f-b367-3c2f95f7a49c",
"trial": false,
"user_limit": 10,
"po_line_id": "8c778aee-97fa-4586-b131-3ea588a728e2"
}
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 eresource -- 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 eresources -- unauthorizedHTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
Internal server error, contact administratorEntity representing a eresource
Retrieve eresource item with given {eresourceId}
Delete eresource item with given {eresourceId}
Update eresource item with given {eresourceId}
get /orders-storage/eresources/{id}
Retrieve eresource item with given {eresourceId}
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 Eresource
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 line e-resource details",
"type": "object",
"properties": {
"id": {
"description": "UUID of this eresource 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}$"
},
"activated": {
"description": "whether or not this resource is activated",
"type": "boolean"
},
"activation_due": {
"description": "number of days until activation, from date of order placement",
"type": "integer"
},
"create_inventory": {
"description": "whether or not to create an inventory record for this resource",
"type": "boolean"
},
"trial": {
"description": "whether or not this is a trial",
"type": "boolean"
},
"expected_activation": {
"description": "expected date the resource will be activated",
"type": "string",
"format": "date-time"
},
"user_limit": {
"description": "the concurrent user-limit",
"type": "integer"
},
"access_provider": {
"description": "UUID of the access provider",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"po_line_id": {
"description": "UUID of the purchase order line this record is associated with",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"license": {
"description": "UUID of the license 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}$"
}
},
"additionalProperties": false
}
Example:
{
"access_provider": "ba3f3d45-247d-41f6-8dc9-6488adcad329",
"activated": false,
"activation_due": 10,
"create_inventory": true,
"expected_activation": "2018-10-09T00:00:00.000Z",
"license": "7c063655-b384-4a6f-b367-3c2f95f7a49c",
"trial": false,
"user_limit": 10,
"po_line_id": "8c778aee-97fa-4586-b131-3ea588a728e2"
}
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"eresource 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 administratordelete /orders-storage/eresources/{id}
Delete eresource item with given {eresourceId}
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 Eresource
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 eresource -- constraint violation"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"eresource 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 administratorput /orders-storage/eresources/{id}
Update eresource item with given {eresourceId}
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 Eresource
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 line e-resource details",
"type": "object",
"properties": {
"id": {
"description": "UUID of this eresource 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}$"
},
"activated": {
"description": "whether or not this resource is activated",
"type": "boolean"
},
"activation_due": {
"description": "number of days until activation, from date of order placement",
"type": "integer"
},
"create_inventory": {
"description": "whether or not to create an inventory record for this resource",
"type": "boolean"
},
"trial": {
"description": "whether or not this is a trial",
"type": "boolean"
},
"expected_activation": {
"description": "expected date the resource will be activated",
"type": "string",
"format": "date-time"
},
"user_limit": {
"description": "the concurrent user-limit",
"type": "integer"
},
"access_provider": {
"description": "UUID of the access provider",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"po_line_id": {
"description": "UUID of the purchase order line this record is associated with",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"license": {
"description": "UUID of the license 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}$"
}
},
"additionalProperties": false
}
Example:
{
"access_provider": "ba3f3d45-247d-41f6-8dc9-6488adcad329",
"activated": false,
"activation_due": 10,
"create_inventory": true,
"expected_activation": "2018-10-09T00:00:00.000Z",
"license": "7c063655-b384-4a6f-b367-3c2f95f7a49c",
"trial": false,
"user_limit": 10,
"po_line_id": "8c778aee-97fa-4586-b131-3ea588a728e2"
}
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 eresource -- malformed JSON at 13:4"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"eresource 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