Change usage status of items to be used at location (ie reading room) version v0.1
http://localhost:9130
API for changing usage status of items used at location
Change usage status API
/circulation
post
post /circulation/hold-by-barcode-for-use-at-location
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Request to switch status of use at location to 'Held'",
"properties": {
"itemBarcode": {
"description": "Barcode of the item being in use at location",
"type": "string"
}
},
"required": [
"itemBarcode"
]
}
HTTP status code 200
The at-location usage status of the loaned item set to held
HTTP status code 404
The loan is not found
HTTP status code 422
Unable to change the usage status for the loan
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": "TBD",
"parameters": [
{
"key": "itemId",
"value": "91719676-e7b5-4f83-bdab-cb70dd10c1e3"
}
]
}
]
}
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
post
post /circulation/pickup-by-barcode-for-use-at-location
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Request to switch status of use at location to 'In use'",
"properties": {
"itemBarcode": {
"description": "Barcode of the item lent to the patron for use at location",
"type": "string"
},
"userBarcode": {
"description": "Barcode of the user (representing the patron)",
"type": "string"
}
},
"required": [
"itemBarcode",
"userBarcode"
]
}
HTTP status code 200
The at-location usage status of the loaned item set to in-use
HTTP status code 404
The loan is not found
HTTP status code 422
Unable to change the usage status for the loan
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": "TBD",
"parameters": [
{
"key": "itemId",
"value": "91719676-e7b5-4f83-bdab-cb70dd10c1e3"
}
]
}
]
}
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