https://github.com/folio-org/mod-vendors
CRUD APIs used to manage alerts.
Collection of agreement items.
Get list of agreements
GET /vendor-storage/agreementsA 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", "="]
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 agreement items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "collection of agreement records",
"type": "object",
"properties": {
"agreements": {
"description": "The list of agreements in this collection",
"type": "array",
"id": "agreements",
"items": {
"type": "object",
"$ref": "agreement.json"
}
},
"total_records": {
"description": "The number of agreement records returned in this collection",
"type": "integer"
},
"first": {
"description": "The index of the first object in the collection",
"type": "integer"
},
"last": {
"description": "The index of the last object in the collection",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"agreements",
"total_records"
]
}
Example:
{
"agreements": [
{
"id": "588b5c42-8634-4af7-bc9b-5e0116ed96b6",
"name": "History Follower Incentive",
"discount": 10,
"reference_url": "http://my_sample_agreement.com",
"notes": "note"
}
],
"total_records": 1,
"first": 1,
"last": 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 agreements -- malformed parameter 'query', syntax error at column 6Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to list agreements -- unauthorizedInternal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administratorCreate a new agreement item.
POST /vendor-storage/agreementsRequested language. Optional. [lang=en]
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A vendor agreement",
"type": "object",
"properties": {
"id": {
"description": "The unique id of this category",
"type": ["string", "null"],
"description": "UUID",
"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}$"
},
"name": {
"description": "The unique name of this agreement",
"type": "string"
},
"discount": {
"description": "The discount amount of this agreement",
"type": "number"
},
"reference_url": {
"description": "The reference url for this agreement",
"type": "string"
},
"notes": {
"description": "The notes of this agreement",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"name"
]
}
Example:
{
"name": "History Follower Incentive",
"discount": 10,
"reference_url": "http://my_sample_agreement.com",
"notes": "note"
}Returns a newly created item, with server-controlled fields like 'id' populated
URI to the created agreement item
Media type: application/json
Type: any
Example:
{
"name": "History Follower Incentive",
"discount": 10,
"reference_url": "http://my_sample_agreement.com",
"notes": "note"
}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 agreement -- malformed JSON at 13:3"
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to create agreements -- unauthorizedInternal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administratorRetrieve agreement item with given {agreementId}
GET /vendor-storage/agreements/{id}The UUID of a Agreement
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": "A vendor agreement",
"type": "object",
"properties": {
"id": {
"description": "The unique id of this category",
"type": ["string", "null"],
"description": "UUID",
"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}$"
},
"name": {
"description": "The unique name of this agreement",
"type": "string"
},
"discount": {
"description": "The discount amount of this agreement",
"type": "number"
},
"reference_url": {
"description": "The reference url for this agreement",
"type": "string"
},
"notes": {
"description": "The notes of this agreement",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"name"
]
}
Example:
{
"id": "588b5c42-8634-4af7-bc9b-5e0116ed96b6",
"name": "History Follower Incentive",
"discount": 10,
"reference_url": "http://my_sample_agreement.com",
"notes": "note"
}Item with a given ID not found
Media type: text/plain
Type: any
Example:
"agreement not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administratorDelete agreement item with given {agreementId}
DELETE /vendor-storage/agreements/{id}The UUID of a Agreement
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 agreement -- constraint violation"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"agreement not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administratorUpdate agreement item with given {agreementId}
PUT /vendor-storage/agreements/{id}The UUID of a Agreement
Requested language. Optional. [lang=en]
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A vendor agreement",
"type": "object",
"properties": {
"id": {
"description": "The unique id of this category",
"type": ["string", "null"],
"description": "UUID",
"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}$"
},
"name": {
"description": "The unique name of this agreement",
"type": "string"
},
"discount": {
"description": "The discount amount of this agreement",
"type": "number"
},
"reference_url": {
"description": "The reference url for this agreement",
"type": "string"
},
"notes": {
"description": "The notes of this agreement",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"name"
]
}
Example:
{
"id": "588b5c42-8634-4af7-bc9b-5e0116ed96b6",
"name": "History Follower Incentive",
"discount": 10,
"reference_url": "http://my_sample_agreement.com",
"notes": "note"
}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 agreement -- malformed JSON at 13:4"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"agreement not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator