Circulation version v13.1
http://localhost:9130
Circulation Business Logic API
API for loans and requests
/circulation
Creates a loan by checking out an item to a loanee
post /circulation/check-out-by-barcode
Creates a loan by checking out an item to a loanee
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Request to check out an item to a loanee using barcodes",
"properties": {
"itemBarcode": {
"description": "Barcode of the item to be lent to the patron",
"type": "string"
},
"userBarcode": {
"description": "Barcode of the user (representing the patron) the item is to be lent to",
"type": "string"
},
"proxyUserBarcode": {
"description": "Barcode of the user representing a proxy for the patron",
"type": "string"
},
"loanDate": {
"description": "When the loan is to begin, defaults to current date and time",
"type": "string",
"format": "date-time"
},
"servicePointId": {
"description": "Service point where the item has been checked out",
"type": "string",
"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}$"
},
"overrideBlocks": {
"description": "Blocks to override",
"type": "object",
"$ref": "override-blocks.json"
}
},
"required": [
"itemBarcode",
"userBarcode",
"servicePointId"
]
}
Example:
{
"userBarcode": "466983136459401",
"proxyUserBarcode": "693750137582350",
"itemBarcode": "2887532577331",
"servicePointId": "3260a6f0-0b53-4d9c-ad74-2dba3830d69f"
}
HTTP status code 201
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Loan",
"description": "Links the item with the patron and applies certain conditions based on policies",
"properties": {
"id": {
"description": "Unique ID (generated UUID) of the loan",
"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}$"
},
"userId": {
"description": "ID of the patron the item was lent to. Required for open loans, not required for closed loans (for anonymization).",
"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}$"
},
"borrower": {
"description": "Additional information about the borrower of the item, taken from the user referred to by the userId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode used to identify the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"proxyUserId": {
"description": "ID of the user representing a proxy for the patron",
"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}$"
},
"itemId": {
"description": "ID of the item lent to the patron",
"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}$"
},
"loanPolicyId": {
"description": "ID of last policy used in relation to this loan",
"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}$"
},
"loanPolicy": {
"description": "Additional information about the loan policy of the item, taken from the loan loanPolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"overdueFinePolicyId": {
"description": "ID of last overdue fine policy used in relation to this loan",
"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}$"
},
"overdueFinePolicy": {
"description": "Additional information about the overdue fine policy of the item, taken from the loan overdueFinePolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last overdue fine policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"lostItemPolicyId": {
"description": "ID of last lost item policy used in relation to this loan",
"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}$"
},
"lostItemPolicy": {
"description": "Additional information about the lost item policy of the item, taken from the loan lostItemPolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last lost item policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"item": {
"description": "Additional information about the item",
"type": "object",
"readonly": true,
"properties": {
"id": {
"description": "ID of the item",
"type": "string",
"readonly": true,
"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}$"
},
"title": {
"description": "The title of the item lent to the patron",
"type": "string",
"readonly": true
},
"callNumber": {
"description": "Deprecated call number from the holdings record, use callNumberComponents.callNumber instead",
"type": "string",
"readonly": true
},
"copyNumber": {
"description": "Item copy number",
"type": "string",
"readonly": true
},
"materialType": {
"description": "The material type from the item record",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the material type",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"contributors": {
"description": "Contributors from the instance record",
"type": "array",
"readonly": true,
"items": {
"type": "object",
"properties": {
"name": {
"description": "Name of the contributor",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
}
},
"holdingsRecordId": {
"description": "The ID of the holdings for the item",
"type": "string",
"readonly": true,
"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}$"
},
"instanceId": {
"description": "The ID of the instance for the item",
"type": "string",
"readonly": true,
"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}$"
},
"barcode": {
"description": "The barcode of the item",
"type": "string",
"readonly": true
},
"location": {
"description": "The effective location of the item",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "The name of the location",
"type": "string",
"readonly": true
}
}
},
"status": {
"description": "Overall status of the item",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the item status",
"type": "string",
"readonly": true
},
"date": {
"type": "string",
"description": "Date time when status was last changed",
"format": "date-time",
"readonly": true
}
},
"additionalProperties": false
},
"inTransitDestinationServicePointId": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "string",
"readonly": true,
"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}$"
},
"inTransitDestinationServicePoint": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the service point",
"type": "string",
"readonly": true
}
}
},
"enumeration": {
"description": "Item`s enumeration",
"type": "string",
"readonly": true
},
"chronology": {
"description": "Item`s chronology",
"type": "string",
"readonly": true
},
"volume": {
"description": "Item`s volume",
"type": "string",
"readonly": true
},
"callNumberComponents": {
"description": "Elements of a full call number",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"callNumber": {
"type": "string",
"description": "Call number for item",
"readonly": true
},
"prefix": {
"description": "Call number prefix for item",
"type": "string",
"readonly": true
},
"suffix": {
"description": "Call number suffix for item",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"itemEffectiveLocationIdAtCheckOut": {
"description": "The effective location, at the time of checkout, of the item loaned to the patron.",
"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}$"
},
"status": {
"description": "Overall status of the loan",
"type": "object",
"properties": {
"name": {
"description": "Name of the status (currently can be any value, values commonly used are Open and Closed)",
"type": "string"
}
}
},
"loanDate": {
"description": "Date and time when the loan began",
"type": "string",
"format": "date-time"
},
"dueDate": {
"description": "Date and time when the item is due to be returned",
"type": "string",
"format": "date-time"
},
"returnDate": {
"description": "Date and time when the item was returned",
"type": "string",
"format": "date-time"
},
"systemReturnDate": {
"description": "Date and time when return was processed",
"type": "string",
"format": "date-time"
},
"action": {
"description": "Last action performed on a loan (currently can be any value, values commonly used are checkedout and checkedin)",
"type": "string"
},
"actionComment": {
"description": "Last action performed on a loan comments",
"type": "string"
},
"renewalCount": {
"description": "Count of how many times a loan has been renewed (incremented by the client)",
"type": "integer",
"minimum": 0
},
"dueDateChangedByRecall": {
"description": "Is due date changed by recall request",
"type": "boolean",
"readonly": true
},
"dueDateChangedByNearExpireUser": {
"description": "Indicates whether or not this loan had its due date modified by a expired user",
"type": "boolean"
},
"dueDateChangedByHold": {
"description": "Is due date changed by hold request",
"type": "boolean",
"readonly": true
},
"checkoutServicePointId": {
"description": "ID of the Service Point where the last checkout occured",
"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}$"
},
"checkinServicePointId": {
"description": "ID of the Service Point where the last checkin occured",
"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}$"
},
"checkoutServicePoint": {
"description": "Service Point where the last checkout occurred",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"name": {
"description": "Unique name of the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Short code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human readable name",
"type": "string",
"readonly": true
},
"description": {
"description": "Service Point description data",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Time to shelving",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this a pickup location",
"type": "boolean",
"readonly": true
},
"holdShelfClosedLibraryDateManagement": {
"description": "Hold shelf closed date strategy",
"type": "string",
"readonly": true
}
}
},
"checkinServicePoint": {
"description": "Service Point where the last checkin occurred",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"name": {
"description": "Unique name of the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Short code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human readable name",
"type": "string",
"readonly": true
},
"description": {
"description": "Service Point description data",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Time to shelving",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this a pickup location",
"type": "boolean",
"readonly": true
},
"holdShelfClosedLibraryDateManagement": {
"description": "Hold shelf closed date strategy",
"type": "string",
"readonly": true
}
}
},
"patronGroupAtCheckout": {
"description": "Patron Group at checkout",
"type": "object",
"properties": {
"id": {
"description": "Unique ID (generated UUID) of the patron group",
"type": "string",
"readonly": true,
"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": "Patron group name",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"feesAndFines": {
"description": "Fees and fines associated with loans",
"type": "object",
"properties": {
"amountRemainingToPay": {
"type": "number",
"description": "Total remaining amount due on fees and fines for the loan (read only, defined by the server)",
"readonly": true
}
},
"additionalProperties": false
},
"declaredLostDate": {
"description": "Date and time the item was declared lost during this loan",
"type": "string",
"format": "date-time"
},
"metadata": {
"description": "Metadata about creation and changes to loan, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"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}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"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}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"required": [
"itemId",
"loanDate",
"action"
]
}
Example:
{
"id": "cf23adf0-61ba-4887-bf82-956c4aae2260",
"userId": "df7f4993-8c14-4a0f-ab63-93975ab01c76",
"proxyUserId": "346ad017-dac1-417d-9ed8-0ac7eeb886aa",
"itemId": "cb20f34f-b773-462f-a091-b233cc96b9e6",
"item": {
"title": "The Long Way to a Small, Angry Planet",
"barcode": "036000291452",
"status": {
"name": "Checked out"
},
"location": {
"name": "Main Library"
},
"materialType": {
"name": "Book"
},
"contributors": [
{
"name": "Steve Jones"
}
]
},
"loanPolicyId" : "e9af4ba4-6801-4722-be45-d7a49d13564d",
"loanPolicy": {
"name" : "Can Circulate Rolling"
},
"overdueFinePolicyId": "b59fe39f-efdc-4a88-993a-04fb405e5ecc",
"overdueFinePolicy": {
"name": "Overdue fine policy"
},
"lostItemPolicyId": "ea77439c-9ff5-4c37-8c92-0df02576c873",
"lostItemPolicy": {
"name": "Lost item policy"
},
"borrower" : {
"firstName" : "FirstName",
"lastName" : "LastName",
"middleName" : "MiddleName",
"barcode" : "102322966933815"
},
"loanDate": "2017-03-01T23:11:00.000Z",
"dueDate": "2017-04-01T23:11:00.000Z",
"checkoutServicePointId": "e9af4ba4-6801-4722-bf45-d7a49d54564d",
"checkinServicePointId": "e9af4ba4-6801-4722-bf45-d7a49d54564d",
"status": {
"name": "Open"
},
"action": "checkedout",
"renewalCount": 0
}
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A collection of extended errors",
"type": "object",
"properties": {
"errors": {
"description": "List of extended errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An extended error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
"overridableBlock": {
"type": "object",
"description": "Details of an overridable block the error is related to",
"properties": {
"name": {
"type": "string",
"description": "Name of the block",
"enum": [
"patronBlock",
"itemLimitBlock",
"itemNotLoanableBlock"
]
},
"missingPermissions": {
"type": "array",
"description": "Missing Okapi permissions required to override the block",
"items": {
"type": "string"
}
}
},
"required": [
"name",
"missingPermissions"
]
}
},
"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
Body
Media type: text/plain
Type: any
Example:
Internal server error
Updates the due date of an existing loan
post /circulation/renew-by-barcode
Updates the due date of an existing loan
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Request to renew an existing loan, found by barcodes of item and loanee",
"properties": {
"itemBarcode": {
"description": "Barcode of the item to be renewed",
"type": "string"
},
"userBarcode": {
"description": "Barcode of the user (representing the patron) the item has been loaned to",
"type": "string"
},
"servicePointId": {
"description": "Service point where an item is being processed",
"type": "string",
"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}$"
},
"overrideBlocks": {
"description": "Blocks to override",
"$ref": "override-blocks.json"
}
},
"additionalProperties": false,
"required": [
"itemBarcode",
"userBarcode"
]
}
Example:
{
"userBarcode": "466983136459401",
"itemBarcode": "2887532577331",
"servicePointId":"7c5abc9f-f3d7-4856-b8d7-6712462ca007",
"overrideBlocks": {
"patronBlock": {},
"renewalBlock":{},
"renewalDueDateRequiredBlock":{
"dueDate":"2021-05-31T12:53:00Z"
},
"comment": "Comment"
}
}
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Loan",
"description": "Links the item with the patron and applies certain conditions based on policies",
"properties": {
"id": {
"description": "Unique ID (generated UUID) of the loan",
"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}$"
},
"userId": {
"description": "ID of the patron the item was lent to. Required for open loans, not required for closed loans (for anonymization).",
"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}$"
},
"borrower": {
"description": "Additional information about the borrower of the item, taken from the user referred to by the userId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode used to identify the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"proxyUserId": {
"description": "ID of the user representing a proxy for the patron",
"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}$"
},
"itemId": {
"description": "ID of the item lent to the patron",
"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}$"
},
"loanPolicyId": {
"description": "ID of last policy used in relation to this loan",
"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}$"
},
"loanPolicy": {
"description": "Additional information about the loan policy of the item, taken from the loan loanPolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"overdueFinePolicyId": {
"description": "ID of last overdue fine policy used in relation to this loan",
"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}$"
},
"overdueFinePolicy": {
"description": "Additional information about the overdue fine policy of the item, taken from the loan overdueFinePolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last overdue fine policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"lostItemPolicyId": {
"description": "ID of last lost item policy used in relation to this loan",
"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}$"
},
"lostItemPolicy": {
"description": "Additional information about the lost item policy of the item, taken from the loan lostItemPolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last lost item policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"item": {
"description": "Additional information about the item",
"type": "object",
"readonly": true,
"properties": {
"id": {
"description": "ID of the item",
"type": "string",
"readonly": true,
"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}$"
},
"title": {
"description": "The title of the item lent to the patron",
"type": "string",
"readonly": true
},
"callNumber": {
"description": "Deprecated call number from the holdings record, use callNumberComponents.callNumber instead",
"type": "string",
"readonly": true
},
"copyNumber": {
"description": "Item copy number",
"type": "string",
"readonly": true
},
"materialType": {
"description": "The material type from the item record",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the material type",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"contributors": {
"description": "Contributors from the instance record",
"type": "array",
"readonly": true,
"items": {
"type": "object",
"properties": {
"name": {
"description": "Name of the contributor",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
}
},
"holdingsRecordId": {
"description": "The ID of the holdings for the item",
"type": "string",
"readonly": true,
"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}$"
},
"instanceId": {
"description": "The ID of the instance for the item",
"type": "string",
"readonly": true,
"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}$"
},
"barcode": {
"description": "The barcode of the item",
"type": "string",
"readonly": true
},
"location": {
"description": "The effective location of the item",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "The name of the location",
"type": "string",
"readonly": true
}
}
},
"status": {
"description": "Overall status of the item",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the item status",
"type": "string",
"readonly": true
},
"date": {
"type": "string",
"description": "Date time when status was last changed",
"format": "date-time",
"readonly": true
}
},
"additionalProperties": false
},
"inTransitDestinationServicePointId": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "string",
"readonly": true,
"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}$"
},
"inTransitDestinationServicePoint": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the service point",
"type": "string",
"readonly": true
}
}
},
"enumeration": {
"description": "Item`s enumeration",
"type": "string",
"readonly": true
},
"chronology": {
"description": "Item`s chronology",
"type": "string",
"readonly": true
},
"volume": {
"description": "Item`s volume",
"type": "string",
"readonly": true
},
"callNumberComponents": {
"description": "Elements of a full call number",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"callNumber": {
"type": "string",
"description": "Call number for item",
"readonly": true
},
"prefix": {
"description": "Call number prefix for item",
"type": "string",
"readonly": true
},
"suffix": {
"description": "Call number suffix for item",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"itemEffectiveLocationIdAtCheckOut": {
"description": "The effective location, at the time of checkout, of the item loaned to the patron.",
"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}$"
},
"status": {
"description": "Overall status of the loan",
"type": "object",
"properties": {
"name": {
"description": "Name of the status (currently can be any value, values commonly used are Open and Closed)",
"type": "string"
}
}
},
"loanDate": {
"description": "Date and time when the loan began",
"type": "string",
"format": "date-time"
},
"dueDate": {
"description": "Date and time when the item is due to be returned",
"type": "string",
"format": "date-time"
},
"returnDate": {
"description": "Date and time when the item was returned",
"type": "string",
"format": "date-time"
},
"systemReturnDate": {
"description": "Date and time when return was processed",
"type": "string",
"format": "date-time"
},
"action": {
"description": "Last action performed on a loan (currently can be any value, values commonly used are checkedout and checkedin)",
"type": "string"
},
"actionComment": {
"description": "Last action performed on a loan comments",
"type": "string"
},
"renewalCount": {
"description": "Count of how many times a loan has been renewed (incremented by the client)",
"type": "integer",
"minimum": 0
},
"dueDateChangedByRecall": {
"description": "Is due date changed by recall request",
"type": "boolean",
"readonly": true
},
"dueDateChangedByNearExpireUser": {
"description": "Indicates whether or not this loan had its due date modified by a expired user",
"type": "boolean"
},
"dueDateChangedByHold": {
"description": "Is due date changed by hold request",
"type": "boolean",
"readonly": true
},
"checkoutServicePointId": {
"description": "ID of the Service Point where the last checkout occured",
"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}$"
},
"checkinServicePointId": {
"description": "ID of the Service Point where the last checkin occured",
"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}$"
},
"checkoutServicePoint": {
"description": "Service Point where the last checkout occurred",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"name": {
"description": "Unique name of the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Short code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human readable name",
"type": "string",
"readonly": true
},
"description": {
"description": "Service Point description data",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Time to shelving",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this a pickup location",
"type": "boolean",
"readonly": true
},
"holdShelfClosedLibraryDateManagement": {
"description": "Hold shelf closed date strategy",
"type": "string",
"readonly": true
}
}
},
"checkinServicePoint": {
"description": "Service Point where the last checkin occurred",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"name": {
"description": "Unique name of the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Short code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human readable name",
"type": "string",
"readonly": true
},
"description": {
"description": "Service Point description data",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Time to shelving",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this a pickup location",
"type": "boolean",
"readonly": true
},
"holdShelfClosedLibraryDateManagement": {
"description": "Hold shelf closed date strategy",
"type": "string",
"readonly": true
}
}
},
"patronGroupAtCheckout": {
"description": "Patron Group at checkout",
"type": "object",
"properties": {
"id": {
"description": "Unique ID (generated UUID) of the patron group",
"type": "string",
"readonly": true,
"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": "Patron group name",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"feesAndFines": {
"description": "Fees and fines associated with loans",
"type": "object",
"properties": {
"amountRemainingToPay": {
"type": "number",
"description": "Total remaining amount due on fees and fines for the loan (read only, defined by the server)",
"readonly": true
}
},
"additionalProperties": false
},
"declaredLostDate": {
"description": "Date and time the item was declared lost during this loan",
"type": "string",
"format": "date-time"
},
"metadata": {
"description": "Metadata about creation and changes to loan, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"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}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"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}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"required": [
"itemId",
"loanDate",
"action"
]
}
Example:
{
"id": "cf23adf0-61ba-4887-bf82-956c4aae2260",
"userId": "df7f4993-8c14-4a0f-ab63-93975ab01c76",
"proxyUserId": "346ad017-dac1-417d-9ed8-0ac7eeb886aa",
"itemId": "cb20f34f-b773-462f-a091-b233cc96b9e6",
"item": {
"title": "The Long Way to a Small, Angry Planet",
"barcode": "036000291452",
"status": {
"name": "Checked out"
},
"location": {
"name": "Main Library"
},
"materialType": {
"name": "Book"
},
"contributors": [
{
"name": "Steve Jones"
}
]
},
"loanPolicyId" : "e9af4ba4-6801-4722-be45-d7a49d13564d",
"loanPolicy": {
"name" : "Can Circulate Rolling"
},
"overdueFinePolicyId": "b59fe39f-efdc-4a88-993a-04fb405e5ecc",
"overdueFinePolicy": {
"name": "Overdue fine policy"
},
"lostItemPolicyId": "ea77439c-9ff5-4c37-8c92-0df02576c873",
"lostItemPolicy": {
"name": "Lost item policy"
},
"borrower" : {
"firstName" : "FirstName",
"lastName" : "LastName",
"middleName" : "MiddleName",
"barcode" : "102322966933815"
},
"loanDate": "2017-03-01T23:11:00.000Z",
"dueDate": "2017-04-01T23:11:00.000Z",
"checkoutServicePointId": "e9af4ba4-6801-4722-bf45-d7a49d54564d",
"checkinServicePointId": "e9af4ba4-6801-4722-bf45-d7a49d54564d",
"status": {
"name": "Open"
},
"action": "checkedout",
"renewalCount": 0
}
HTTP status code 201
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Loan",
"description": "Links the item with the patron and applies certain conditions based on policies",
"properties": {
"id": {
"description": "Unique ID (generated UUID) of the loan",
"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}$"
},
"userId": {
"description": "ID of the patron the item was lent to. Required for open loans, not required for closed loans (for anonymization).",
"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}$"
},
"borrower": {
"description": "Additional information about the borrower of the item, taken from the user referred to by the userId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode used to identify the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"proxyUserId": {
"description": "ID of the user representing a proxy for the patron",
"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}$"
},
"itemId": {
"description": "ID of the item lent to the patron",
"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}$"
},
"loanPolicyId": {
"description": "ID of last policy used in relation to this loan",
"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}$"
},
"loanPolicy": {
"description": "Additional information about the loan policy of the item, taken from the loan loanPolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"overdueFinePolicyId": {
"description": "ID of last overdue fine policy used in relation to this loan",
"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}$"
},
"overdueFinePolicy": {
"description": "Additional information about the overdue fine policy of the item, taken from the loan overdueFinePolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last overdue fine policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"lostItemPolicyId": {
"description": "ID of last lost item policy used in relation to this loan",
"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}$"
},
"lostItemPolicy": {
"description": "Additional information about the lost item policy of the item, taken from the loan lostItemPolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last lost item policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"item": {
"description": "Additional information about the item",
"type": "object",
"readonly": true,
"properties": {
"id": {
"description": "ID of the item",
"type": "string",
"readonly": true,
"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}$"
},
"title": {
"description": "The title of the item lent to the patron",
"type": "string",
"readonly": true
},
"callNumber": {
"description": "Deprecated call number from the holdings record, use callNumberComponents.callNumber instead",
"type": "string",
"readonly": true
},
"copyNumber": {
"description": "Item copy number",
"type": "string",
"readonly": true
},
"materialType": {
"description": "The material type from the item record",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the material type",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"contributors": {
"description": "Contributors from the instance record",
"type": "array",
"readonly": true,
"items": {
"type": "object",
"properties": {
"name": {
"description": "Name of the contributor",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
}
},
"holdingsRecordId": {
"description": "The ID of the holdings for the item",
"type": "string",
"readonly": true,
"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}$"
},
"instanceId": {
"description": "The ID of the instance for the item",
"type": "string",
"readonly": true,
"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}$"
},
"barcode": {
"description": "The barcode of the item",
"type": "string",
"readonly": true
},
"location": {
"description": "The effective location of the item",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "The name of the location",
"type": "string",
"readonly": true
}
}
},
"status": {
"description": "Overall status of the item",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the item status",
"type": "string",
"readonly": true
},
"date": {
"type": "string",
"description": "Date time when status was last changed",
"format": "date-time",
"readonly": true
}
},
"additionalProperties": false
},
"inTransitDestinationServicePointId": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "string",
"readonly": true,
"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}$"
},
"inTransitDestinationServicePoint": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the service point",
"type": "string",
"readonly": true
}
}
},
"enumeration": {
"description": "Item`s enumeration",
"type": "string",
"readonly": true
},
"chronology": {
"description": "Item`s chronology",
"type": "string",
"readonly": true
},
"volume": {
"description": "Item`s volume",
"type": "string",
"readonly": true
},
"callNumberComponents": {
"description": "Elements of a full call number",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"callNumber": {
"type": "string",
"description": "Call number for item",
"readonly": true
},
"prefix": {
"description": "Call number prefix for item",
"type": "string",
"readonly": true
},
"suffix": {
"description": "Call number suffix for item",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"itemEffectiveLocationIdAtCheckOut": {
"description": "The effective location, at the time of checkout, of the item loaned to the patron.",
"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}$"
},
"status": {
"description": "Overall status of the loan",
"type": "object",
"properties": {
"name": {
"description": "Name of the status (currently can be any value, values commonly used are Open and Closed)",
"type": "string"
}
}
},
"loanDate": {
"description": "Date and time when the loan began",
"type": "string",
"format": "date-time"
},
"dueDate": {
"description": "Date and time when the item is due to be returned",
"type": "string",
"format": "date-time"
},
"returnDate": {
"description": "Date and time when the item was returned",
"type": "string",
"format": "date-time"
},
"systemReturnDate": {
"description": "Date and time when return was processed",
"type": "string",
"format": "date-time"
},
"action": {
"description": "Last action performed on a loan (currently can be any value, values commonly used are checkedout and checkedin)",
"type": "string"
},
"actionComment": {
"description": "Last action performed on a loan comments",
"type": "string"
},
"renewalCount": {
"description": "Count of how many times a loan has been renewed (incremented by the client)",
"type": "integer",
"minimum": 0
},
"dueDateChangedByRecall": {
"description": "Is due date changed by recall request",
"type": "boolean",
"readonly": true
},
"dueDateChangedByNearExpireUser": {
"description": "Indicates whether or not this loan had its due date modified by a expired user",
"type": "boolean"
},
"dueDateChangedByHold": {
"description": "Is due date changed by hold request",
"type": "boolean",
"readonly": true
},
"checkoutServicePointId": {
"description": "ID of the Service Point where the last checkout occured",
"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}$"
},
"checkinServicePointId": {
"description": "ID of the Service Point where the last checkin occured",
"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}$"
},
"checkoutServicePoint": {
"description": "Service Point where the last checkout occurred",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"name": {
"description": "Unique name of the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Short code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human readable name",
"type": "string",
"readonly": true
},
"description": {
"description": "Service Point description data",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Time to shelving",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this a pickup location",
"type": "boolean",
"readonly": true
},
"holdShelfClosedLibraryDateManagement": {
"description": "Hold shelf closed date strategy",
"type": "string",
"readonly": true
}
}
},
"checkinServicePoint": {
"description": "Service Point where the last checkin occurred",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"name": {
"description": "Unique name of the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Short code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human readable name",
"type": "string",
"readonly": true
},
"description": {
"description": "Service Point description data",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Time to shelving",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this a pickup location",
"type": "boolean",
"readonly": true
},
"holdShelfClosedLibraryDateManagement": {
"description": "Hold shelf closed date strategy",
"type": "string",
"readonly": true
}
}
},
"patronGroupAtCheckout": {
"description": "Patron Group at checkout",
"type": "object",
"properties": {
"id": {
"description": "Unique ID (generated UUID) of the patron group",
"type": "string",
"readonly": true,
"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": "Patron group name",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"feesAndFines": {
"description": "Fees and fines associated with loans",
"type": "object",
"properties": {
"amountRemainingToPay": {
"type": "number",
"description": "Total remaining amount due on fees and fines for the loan (read only, defined by the server)",
"readonly": true
}
},
"additionalProperties": false
},
"declaredLostDate": {
"description": "Date and time the item was declared lost during this loan",
"type": "string",
"format": "date-time"
},
"metadata": {
"description": "Metadata about creation and changes to loan, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"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}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"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}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"required": [
"itemId",
"loanDate",
"action"
]
}
Example:
{
"id": "cf23adf0-61ba-4887-bf82-956c4aae2260",
"userId": "df7f4993-8c14-4a0f-ab63-93975ab01c76",
"proxyUserId": "346ad017-dac1-417d-9ed8-0ac7eeb886aa",
"itemId": "cb20f34f-b773-462f-a091-b233cc96b9e6",
"item": {
"title": "The Long Way to a Small, Angry Planet",
"barcode": "036000291452",
"status": {
"name": "Checked out"
},
"location": {
"name": "Main Library"
},
"materialType": {
"name": "Book"
},
"contributors": [
{
"name": "Steve Jones"
}
]
},
"loanPolicyId" : "e9af4ba4-6801-4722-be45-d7a49d13564d",
"loanPolicy": {
"name" : "Can Circulate Rolling"
},
"overdueFinePolicyId": "b59fe39f-efdc-4a88-993a-04fb405e5ecc",
"overdueFinePolicy": {
"name": "Overdue fine policy"
},
"lostItemPolicyId": "ea77439c-9ff5-4c37-8c92-0df02576c873",
"lostItemPolicy": {
"name": "Lost item policy"
},
"borrower" : {
"firstName" : "FirstName",
"lastName" : "LastName",
"middleName" : "MiddleName",
"barcode" : "102322966933815"
},
"loanDate": "2017-03-01T23:11:00.000Z",
"dueDate": "2017-04-01T23:11:00.000Z",
"checkoutServicePointId": "e9af4ba4-6801-4722-bf45-d7a49d54564d",
"checkinServicePointId": "e9af4ba4-6801-4722-bf45-d7a49d54564d",
"status": {
"name": "Open"
},
"action": "checkedout",
"renewalCount": 0
}
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A collection of extended errors",
"type": "object",
"properties": {
"errors": {
"description": "List of extended errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An extended error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
"overridableBlock": {
"type": "object",
"description": "Details of an overridable block the error is related to",
"properties": {
"name": {
"type": "string",
"description": "Name of the block",
"enum": [
"patronBlock",
"itemLimitBlock",
"itemNotLoanableBlock"
]
},
"missingPermissions": {
"type": "array",
"description": "Missing Okapi permissions required to override the block",
"items": {
"type": "string"
}
}
},
"required": [
"name",
"missingPermissions"
]
}
},
"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
Body
Media type: text/plain
Type: any
Example:
Internal server error
Updates the due date of an existing loan
post /circulation/renew-by-id
Updates the due date of an existing loan
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Request to renew an existing loan, found by the IDs of item and loanee",
"properties": {
"itemId": {
"description": "ID of the item to be renewed",
"type": "string",
"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}$"
},
"userId": {
"description": "ID of the user (representing the patron) the item has been loaned to",
"type": "string",
"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}$"
}
},
"additionalProperties": false,
"required": [
"itemId",
"userId"
]
}
Example:
{
"userId": "6c4706ad-3a76-4251-b030-4609027a7918",
"itemId": "51763f82-c8e6-4486-9fdc-1c1664352550"
}
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Loan",
"description": "Links the item with the patron and applies certain conditions based on policies",
"properties": {
"id": {
"description": "Unique ID (generated UUID) of the loan",
"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}$"
},
"userId": {
"description": "ID of the patron the item was lent to. Required for open loans, not required for closed loans (for anonymization).",
"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}$"
},
"borrower": {
"description": "Additional information about the borrower of the item, taken from the user referred to by the userId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode used to identify the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"proxyUserId": {
"description": "ID of the user representing a proxy for the patron",
"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}$"
},
"itemId": {
"description": "ID of the item lent to the patron",
"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}$"
},
"loanPolicyId": {
"description": "ID of last policy used in relation to this loan",
"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}$"
},
"loanPolicy": {
"description": "Additional information about the loan policy of the item, taken from the loan loanPolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"overdueFinePolicyId": {
"description": "ID of last overdue fine policy used in relation to this loan",
"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}$"
},
"overdueFinePolicy": {
"description": "Additional information about the overdue fine policy of the item, taken from the loan overdueFinePolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last overdue fine policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"lostItemPolicyId": {
"description": "ID of last lost item policy used in relation to this loan",
"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}$"
},
"lostItemPolicy": {
"description": "Additional information about the lost item policy of the item, taken from the loan lostItemPolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last lost item policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"item": {
"description": "Additional information about the item",
"type": "object",
"readonly": true,
"properties": {
"id": {
"description": "ID of the item",
"type": "string",
"readonly": true,
"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}$"
},
"title": {
"description": "The title of the item lent to the patron",
"type": "string",
"readonly": true
},
"callNumber": {
"description": "Deprecated call number from the holdings record, use callNumberComponents.callNumber instead",
"type": "string",
"readonly": true
},
"copyNumber": {
"description": "Item copy number",
"type": "string",
"readonly": true
},
"materialType": {
"description": "The material type from the item record",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the material type",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"contributors": {
"description": "Contributors from the instance record",
"type": "array",
"readonly": true,
"items": {
"type": "object",
"properties": {
"name": {
"description": "Name of the contributor",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
}
},
"holdingsRecordId": {
"description": "The ID of the holdings for the item",
"type": "string",
"readonly": true,
"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}$"
},
"instanceId": {
"description": "The ID of the instance for the item",
"type": "string",
"readonly": true,
"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}$"
},
"barcode": {
"description": "The barcode of the item",
"type": "string",
"readonly": true
},
"location": {
"description": "The effective location of the item",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "The name of the location",
"type": "string",
"readonly": true
}
}
},
"status": {
"description": "Overall status of the item",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the item status",
"type": "string",
"readonly": true
},
"date": {
"type": "string",
"description": "Date time when status was last changed",
"format": "date-time",
"readonly": true
}
},
"additionalProperties": false
},
"inTransitDestinationServicePointId": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "string",
"readonly": true,
"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}$"
},
"inTransitDestinationServicePoint": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the service point",
"type": "string",
"readonly": true
}
}
},
"enumeration": {
"description": "Item`s enumeration",
"type": "string",
"readonly": true
},
"chronology": {
"description": "Item`s chronology",
"type": "string",
"readonly": true
},
"volume": {
"description": "Item`s volume",
"type": "string",
"readonly": true
},
"callNumberComponents": {
"description": "Elements of a full call number",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"callNumber": {
"type": "string",
"description": "Call number for item",
"readonly": true
},
"prefix": {
"description": "Call number prefix for item",
"type": "string",
"readonly": true
},
"suffix": {
"description": "Call number suffix for item",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"itemEffectiveLocationIdAtCheckOut": {
"description": "The effective location, at the time of checkout, of the item loaned to the patron.",
"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}$"
},
"status": {
"description": "Overall status of the loan",
"type": "object",
"properties": {
"name": {
"description": "Name of the status (currently can be any value, values commonly used are Open and Closed)",
"type": "string"
}
}
},
"loanDate": {
"description": "Date and time when the loan began",
"type": "string",
"format": "date-time"
},
"dueDate": {
"description": "Date and time when the item is due to be returned",
"type": "string",
"format": "date-time"
},
"returnDate": {
"description": "Date and time when the item was returned",
"type": "string",
"format": "date-time"
},
"systemReturnDate": {
"description": "Date and time when return was processed",
"type": "string",
"format": "date-time"
},
"action": {
"description": "Last action performed on a loan (currently can be any value, values commonly used are checkedout and checkedin)",
"type": "string"
},
"actionComment": {
"description": "Last action performed on a loan comments",
"type": "string"
},
"renewalCount": {
"description": "Count of how many times a loan has been renewed (incremented by the client)",
"type": "integer",
"minimum": 0
},
"dueDateChangedByRecall": {
"description": "Is due date changed by recall request",
"type": "boolean",
"readonly": true
},
"dueDateChangedByNearExpireUser": {
"description": "Indicates whether or not this loan had its due date modified by a expired user",
"type": "boolean"
},
"dueDateChangedByHold": {
"description": "Is due date changed by hold request",
"type": "boolean",
"readonly": true
},
"checkoutServicePointId": {
"description": "ID of the Service Point where the last checkout occured",
"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}$"
},
"checkinServicePointId": {
"description": "ID of the Service Point where the last checkin occured",
"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}$"
},
"checkoutServicePoint": {
"description": "Service Point where the last checkout occurred",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"name": {
"description": "Unique name of the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Short code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human readable name",
"type": "string",
"readonly": true
},
"description": {
"description": "Service Point description data",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Time to shelving",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this a pickup location",
"type": "boolean",
"readonly": true
},
"holdShelfClosedLibraryDateManagement": {
"description": "Hold shelf closed date strategy",
"type": "string",
"readonly": true
}
}
},
"checkinServicePoint": {
"description": "Service Point where the last checkin occurred",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"name": {
"description": "Unique name of the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Short code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human readable name",
"type": "string",
"readonly": true
},
"description": {
"description": "Service Point description data",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Time to shelving",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this a pickup location",
"type": "boolean",
"readonly": true
},
"holdShelfClosedLibraryDateManagement": {
"description": "Hold shelf closed date strategy",
"type": "string",
"readonly": true
}
}
},
"patronGroupAtCheckout": {
"description": "Patron Group at checkout",
"type": "object",
"properties": {
"id": {
"description": "Unique ID (generated UUID) of the patron group",
"type": "string",
"readonly": true,
"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": "Patron group name",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"feesAndFines": {
"description": "Fees and fines associated with loans",
"type": "object",
"properties": {
"amountRemainingToPay": {
"type": "number",
"description": "Total remaining amount due on fees and fines for the loan (read only, defined by the server)",
"readonly": true
}
},
"additionalProperties": false
},
"declaredLostDate": {
"description": "Date and time the item was declared lost during this loan",
"type": "string",
"format": "date-time"
},
"metadata": {
"description": "Metadata about creation and changes to loan, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"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}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"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}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"required": [
"itemId",
"loanDate",
"action"
]
}
Example:
{
"id": "cf23adf0-61ba-4887-bf82-956c4aae2260",
"userId": "df7f4993-8c14-4a0f-ab63-93975ab01c76",
"proxyUserId": "346ad017-dac1-417d-9ed8-0ac7eeb886aa",
"itemId": "cb20f34f-b773-462f-a091-b233cc96b9e6",
"item": {
"title": "The Long Way to a Small, Angry Planet",
"barcode": "036000291452",
"status": {
"name": "Checked out"
},
"location": {
"name": "Main Library"
},
"materialType": {
"name": "Book"
},
"contributors": [
{
"name": "Steve Jones"
}
]
},
"loanPolicyId" : "e9af4ba4-6801-4722-be45-d7a49d13564d",
"loanPolicy": {
"name" : "Can Circulate Rolling"
},
"overdueFinePolicyId": "b59fe39f-efdc-4a88-993a-04fb405e5ecc",
"overdueFinePolicy": {
"name": "Overdue fine policy"
},
"lostItemPolicyId": "ea77439c-9ff5-4c37-8c92-0df02576c873",
"lostItemPolicy": {
"name": "Lost item policy"
},
"borrower" : {
"firstName" : "FirstName",
"lastName" : "LastName",
"middleName" : "MiddleName",
"barcode" : "102322966933815"
},
"loanDate": "2017-03-01T23:11:00.000Z",
"dueDate": "2017-04-01T23:11:00.000Z",
"checkoutServicePointId": "e9af4ba4-6801-4722-bf45-d7a49d54564d",
"checkinServicePointId": "e9af4ba4-6801-4722-bf45-d7a49d54564d",
"status": {
"name": "Open"
},
"action": "checkedout",
"renewalCount": 0
}
HTTP status code 201
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Loan",
"description": "Links the item with the patron and applies certain conditions based on policies",
"properties": {
"id": {
"description": "Unique ID (generated UUID) of the loan",
"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}$"
},
"userId": {
"description": "ID of the patron the item was lent to. Required for open loans, not required for closed loans (for anonymization).",
"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}$"
},
"borrower": {
"description": "Additional information about the borrower of the item, taken from the user referred to by the userId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode used to identify the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"proxyUserId": {
"description": "ID of the user representing a proxy for the patron",
"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}$"
},
"itemId": {
"description": "ID of the item lent to the patron",
"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}$"
},
"loanPolicyId": {
"description": "ID of last policy used in relation to this loan",
"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}$"
},
"loanPolicy": {
"description": "Additional information about the loan policy of the item, taken from the loan loanPolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"overdueFinePolicyId": {
"description": "ID of last overdue fine policy used in relation to this loan",
"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}$"
},
"overdueFinePolicy": {
"description": "Additional information about the overdue fine policy of the item, taken from the loan overdueFinePolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last overdue fine policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"lostItemPolicyId": {
"description": "ID of last lost item policy used in relation to this loan",
"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}$"
},
"lostItemPolicy": {
"description": "Additional information about the lost item policy of the item, taken from the loan lostItemPolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last lost item policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"item": {
"description": "Additional information about the item",
"type": "object",
"readonly": true,
"properties": {
"id": {
"description": "ID of the item",
"type": "string",
"readonly": true,
"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}$"
},
"title": {
"description": "The title of the item lent to the patron",
"type": "string",
"readonly": true
},
"callNumber": {
"description": "Deprecated call number from the holdings record, use callNumberComponents.callNumber instead",
"type": "string",
"readonly": true
},
"copyNumber": {
"description": "Item copy number",
"type": "string",
"readonly": true
},
"materialType": {
"description": "The material type from the item record",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the material type",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"contributors": {
"description": "Contributors from the instance record",
"type": "array",
"readonly": true,
"items": {
"type": "object",
"properties": {
"name": {
"description": "Name of the contributor",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
}
},
"holdingsRecordId": {
"description": "The ID of the holdings for the item",
"type": "string",
"readonly": true,
"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}$"
},
"instanceId": {
"description": "The ID of the instance for the item",
"type": "string",
"readonly": true,
"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}$"
},
"barcode": {
"description": "The barcode of the item",
"type": "string",
"readonly": true
},
"location": {
"description": "The effective location of the item",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "The name of the location",
"type": "string",
"readonly": true
}
}
},
"status": {
"description": "Overall status of the item",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the item status",
"type": "string",
"readonly": true
},
"date": {
"type": "string",
"description": "Date time when status was last changed",
"format": "date-time",
"readonly": true
}
},
"additionalProperties": false
},
"inTransitDestinationServicePointId": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "string",
"readonly": true,
"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}$"
},
"inTransitDestinationServicePoint": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the service point",
"type": "string",
"readonly": true
}
}
},
"enumeration": {
"description": "Item`s enumeration",
"type": "string",
"readonly": true
},
"chronology": {
"description": "Item`s chronology",
"type": "string",
"readonly": true
},
"volume": {
"description": "Item`s volume",
"type": "string",
"readonly": true
},
"callNumberComponents": {
"description": "Elements of a full call number",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"callNumber": {
"type": "string",
"description": "Call number for item",
"readonly": true
},
"prefix": {
"description": "Call number prefix for item",
"type": "string",
"readonly": true
},
"suffix": {
"description": "Call number suffix for item",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"itemEffectiveLocationIdAtCheckOut": {
"description": "The effective location, at the time of checkout, of the item loaned to the patron.",
"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}$"
},
"status": {
"description": "Overall status of the loan",
"type": "object",
"properties": {
"name": {
"description": "Name of the status (currently can be any value, values commonly used are Open and Closed)",
"type": "string"
}
}
},
"loanDate": {
"description": "Date and time when the loan began",
"type": "string",
"format": "date-time"
},
"dueDate": {
"description": "Date and time when the item is due to be returned",
"type": "string",
"format": "date-time"
},
"returnDate": {
"description": "Date and time when the item was returned",
"type": "string",
"format": "date-time"
},
"systemReturnDate": {
"description": "Date and time when return was processed",
"type": "string",
"format": "date-time"
},
"action": {
"description": "Last action performed on a loan (currently can be any value, values commonly used are checkedout and checkedin)",
"type": "string"
},
"actionComment": {
"description": "Last action performed on a loan comments",
"type": "string"
},
"renewalCount": {
"description": "Count of how many times a loan has been renewed (incremented by the client)",
"type": "integer",
"minimum": 0
},
"dueDateChangedByRecall": {
"description": "Is due date changed by recall request",
"type": "boolean",
"readonly": true
},
"dueDateChangedByNearExpireUser": {
"description": "Indicates whether or not this loan had its due date modified by a expired user",
"type": "boolean"
},
"dueDateChangedByHold": {
"description": "Is due date changed by hold request",
"type": "boolean",
"readonly": true
},
"checkoutServicePointId": {
"description": "ID of the Service Point where the last checkout occured",
"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}$"
},
"checkinServicePointId": {
"description": "ID of the Service Point where the last checkin occured",
"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}$"
},
"checkoutServicePoint": {
"description": "Service Point where the last checkout occurred",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"name": {
"description": "Unique name of the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Short code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human readable name",
"type": "string",
"readonly": true
},
"description": {
"description": "Service Point description data",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Time to shelving",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this a pickup location",
"type": "boolean",
"readonly": true
},
"holdShelfClosedLibraryDateManagement": {
"description": "Hold shelf closed date strategy",
"type": "string",
"readonly": true
}
}
},
"checkinServicePoint": {
"description": "Service Point where the last checkin occurred",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"name": {
"description": "Unique name of the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Short code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human readable name",
"type": "string",
"readonly": true
},
"description": {
"description": "Service Point description data",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Time to shelving",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this a pickup location",
"type": "boolean",
"readonly": true
},
"holdShelfClosedLibraryDateManagement": {
"description": "Hold shelf closed date strategy",
"type": "string",
"readonly": true
}
}
},
"patronGroupAtCheckout": {
"description": "Patron Group at checkout",
"type": "object",
"properties": {
"id": {
"description": "Unique ID (generated UUID) of the patron group",
"type": "string",
"readonly": true,
"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": "Patron group name",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"feesAndFines": {
"description": "Fees and fines associated with loans",
"type": "object",
"properties": {
"amountRemainingToPay": {
"type": "number",
"description": "Total remaining amount due on fees and fines for the loan (read only, defined by the server)",
"readonly": true
}
},
"additionalProperties": false
},
"declaredLostDate": {
"description": "Date and time the item was declared lost during this loan",
"type": "string",
"format": "date-time"
},
"metadata": {
"description": "Metadata about creation and changes to loan, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"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}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"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}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"required": [
"itemId",
"loanDate",
"action"
]
}
Example:
{
"id": "cf23adf0-61ba-4887-bf82-956c4aae2260",
"userId": "df7f4993-8c14-4a0f-ab63-93975ab01c76",
"proxyUserId": "346ad017-dac1-417d-9ed8-0ac7eeb886aa",
"itemId": "cb20f34f-b773-462f-a091-b233cc96b9e6",
"item": {
"title": "The Long Way to a Small, Angry Planet",
"barcode": "036000291452",
"status": {
"name": "Checked out"
},
"location": {
"name": "Main Library"
},
"materialType": {
"name": "Book"
},
"contributors": [
{
"name": "Steve Jones"
}
]
},
"loanPolicyId" : "e9af4ba4-6801-4722-be45-d7a49d13564d",
"loanPolicy": {
"name" : "Can Circulate Rolling"
},
"overdueFinePolicyId": "b59fe39f-efdc-4a88-993a-04fb405e5ecc",
"overdueFinePolicy": {
"name": "Overdue fine policy"
},
"lostItemPolicyId": "ea77439c-9ff5-4c37-8c92-0df02576c873",
"lostItemPolicy": {
"name": "Lost item policy"
},
"borrower" : {
"firstName" : "FirstName",
"lastName" : "LastName",
"middleName" : "MiddleName",
"barcode" : "102322966933815"
},
"loanDate": "2017-03-01T23:11:00.000Z",
"dueDate": "2017-04-01T23:11:00.000Z",
"checkoutServicePointId": "e9af4ba4-6801-4722-bf45-d7a49d54564d",
"checkinServicePointId": "e9af4ba4-6801-4722-bf45-d7a49d54564d",
"status": {
"name": "Open"
},
"action": "checkedout",
"renewalCount": 0
}
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A collection of extended errors",
"type": "object",
"properties": {
"errors": {
"description": "List of extended errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An extended error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
"overridableBlock": {
"type": "object",
"description": "Details of an overridable block the error is related to",
"properties": {
"name": {
"type": "string",
"description": "Name of the block",
"enum": [
"patronBlock",
"itemLimitBlock",
"itemNotLoanableBlock"
]
},
"missingPermissions": {
"type": "array",
"description": "Missing Okapi permissions required to override the block",
"items": {
"type": "string"
}
}
},
"required": [
"name",
"missingPermissions"
]
}
},
"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
Body
Media type: text/plain
Type: any
Example:
Internal server error
Updates the status of an existing loan
post /circulation/check-in-by-barcode
Updates the status of an existing loan
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Request to check in an item at a service point (including when a loan is returned)",
"properties": {
"itemBarcode": {
"description": "Barcode of the item to be checked in",
"type": "string"
},
"servicePointId": {
"description": "Service point where the item is being processed",
"type": "string",
"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}$"
},
"checkInDate": {
"description": "When the item was checked in",
"type": "string",
"format": "date-time"
},
"claimedReturnedResolution": {
"description": "Describes how the library resolved the situation where an item that was claimed returned",
"type": "string",
"enum": [
"Found by library",
"Returned by patron"
]
}
},
"additionalProperties": false,
"required": [
"itemBarcode",
"checkInDate",
"servicePointId"
]
}
Example:
{
"itemBarcode": "2887532577331",
"servicePointId": "8359f2bc-b83e-48e1-8a5b-ca1a74e840de",
"checkInDate": "2018-03-05T14:23:41.000Z"
}
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Success response for checking in an item at a service point",
"properties": {
"loan": {
"description": "Loan affected by the check in (may be none, if a receiving check in)",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Loan",
"properties": {
"id": {
"description": "Unique ID (generated UUID) of the loan",
"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}$"
},
"userId": {
"description": "ID of the patron the item was lent to. Required for open loans, not required for closed loans (for anonymization).",
"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}$"
},
"borrower": {
"description": "Additional information about the borrower of the item, taken from the user referred to by the userId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode used to identify the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"proxyUserId": {
"description": "ID of the user representing a proxy for the patron",
"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}$"
},
"itemId": {
"description": "ID of the item lent to the patron",
"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}$"
},
"loanPolicyId": {
"description": "ID of last policy used in relation to this loan",
"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}$"
},
"loanPolicy": {
"description": "Additional information about the loan policy of the item, taken from the loan loanPolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"overdueFinePolicyId": {
"description": "ID of last overdue fine policy used in relation to this loan",
"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}$"
},
"overdueFinePolicy": {
"description": "Additional information about the overdue fine policy of the item, taken from the loan overdueFinePolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last overdue fine policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"lostItemPolicyId": {
"description": "ID of last lost item policy used in relation to this loan",
"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}$"
},
"lostItemPolicy": {
"description": "Additional information about the lost item policy of the item, taken from the loan lostItemPolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last lost item policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"item": {
"description": "Additional information about the item",
"type": "object",
"readonly": true,
"properties": {
"id": {
"description": "ID of the item",
"type": "string",
"readonly": true,
"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}$"
},
"title": {
"description": "The title of the item lent to the patron",
"type": "string",
"readonly": true
},
"callNumber": {
"description": "Deprecated call number from the holdings record, use callNumberComponents.callNumber instead",
"type": "string",
"readonly": true
},
"copyNumber": {
"description": "Item copy number",
"type": "string",
"readonly": true
},
"materialType": {
"description": "The material type from the item record",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the material type",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"contributors": {
"description": "Contributors from the instance record",
"type": "array",
"readonly": true,
"items": {
"type": "object",
"properties": {
"name": {
"description": "Name of the contributor",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
}
},
"holdingsRecordId": {
"description": "The ID of the holdings for the item",
"type": "string",
"readonly": true,
"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}$"
},
"instanceId": {
"description": "The ID of the instance for the item",
"type": "string",
"readonly": true,
"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}$"
},
"barcode": {
"description": "The barcode of the item",
"type": "string",
"readonly": true
},
"location": {
"description": "The effective location of the item",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "The name of the location",
"type": "string",
"readonly": true
}
}
},
"status": {
"description": "Overall status of the item",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the item status",
"type": "string",
"readonly": true
},
"date": {
"type": "string",
"description": "Date time when status was last changed",
"format": "date-time",
"readonly": true
}
},
"additionalProperties": false
},
"inTransitDestinationServicePointId": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "string",
"readonly": true,
"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}$"
},
"inTransitDestinationServicePoint": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the service point",
"type": "string",
"readonly": true
}
}
},
"enumeration": {
"description": "Item`s enumeration",
"type": "string",
"readonly": true
},
"chronology": {
"description": "Item`s chronology",
"type": "string",
"readonly": true
},
"volume": {
"description": "Item`s volume",
"type": "string",
"readonly": true
},
"callNumberComponents": {
"description": "Elements of a full call number",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"callNumber": {
"type": "string",
"description": "Call number for item",
"readonly": true
},
"prefix": {
"description": "Call number prefix for item",
"type": "string",
"readonly": true
},
"suffix": {
"description": "Call number suffix for item",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"itemEffectiveLocationIdAtCheckOut": {
"description": "The effective location, at the time of checkout, of the item loaned to the patron.",
"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}$"
},
"status": {
"description": "Overall status of the loan",
"type": "object",
"properties": {
"name": {
"description": "Name of the status (currently can be any value, values commonly used are Open and Closed)",
"type": "string"
}
}
},
"loanDate": {
"description": "Date and time when the loan began",
"type": "string",
"format": "date-time"
},
"dueDate": {
"description": "Date and time when the item is due to be returned",
"type": "string",
"format": "date-time"
},
"returnDate": {
"description": "Date and time when the item was returned",
"type": "string",
"format": "date-time"
},
"systemReturnDate": {
"description": "Date and time when return was processed",
"type": "string",
"format": "date-time"
},
"action": {
"description": "Last action performed on a loan (currently can be any value, values commonly used are checkedout and checkedin)",
"type": "string"
},
"actionComment": {
"description": "Last action performed on a loan comments",
"type": "string"
},
"renewalCount": {
"description": "Count of how many times a loan has been renewed (incremented by the client)",
"type": "integer",
"minimum": 0
},
"dueDateChangedByRecall": {
"description": "Is due date changed by recall request",
"type": "boolean",
"readonly": true
},
"dueDateChangedByNearExpireUser": {
"description": "Indicates whether or not this loan had its due date modified by a expired user",
"type": "boolean"
},
"dueDateChangedByHold": {
"description": "Is due date changed by hold request",
"type": "boolean",
"readonly": true
},
"checkoutServicePointId": {
"description": "ID of the Service Point where the last checkout occured",
"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}$"
},
"checkinServicePointId": {
"description": "ID of the Service Point where the last checkin occured",
"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}$"
},
"checkoutServicePoint": {
"description": "Service Point where the last checkout occurred",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"name": {
"description": "Unique name of the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Short code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human readable name",
"type": "string",
"readonly": true
},
"description": {
"description": "Service Point description data",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Time to shelving",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this a pickup location",
"type": "boolean",
"readonly": true
},
"holdShelfClosedLibraryDateManagement": {
"description": "Hold shelf closed date strategy",
"type": "string",
"readonly": true
}
}
},
"checkinServicePoint": {
"description": "Service Point where the last checkin occurred",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"name": {
"description": "Unique name of the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Short code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human readable name",
"type": "string",
"readonly": true
},
"description": {
"description": "Service Point description data",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Time to shelving",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this a pickup location",
"type": "boolean",
"readonly": true
},
"holdShelfClosedLibraryDateManagement": {
"description": "Hold shelf closed date strategy",
"type": "string",
"readonly": true
}
}
},
"patronGroupAtCheckout": {
"description": "Patron Group at checkout",
"type": "object",
"properties": {
"id": {
"description": "Unique ID (generated UUID) of the patron group",
"type": "string",
"readonly": true,
"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": "Patron group name",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"feesAndFines": {
"description": "Fees and fines associated with loans",
"type": "object",
"properties": {
"amountRemainingToPay": {
"type": "number",
"description": "Total remaining amount due on fees and fines for the loan (read only, defined by the server)",
"readonly": true
}
},
"additionalProperties": false
},
"declaredLostDate": {
"description": "Date and time the item was declared lost during this loan",
"type": "string",
"format": "date-time"
},
"metadata": {
"description": "Metadata about creation and changes to loan, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"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}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"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}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"required": [
"itemId",
"loanDate",
"action"
]
},
"item": {
"description": "Additional information about the item",
"type": "object",
"properties": {
"id": {
"description": "ID of the item",
"type": "string"
},
"title": {
"description": "The title of the item lent to the patron",
"type": "string"
},
"callNumber": {
"description": "The call number from the holdings record",
"type": "string"
},
"materialType": {
"description": "The material type from the item record",
"type": "object",
"properties": {
"name": {
"description": "Name of the material type",
"type": "string"
}
},
"additionalProperties": false
},
"contributors": {
"description": "Contributors from the instance record",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Name of the contributor",
"type": "string"
}
},
"additionalProperties": false
}
},
"holdingsRecordId": {
"description": "The ID of the holdings for the item",
"type": "string"
},
"instanceId": {
"description": "The ID of the instance for the item",
"type": "string"
},
"barcode": {
"description": "The barcode of the item",
"type": "string"
},
"location": {
"description": "The effective location of the item",
"type": "object",
"properties": {
"name": {
"description": "The name of the location",
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"description": "Overall status of the item",
"type": "object",
"properties": {
"name": {
"description": "Name of the item status",
"type": "string"
},
"date": {
"type": "string",
"description": "Date time when status was last changed",
"format": "date-time"
}
},
"additionalProperties": false
},
"enumeration": {
"description": "Item`s enumeration",
"type": "string"
},
"chronology": {
"description": "Chronology is the descriptive information for the dating scheme of a serial.",
"type": "string"
},
"volume": {
"description": "Volume is intended for monographs when a multipart monograph (e.g. a biography of George Bernard Shaw in three volumes).",
"type": "string"
},
"inTransitDestinationServicePointId": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "string",
"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}$"
},
"inTransitDestinationServicePoint": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "object",
"properties": {
"name": {
"description": "Name of the service point",
"type": "string"
}
}
}
},
"additionalProperties": false
},
"staffSlipContext": {
"description": "Context for staff slip tokens",
"type": "object"
},
"inHouseUse": {
"type": "boolean",
"description": "Defines whether the current check-in operation considered as in-house use or not."
}
},
"additionalProperties": false
}
Example:
{
"loan": {
"id": "cf23adf0-61ba-4887-bf82-956c4aae2260",
"userId": "df7f4993-8c14-4a0f-ab63-93975ab01c76",
"proxyUserId": "346ad017-dac1-417d-9ed8-0ac7eeb886aa",
"itemId": "cb20f34f-b773-462f-a091-b233cc96b9e6",
"item": {
"title": "The Long Way to a Small, Angry Planet",
"barcode": "036000291452",
"status": {
"name": "Checked out"
},
"location": {
"name": "Main Library"
},
"materialType": {
"name": "Book"
},
"contributors": [
{
"name": "Steve Jones"
}
]
},
"loanDate": "2017-03-01T23:11:00.000Z",
"dueDate": "2017-04-01T23:11:00.000Z",
"checkoutServicePointId": "e9af4ba4-6801-4722-bf45-d7a49d54564d",
"checkinServicePointId": "e9af4ba4-6801-4722-bf45-d7a49d54564d",
"status": {
"name": "Open"
},
"action": "checkedout",
"renewalCount": 0
},
"staffSlipContext": {
"requester": {
"firstName": "James",
"lastName": "Smith"
},
"item": {
"title": "The Long Way to a Small, Angry Planet",
"callNumber": "TK7871.15.F4 S67 1988"
}
}
}
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A collection of extended errors",
"type": "object",
"properties": {
"errors": {
"description": "List of extended errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An extended error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
"overridableBlock": {
"type": "object",
"description": "Details of an overridable block the error is related to",
"properties": {
"name": {
"type": "string",
"description": "Name of the block",
"enum": [
"patronBlock",
"itemLimitBlock",
"itemNotLoanableBlock"
]
},
"missingPermissions": {
"type": "array",
"description": "Missing Okapi permissions required to override the block",
"items": {
"type": "string"
}
}
},
"required": [
"name",
"missingPermissions"
]
}
},
"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
Body
Media type: text/plain
Type: any
Example:
Internal server error
Collection of loan items.
Retrieve a list of loan items.
Create a new loan item.
get /circulation/loans
Retrieve a list of loan items.
Query Parameters
- 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
- 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.
by title (using CQL)
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode userId="cf23adf0-61ba-4887-bf82-956c4aae2260"
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
HTTP status code 200
Returns a list of loan items
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Collection of loans",
"description": "Collection of loans",
"type": "object",
"properties": {
"loans": {
"description": "Paged collection of loans",
"id": "loans",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Loan",
"description": "Links the item with the patron and applies certain conditions based on policies",
"properties": {
"id": {
"description": "Unique ID (generated UUID) of the loan",
"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}$"
},
"userId": {
"description": "ID of the patron the item was lent to. Required for open loans, not required for closed loans (for anonymization).",
"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}$"
},
"borrower": {
"description": "Additional information about the borrower of the item, taken from the user referred to by the userId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode used to identify the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"proxyUserId": {
"description": "ID of the user representing a proxy for the patron",
"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}$"
},
"itemId": {
"description": "ID of the item lent to the patron",
"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}$"
},
"loanPolicyId": {
"description": "ID of last policy used in relation to this loan",
"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}$"
},
"loanPolicy": {
"description": "Additional information about the loan policy of the item, taken from the loan loanPolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"overdueFinePolicyId": {
"description": "ID of last overdue fine policy used in relation to this loan",
"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}$"
},
"overdueFinePolicy": {
"description": "Additional information about the overdue fine policy of the item, taken from the loan overdueFinePolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last overdue fine policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"lostItemPolicyId": {
"description": "ID of last lost item policy used in relation to this loan",
"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}$"
},
"lostItemPolicy": {
"description": "Additional information about the lost item policy of the item, taken from the loan lostItemPolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last lost item policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"item": {
"description": "Additional information about the item",
"type": "object",
"readonly": true,
"properties": {
"id": {
"description": "ID of the item",
"type": "string",
"readonly": true,
"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}$"
},
"title": {
"description": "The title of the item lent to the patron",
"type": "string",
"readonly": true
},
"callNumber": {
"description": "Deprecated call number from the holdings record, use callNumberComponents.callNumber instead",
"type": "string",
"readonly": true
},
"copyNumber": {
"description": "Item copy number",
"type": "string",
"readonly": true
},
"materialType": {
"description": "The material type from the item record",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the material type",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"contributors": {
"description": "Contributors from the instance record",
"type": "array",
"readonly": true,
"items": {
"type": "object",
"properties": {
"name": {
"description": "Name of the contributor",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
}
},
"holdingsRecordId": {
"description": "The ID of the holdings for the item",
"type": "string",
"readonly": true,
"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}$"
},
"instanceId": {
"description": "The ID of the instance for the item",
"type": "string",
"readonly": true,
"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}$"
},
"barcode": {
"description": "The barcode of the item",
"type": "string",
"readonly": true
},
"location": {
"description": "The effective location of the item",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "The name of the location",
"type": "string",
"readonly": true
}
}
},
"status": {
"description": "Overall status of the item",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the item status",
"type": "string",
"readonly": true
},
"date": {
"type": "string",
"description": "Date time when status was last changed",
"format": "date-time",
"readonly": true
}
},
"additionalProperties": false
},
"inTransitDestinationServicePointId": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "string",
"readonly": true,
"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}$"
},
"inTransitDestinationServicePoint": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the service point",
"type": "string",
"readonly": true
}
}
},
"enumeration": {
"description": "Item`s enumeration",
"type": "string",
"readonly": true
},
"chronology": {
"description": "Item`s chronology",
"type": "string",
"readonly": true
},
"volume": {
"description": "Item`s volume",
"type": "string",
"readonly": true
},
"callNumberComponents": {
"description": "Elements of a full call number",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"callNumber": {
"type": "string",
"description": "Call number for item",
"readonly": true
},
"prefix": {
"description": "Call number prefix for item",
"type": "string",
"readonly": true
},
"suffix": {
"description": "Call number suffix for item",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"itemEffectiveLocationIdAtCheckOut": {
"description": "The effective location, at the time of checkout, of the item loaned to the patron.",
"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}$"
},
"status": {
"description": "Overall status of the loan",
"type": "object",
"properties": {
"name": {
"description": "Name of the status (currently can be any value, values commonly used are Open and Closed)",
"type": "string"
}
}
},
"loanDate": {
"description": "Date and time when the loan began",
"type": "string",
"format": "date-time"
},
"dueDate": {
"description": "Date and time when the item is due to be returned",
"type": "string",
"format": "date-time"
},
"returnDate": {
"description": "Date and time when the item was returned",
"type": "string",
"format": "date-time"
},
"systemReturnDate": {
"description": "Date and time when return was processed",
"type": "string",
"format": "date-time"
},
"action": {
"description": "Last action performed on a loan (currently can be any value, values commonly used are checkedout and checkedin)",
"type": "string"
},
"actionComment": {
"description": "Last action performed on a loan comments",
"type": "string"
},
"renewalCount": {
"description": "Count of how many times a loan has been renewed (incremented by the client)",
"type": "integer",
"minimum": 0
},
"dueDateChangedByRecall": {
"description": "Is due date changed by recall request",
"type": "boolean",
"readonly": true
},
"dueDateChangedByNearExpireUser": {
"description": "Indicates whether or not this loan had its due date modified by a expired user",
"type": "boolean"
},
"dueDateChangedByHold": {
"description": "Is due date changed by hold request",
"type": "boolean",
"readonly": true
},
"checkoutServicePointId": {
"description": "ID of the Service Point where the last checkout occured",
"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}$"
},
"checkinServicePointId": {
"description": "ID of the Service Point where the last checkin occured",
"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}$"
},
"checkoutServicePoint": {
"description": "Service Point where the last checkout occurred",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"name": {
"description": "Unique name of the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Short code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human readable name",
"type": "string",
"readonly": true
},
"description": {
"description": "Service Point description data",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Time to shelving",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this a pickup location",
"type": "boolean",
"readonly": true
},
"holdShelfClosedLibraryDateManagement": {
"description": "Hold shelf closed date strategy",
"type": "string",
"readonly": true
}
}
},
"checkinServicePoint": {
"description": "Service Point where the last checkin occurred",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"name": {
"description": "Unique name of the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Short code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human readable name",
"type": "string",
"readonly": true
},
"description": {
"description": "Service Point description data",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Time to shelving",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this a pickup location",
"type": "boolean",
"readonly": true
},
"holdShelfClosedLibraryDateManagement": {
"description": "Hold shelf closed date strategy",
"type": "string",
"readonly": true
}
}
},
"patronGroupAtCheckout": {
"description": "Patron Group at checkout",
"type": "object",
"properties": {
"id": {
"description": "Unique ID (generated UUID) of the patron group",
"type": "string",
"readonly": true,
"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": "Patron group name",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"feesAndFines": {
"description": "Fees and fines associated with loans",
"type": "object",
"properties": {
"amountRemainingToPay": {
"type": "number",
"description": "Total remaining amount due on fees and fines for the loan (read only, defined by the server)",
"readonly": true
}
},
"additionalProperties": false
},
"declaredLostDate": {
"description": "Date and time the item was declared lost during this loan",
"type": "string",
"format": "date-time"
},
"metadata": {
"description": "Metadata about creation and changes to loan, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"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}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"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}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"required": [
"itemId",
"loanDate",
"action"
]
}
},
"totalRecords": {
"description": "Total number of loan records",
"type": "integer"
}
},
"required": [
"loans",
"totalRecords"
]
}
Example:
{
"loans": [
{
"id": "cf23adf0-61ba-4887-bf82-956c4aae2260",
"userId": "df7f4993-8c14-4a0f-ab63-93975ab01c76",
"proxyUserId": "346ad017-dac1-417d-9ed8-0ac7eeb886aa",
"itemId": "cb20f34f-b773-462f-a091-b233cc96b9e6",
"item": {
"title": "The Long Way to a Small, Angry Planet",
"barcode": "036000291452",
"status": {
"name": "Checked out"
}
},
"loanDate": "2017-03-01T22:34:11Z",
"dueDate": "2017-04-01T22:34:11.000Z",
"status": {
"name": "Open"
},
"location": {
"name": "Main Library"
},
"action": "checkedout",
"renewalCount": 1,
"loanPolicyId" : "e2af3ba4-6801-4722-be45-d7a49d13564d",
"loanPolicy": {
"name" : "Can Circulate Rolling"
},
"borrower" : {
"firstName" : "FirstName",
"lastName" : "LastName",
"middleName" : "MiddleName",
"barcode" : "109322966913845"
}
},
{
"id": "1d09af65-aeaa-499c-80cb-d52847b75a60",
"userId": "15054e48-03e8-4ed5-810b-7192b86accab",
"itemId": "94838fa2-288a-45c2-ad19-9102f5645127",
"item": {
"title": "Nod",
"barcode": "565578437802",
"status": {
"name": "Available"
},
"location": {
"name": "Annex"
}
},
"loanDate": "2017-01-14T19:14:36Z",
"returnDate": "2017-01-16T09:15:23Z",
"status": {
"name": "Closed"
},
"action": "checkedin",
"loanPolicyId" : "e2af3ba4-6801-4722-be45-d7a49d13564d",
"loanPolicy": {
"name" : "Can Circulate Rolling"
},
"overdueFinePolicyId": "b59fe39f-efdc-4a88-993a-04fb405e5ecc",
"overdueFinePolicy": {
"name": "Overdue fine policy"
},
"lostItemPolicyId": "ea77439c-9ff5-4c37-8c92-0df02576c873",
"lostItemPolicy": {
"name": "Lost item policy"
},
"borrower" : {
"firstName" : "FirstName",
"lastName" : "LastName",
"middleName" : "MiddleName",
"barcode" : "102322966933845"
}
}
],
"totalRecords": 2
}
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 loans -- 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 loans -- 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
HTTP status code 501
Not implemented yet
post /circulation/loans
Create a new loan 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#",
"type": "object",
"title": "Loan",
"description": "Links the item with the patron and applies certain conditions based on policies",
"properties": {
"id": {
"description": "Unique ID (generated UUID) of the loan",
"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}$"
},
"userId": {
"description": "ID of the patron the item was lent to. Required for open loans, not required for closed loans (for anonymization).",
"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}$"
},
"borrower": {
"description": "Additional information about the borrower of the item, taken from the user referred to by the userId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode used to identify the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"proxyUserId": {
"description": "ID of the user representing a proxy for the patron",
"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}$"
},
"itemId": {
"description": "ID of the item lent to the patron",
"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}$"
},
"loanPolicyId": {
"description": "ID of last policy used in relation to this loan",
"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}$"
},
"loanPolicy": {
"description": "Additional information about the loan policy of the item, taken from the loan loanPolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"overdueFinePolicyId": {
"description": "ID of last overdue fine policy used in relation to this loan",
"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}$"
},
"overdueFinePolicy": {
"description": "Additional information about the overdue fine policy of the item, taken from the loan overdueFinePolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last overdue fine policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"lostItemPolicyId": {
"description": "ID of last lost item policy used in relation to this loan",
"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}$"
},
"lostItemPolicy": {
"description": "Additional information about the lost item policy of the item, taken from the loan lostItemPolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last lost item policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"item": {
"description": "Additional information about the item",
"type": "object",
"readonly": true,
"properties": {
"id": {
"description": "ID of the item",
"type": "string",
"readonly": true,
"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}$"
},
"title": {
"description": "The title of the item lent to the patron",
"type": "string",
"readonly": true
},
"callNumber": {
"description": "Deprecated call number from the holdings record, use callNumberComponents.callNumber instead",
"type": "string",
"readonly": true
},
"copyNumber": {
"description": "Item copy number",
"type": "string",
"readonly": true
},
"materialType": {
"description": "The material type from the item record",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the material type",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"contributors": {
"description": "Contributors from the instance record",
"type": "array",
"readonly": true,
"items": {
"type": "object",
"properties": {
"name": {
"description": "Name of the contributor",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
}
},
"holdingsRecordId": {
"description": "The ID of the holdings for the item",
"type": "string",
"readonly": true,
"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}$"
},
"instanceId": {
"description": "The ID of the instance for the item",
"type": "string",
"readonly": true,
"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}$"
},
"barcode": {
"description": "The barcode of the item",
"type": "string",
"readonly": true
},
"location": {
"description": "The effective location of the item",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "The name of the location",
"type": "string",
"readonly": true
}
}
},
"status": {
"description": "Overall status of the item",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the item status",
"type": "string",
"readonly": true
},
"date": {
"type": "string",
"description": "Date time when status was last changed",
"format": "date-time",
"readonly": true
}
},
"additionalProperties": false
},
"inTransitDestinationServicePointId": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "string",
"readonly": true,
"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}$"
},
"inTransitDestinationServicePoint": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the service point",
"type": "string",
"readonly": true
}
}
},
"enumeration": {
"description": "Item`s enumeration",
"type": "string",
"readonly": true
},
"chronology": {
"description": "Item`s chronology",
"type": "string",
"readonly": true
},
"volume": {
"description": "Item`s volume",
"type": "string",
"readonly": true
},
"callNumberComponents": {
"description": "Elements of a full call number",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"callNumber": {
"type": "string",
"description": "Call number for item",
"readonly": true
},
"prefix": {
"description": "Call number prefix for item",
"type": "string",
"readonly": true
},
"suffix": {
"description": "Call number suffix for item",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"itemEffectiveLocationIdAtCheckOut": {
"description": "The effective location, at the time of checkout, of the item loaned to the patron.",
"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}$"
},
"status": {
"description": "Overall status of the loan",
"type": "object",
"properties": {
"name": {
"description": "Name of the status (currently can be any value, values commonly used are Open and Closed)",
"type": "string"
}
}
},
"loanDate": {
"description": "Date and time when the loan began",
"type": "string",
"format": "date-time"
},
"dueDate": {
"description": "Date and time when the item is due to be returned",
"type": "string",
"format": "date-time"
},
"returnDate": {
"description": "Date and time when the item was returned",
"type": "string",
"format": "date-time"
},
"systemReturnDate": {
"description": "Date and time when return was processed",
"type": "string",
"format": "date-time"
},
"action": {
"description": "Last action performed on a loan (currently can be any value, values commonly used are checkedout and checkedin)",
"type": "string"
},
"actionComment": {
"description": "Last action performed on a loan comments",
"type": "string"
},
"renewalCount": {
"description": "Count of how many times a loan has been renewed (incremented by the client)",
"type": "integer",
"minimum": 0
},
"dueDateChangedByRecall": {
"description": "Is due date changed by recall request",
"type": "boolean",
"readonly": true
},
"dueDateChangedByNearExpireUser": {
"description": "Indicates whether or not this loan had its due date modified by a expired user",
"type": "boolean"
},
"dueDateChangedByHold": {
"description": "Is due date changed by hold request",
"type": "boolean",
"readonly": true
},
"checkoutServicePointId": {
"description": "ID of the Service Point where the last checkout occured",
"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}$"
},
"checkinServicePointId": {
"description": "ID of the Service Point where the last checkin occured",
"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}$"
},
"checkoutServicePoint": {
"description": "Service Point where the last checkout occurred",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"name": {
"description": "Unique name of the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Short code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human readable name",
"type": "string",
"readonly": true
},
"description": {
"description": "Service Point description data",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Time to shelving",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this a pickup location",
"type": "boolean",
"readonly": true
},
"holdShelfClosedLibraryDateManagement": {
"description": "Hold shelf closed date strategy",
"type": "string",
"readonly": true
}
}
},
"checkinServicePoint": {
"description": "Service Point where the last checkin occurred",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"name": {
"description": "Unique name of the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Short code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human readable name",
"type": "string",
"readonly": true
},
"description": {
"description": "Service Point description data",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Time to shelving",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this a pickup location",
"type": "boolean",
"readonly": true
},
"holdShelfClosedLibraryDateManagement": {
"description": "Hold shelf closed date strategy",
"type": "string",
"readonly": true
}
}
},
"patronGroupAtCheckout": {
"description": "Patron Group at checkout",
"type": "object",
"properties": {
"id": {
"description": "Unique ID (generated UUID) of the patron group",
"type": "string",
"readonly": true,
"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": "Patron group name",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"feesAndFines": {
"description": "Fees and fines associated with loans",
"type": "object",
"properties": {
"amountRemainingToPay": {
"type": "number",
"description": "Total remaining amount due on fees and fines for the loan (read only, defined by the server)",
"readonly": true
}
},
"additionalProperties": false
},
"declaredLostDate": {
"description": "Date and time the item was declared lost during this loan",
"type": "string",
"format": "date-time"
},
"metadata": {
"description": "Metadata about creation and changes to loan, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"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}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"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}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"required": [
"itemId",
"loanDate",
"action"
]
}
Example:
{
"id": "cf23adf0-61ba-4887-bf82-956c4aae2260",
"userId": "df7f4993-8c14-4a0f-ab63-93975ab01c76",
"proxyUserId": "346ad017-dac1-417d-9ed8-0ac7eeb886aa",
"itemId": "cb20f34f-b773-462f-a091-b233cc96b9e6",
"item": {
"title": "The Long Way to a Small, Angry Planet",
"barcode": "036000291452",
"status": {
"name": "Checked out"
},
"location": {
"name": "Main Library"
},
"materialType": {
"name": "Book"
},
"contributors": [
{
"name": "Steve Jones"
}
]
},
"loanPolicyId" : "e9af4ba4-6801-4722-be45-d7a49d13564d",
"loanPolicy": {
"name" : "Can Circulate Rolling"
},
"overdueFinePolicyId": "b59fe39f-efdc-4a88-993a-04fb405e5ecc",
"overdueFinePolicy": {
"name": "Overdue fine policy"
},
"lostItemPolicyId": "ea77439c-9ff5-4c37-8c92-0df02576c873",
"lostItemPolicy": {
"name": "Lost item policy"
},
"borrower" : {
"firstName" : "FirstName",
"lastName" : "LastName",
"middleName" : "MiddleName",
"barcode" : "102322966933815"
},
"loanDate": "2017-03-01T23:11:00.000Z",
"dueDate": "2017-04-01T23:11:00.000Z",
"checkoutServicePointId": "e9af4ba4-6801-4722-bf45-d7a49d54564d",
"checkinServicePointId": "e9af4ba4-6801-4722-bf45-d7a49d54564d",
"status": {
"name": "Open"
},
"action": "checkedout",
"renewalCount": 0
}
HTTP status code 201
Returns a newly created item, with server-controlled fields like 'id' populated
Headers
- Location: required(string)
URI to the created loan item
Body
Media type: application/json
Type: any
Example:
{
"id": "cf23adf0-61ba-4887-bf82-956c4aae2260",
"userId": "df7f4993-8c14-4a0f-ab63-93975ab01c76",
"proxyUserId": "346ad017-dac1-417d-9ed8-0ac7eeb886aa",
"itemId": "cb20f34f-b773-462f-a091-b233cc96b9e6",
"item": {
"title": "The Long Way to a Small, Angry Planet",
"barcode": "036000291452",
"status": {
"name": "Checked out"
},
"location": {
"name": "Main Library"
},
"materialType": {
"name": "Book"
},
"contributors": [
{
"name": "Steve Jones"
}
]
},
"loanPolicyId" : "e9af4ba4-6801-4722-be45-d7a49d13564d",
"loanPolicy": {
"name" : "Can Circulate Rolling"
},
"overdueFinePolicyId": "b59fe39f-efdc-4a88-993a-04fb405e5ecc",
"overdueFinePolicy": {
"name": "Overdue fine policy"
},
"lostItemPolicyId": "ea77439c-9ff5-4c37-8c92-0df02576c873",
"lostItemPolicy": {
"name": "Lost item policy"
},
"borrower" : {
"firstName" : "FirstName",
"lastName" : "LastName",
"middleName" : "MiddleName",
"barcode" : "102322966933815"
},
"loanDate": "2017-03-01T23:11:00.000Z",
"dueDate": "2017-04-01T23:11:00.000Z",
"checkoutServicePointId": "e9af4ba4-6801-4722-bf45-d7a49d54564d",
"checkinServicePointId": "e9af4ba4-6801-4722-bf45-d7a49d54564d",
"status": {
"name": "Open"
},
"action": "checkedout",
"renewalCount": 0
}
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 loan -- 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 loans -- 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
delete /circulation/loans
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
Entity representing a loan
Retrieve loan item with given {loanId}
Update loan item with given {loanId}
Delete loan item with given {loanId}
get /circulation/loans/{loanId}
Retrieve loan item with given {loanId}
URI Parameters
- loanId: required(string)
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#",
"type": "object",
"title": "Loan",
"description": "Links the item with the patron and applies certain conditions based on policies",
"properties": {
"id": {
"description": "Unique ID (generated UUID) of the loan",
"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}$"
},
"userId": {
"description": "ID of the patron the item was lent to. Required for open loans, not required for closed loans (for anonymization).",
"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}$"
},
"borrower": {
"description": "Additional information about the borrower of the item, taken from the user referred to by the userId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode used to identify the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"proxyUserId": {
"description": "ID of the user representing a proxy for the patron",
"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}$"
},
"itemId": {
"description": "ID of the item lent to the patron",
"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}$"
},
"loanPolicyId": {
"description": "ID of last policy used in relation to this loan",
"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}$"
},
"loanPolicy": {
"description": "Additional information about the loan policy of the item, taken from the loan loanPolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"overdueFinePolicyId": {
"description": "ID of last overdue fine policy used in relation to this loan",
"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}$"
},
"overdueFinePolicy": {
"description": "Additional information about the overdue fine policy of the item, taken from the loan overdueFinePolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last overdue fine policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"lostItemPolicyId": {
"description": "ID of last lost item policy used in relation to this loan",
"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}$"
},
"lostItemPolicy": {
"description": "Additional information about the lost item policy of the item, taken from the loan lostItemPolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last lost item policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"item": {
"description": "Additional information about the item",
"type": "object",
"readonly": true,
"properties": {
"id": {
"description": "ID of the item",
"type": "string",
"readonly": true,
"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}$"
},
"title": {
"description": "The title of the item lent to the patron",
"type": "string",
"readonly": true
},
"callNumber": {
"description": "Deprecated call number from the holdings record, use callNumberComponents.callNumber instead",
"type": "string",
"readonly": true
},
"copyNumber": {
"description": "Item copy number",
"type": "string",
"readonly": true
},
"materialType": {
"description": "The material type from the item record",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the material type",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"contributors": {
"description": "Contributors from the instance record",
"type": "array",
"readonly": true,
"items": {
"type": "object",
"properties": {
"name": {
"description": "Name of the contributor",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
}
},
"holdingsRecordId": {
"description": "The ID of the holdings for the item",
"type": "string",
"readonly": true,
"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}$"
},
"instanceId": {
"description": "The ID of the instance for the item",
"type": "string",
"readonly": true,
"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}$"
},
"barcode": {
"description": "The barcode of the item",
"type": "string",
"readonly": true
},
"location": {
"description": "The effective location of the item",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "The name of the location",
"type": "string",
"readonly": true
}
}
},
"status": {
"description": "Overall status of the item",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the item status",
"type": "string",
"readonly": true
},
"date": {
"type": "string",
"description": "Date time when status was last changed",
"format": "date-time",
"readonly": true
}
},
"additionalProperties": false
},
"inTransitDestinationServicePointId": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "string",
"readonly": true,
"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}$"
},
"inTransitDestinationServicePoint": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the service point",
"type": "string",
"readonly": true
}
}
},
"enumeration": {
"description": "Item`s enumeration",
"type": "string",
"readonly": true
},
"chronology": {
"description": "Item`s chronology",
"type": "string",
"readonly": true
},
"volume": {
"description": "Item`s volume",
"type": "string",
"readonly": true
},
"callNumberComponents": {
"description": "Elements of a full call number",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"callNumber": {
"type": "string",
"description": "Call number for item",
"readonly": true
},
"prefix": {
"description": "Call number prefix for item",
"type": "string",
"readonly": true
},
"suffix": {
"description": "Call number suffix for item",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"itemEffectiveLocationIdAtCheckOut": {
"description": "The effective location, at the time of checkout, of the item loaned to the patron.",
"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}$"
},
"status": {
"description": "Overall status of the loan",
"type": "object",
"properties": {
"name": {
"description": "Name of the status (currently can be any value, values commonly used are Open and Closed)",
"type": "string"
}
}
},
"loanDate": {
"description": "Date and time when the loan began",
"type": "string",
"format": "date-time"
},
"dueDate": {
"description": "Date and time when the item is due to be returned",
"type": "string",
"format": "date-time"
},
"returnDate": {
"description": "Date and time when the item was returned",
"type": "string",
"format": "date-time"
},
"systemReturnDate": {
"description": "Date and time when return was processed",
"type": "string",
"format": "date-time"
},
"action": {
"description": "Last action performed on a loan (currently can be any value, values commonly used are checkedout and checkedin)",
"type": "string"
},
"actionComment": {
"description": "Last action performed on a loan comments",
"type": "string"
},
"renewalCount": {
"description": "Count of how many times a loan has been renewed (incremented by the client)",
"type": "integer",
"minimum": 0
},
"dueDateChangedByRecall": {
"description": "Is due date changed by recall request",
"type": "boolean",
"readonly": true
},
"dueDateChangedByNearExpireUser": {
"description": "Indicates whether or not this loan had its due date modified by a expired user",
"type": "boolean"
},
"dueDateChangedByHold": {
"description": "Is due date changed by hold request",
"type": "boolean",
"readonly": true
},
"checkoutServicePointId": {
"description": "ID of the Service Point where the last checkout occured",
"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}$"
},
"checkinServicePointId": {
"description": "ID of the Service Point where the last checkin occured",
"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}$"
},
"checkoutServicePoint": {
"description": "Service Point where the last checkout occurred",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"name": {
"description": "Unique name of the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Short code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human readable name",
"type": "string",
"readonly": true
},
"description": {
"description": "Service Point description data",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Time to shelving",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this a pickup location",
"type": "boolean",
"readonly": true
},
"holdShelfClosedLibraryDateManagement": {
"description": "Hold shelf closed date strategy",
"type": "string",
"readonly": true
}
}
},
"checkinServicePoint": {
"description": "Service Point where the last checkin occurred",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"name": {
"description": "Unique name of the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Short code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human readable name",
"type": "string",
"readonly": true
},
"description": {
"description": "Service Point description data",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Time to shelving",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this a pickup location",
"type": "boolean",
"readonly": true
},
"holdShelfClosedLibraryDateManagement": {
"description": "Hold shelf closed date strategy",
"type": "string",
"readonly": true
}
}
},
"patronGroupAtCheckout": {
"description": "Patron Group at checkout",
"type": "object",
"properties": {
"id": {
"description": "Unique ID (generated UUID) of the patron group",
"type": "string",
"readonly": true,
"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": "Patron group name",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"feesAndFines": {
"description": "Fees and fines associated with loans",
"type": "object",
"properties": {
"amountRemainingToPay": {
"type": "number",
"description": "Total remaining amount due on fees and fines for the loan (read only, defined by the server)",
"readonly": true
}
},
"additionalProperties": false
},
"declaredLostDate": {
"description": "Date and time the item was declared lost during this loan",
"type": "string",
"format": "date-time"
},
"metadata": {
"description": "Metadata about creation and changes to loan, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"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}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"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}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"required": [
"itemId",
"loanDate",
"action"
]
}
Example:
{
"id": "cf23adf0-61ba-4887-bf82-956c4aae2260",
"userId": "df7f4993-8c14-4a0f-ab63-93975ab01c76",
"proxyUserId": "346ad017-dac1-417d-9ed8-0ac7eeb886aa",
"itemId": "cb20f34f-b773-462f-a091-b233cc96b9e6",
"item": {
"title": "The Long Way to a Small, Angry Planet",
"barcode": "036000291452",
"status": {
"name": "Checked out"
},
"location": {
"name": "Main Library"
},
"materialType": {
"name": "Book"
},
"contributors": [
{
"name": "Steve Jones"
}
]
},
"loanPolicyId" : "e9af4ba4-6801-4722-be45-d7a49d13564d",
"loanPolicy": {
"name" : "Can Circulate Rolling"
},
"overdueFinePolicyId": "b59fe39f-efdc-4a88-993a-04fb405e5ecc",
"overdueFinePolicy": {
"name": "Overdue fine policy"
},
"lostItemPolicyId": "ea77439c-9ff5-4c37-8c92-0df02576c873",
"lostItemPolicy": {
"name": "Lost item policy"
},
"borrower" : {
"firstName" : "FirstName",
"lastName" : "LastName",
"middleName" : "MiddleName",
"barcode" : "102322966933815"
},
"loanDate": "2017-03-01T23:11:00.000Z",
"dueDate": "2017-04-01T23:11:00.000Z",
"checkoutServicePointId": "e9af4ba4-6801-4722-bf45-d7a49d54564d",
"checkinServicePointId": "e9af4ba4-6801-4722-bf45-d7a49d54564d",
"status": {
"name": "Open"
},
"action": "checkedout",
"renewalCount": 0
}
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"loan 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
HTTP status code 501
Not implemented yet
put /circulation/loans/{loanId}
Update loan item with given {loanId}
URI Parameters
- loanId: required(string)
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#",
"type": "object",
"title": "Loan",
"description": "Links the item with the patron and applies certain conditions based on policies",
"properties": {
"id": {
"description": "Unique ID (generated UUID) of the loan",
"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}$"
},
"userId": {
"description": "ID of the patron the item was lent to. Required for open loans, not required for closed loans (for anonymization).",
"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}$"
},
"borrower": {
"description": "Additional information about the borrower of the item, taken from the user referred to by the userId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode used to identify the borrower (read only, defined by the server)",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"proxyUserId": {
"description": "ID of the user representing a proxy for the patron",
"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}$"
},
"itemId": {
"description": "ID of the item lent to the patron",
"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}$"
},
"loanPolicyId": {
"description": "ID of last policy used in relation to this loan",
"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}$"
},
"loanPolicy": {
"description": "Additional information about the loan policy of the item, taken from the loan loanPolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"overdueFinePolicyId": {
"description": "ID of last overdue fine policy used in relation to this loan",
"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}$"
},
"overdueFinePolicy": {
"description": "Additional information about the overdue fine policy of the item, taken from the loan overdueFinePolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last overdue fine policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"lostItemPolicyId": {
"description": "ID of last lost item policy used in relation to this loan",
"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}$"
},
"lostItemPolicy": {
"description": "Additional information about the lost item policy of the item, taken from the loan lostItemPolicyId",
"readonly": true,
"type": "object",
"properties": {
"name": {
"readonly": true,
"description": "Name of last lost item policy used in relation to this loan (read only, defined by the server)",
"type": "string"
}
}
},
"item": {
"description": "Additional information about the item",
"type": "object",
"readonly": true,
"properties": {
"id": {
"description": "ID of the item",
"type": "string",
"readonly": true,
"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}$"
},
"title": {
"description": "The title of the item lent to the patron",
"type": "string",
"readonly": true
},
"callNumber": {
"description": "Deprecated call number from the holdings record, use callNumberComponents.callNumber instead",
"type": "string",
"readonly": true
},
"copyNumber": {
"description": "Item copy number",
"type": "string",
"readonly": true
},
"materialType": {
"description": "The material type from the item record",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the material type",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"contributors": {
"description": "Contributors from the instance record",
"type": "array",
"readonly": true,
"items": {
"type": "object",
"properties": {
"name": {
"description": "Name of the contributor",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
}
},
"holdingsRecordId": {
"description": "The ID of the holdings for the item",
"type": "string",
"readonly": true,
"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}$"
},
"instanceId": {
"description": "The ID of the instance for the item",
"type": "string",
"readonly": true,
"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}$"
},
"barcode": {
"description": "The barcode of the item",
"type": "string",
"readonly": true
},
"location": {
"description": "The effective location of the item",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "The name of the location",
"type": "string",
"readonly": true
}
}
},
"status": {
"description": "Overall status of the item",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the item status",
"type": "string",
"readonly": true
},
"date": {
"type": "string",
"description": "Date time when status was last changed",
"format": "date-time",
"readonly": true
}
},
"additionalProperties": false
},
"inTransitDestinationServicePointId": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "string",
"readonly": true,
"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}$"
},
"inTransitDestinationServicePoint": {
"description": "Service point an item is intended to be transited to (should only be present when in transit)",
"type": "object",
"readonly": true,
"properties": {
"name": {
"description": "Name of the service point",
"type": "string",
"readonly": true
}
}
},
"enumeration": {
"description": "Item`s enumeration",
"type": "string",
"readonly": true
},
"chronology": {
"description": "Item`s chronology",
"type": "string",
"readonly": true
},
"volume": {
"description": "Item`s volume",
"type": "string",
"readonly": true
},
"callNumberComponents": {
"description": "Elements of a full call number",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"callNumber": {
"type": "string",
"description": "Call number for item",
"readonly": true
},
"prefix": {
"description": "Call number prefix for item",
"type": "string",
"readonly": true
},
"suffix": {
"description": "Call number suffix for item",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"itemEffectiveLocationIdAtCheckOut": {
"description": "The effective location, at the time of checkout, of the item loaned to the patron.",
"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}$"
},
"status": {
"description": "Overall status of the loan",
"type": "object",
"properties": {
"name": {
"description": "Name of the status (currently can be any value, values commonly used are Open and Closed)",
"type": "string"
}
}
},
"loanDate": {
"description": "Date and time when the loan began",
"type": "string",
"format": "date-time"
},
"dueDate": {
"description": "Date and time when the item is due to be returned",
"type": "string",
"format": "date-time"
},
"returnDate": {
"description": "Date and time when the item was returned",
"type": "string",
"format": "date-time"
},
"systemReturnDate": {
"description": "Date and time when return was processed",
"type": "string",
"format": "date-time"
},
"action": {
"description": "Last action performed on a loan (currently can be any value, values commonly used are checkedout and checkedin)",
"type": "string"
},
"actionComment": {
"description": "Last action performed on a loan comments",
"type": "string"
},
"renewalCount": {
"description": "Count of how many times a loan has been renewed (incremented by the client)",
"type": "integer",
"minimum": 0
},
"dueDateChangedByRecall": {
"description": "Is due date changed by recall request",
"type": "boolean",
"readonly": true
},
"dueDateChangedByNearExpireUser": {
"description": "Indicates whether or not this loan had its due date modified by a expired user",
"type": "boolean"
},
"dueDateChangedByHold": {
"description": "Is due date changed by hold request",
"type": "boolean",
"readonly": true
},
"checkoutServicePointId": {
"description": "ID of the Service Point where the last checkout occured",
"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}$"
},
"checkinServicePointId": {
"description": "ID of the Service Point where the last checkin occured",
"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}$"
},
"checkoutServicePoint": {
"description": "Service Point where the last checkout occurred",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"name": {
"description": "Unique name of the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Short code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human readable name",
"type": "string",
"readonly": true
},
"description": {
"description": "Service Point description data",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Time to shelving",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this a pickup location",
"type": "boolean",
"readonly": true
},
"holdShelfClosedLibraryDateManagement": {
"description": "Hold shelf closed date strategy",
"type": "string",
"readonly": true
}
}
},
"checkinServicePoint": {
"description": "Service Point where the last checkin occurred",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"name": {
"description": "Unique name of the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Short code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human readable name",
"type": "string",
"readonly": true
},
"description": {
"description": "Service Point description data",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Time to shelving",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this a pickup location",
"type": "boolean",
"readonly": true
},
"holdShelfClosedLibraryDateManagement": {
"description": "Hold shelf closed date strategy",
"type": "string",
"readonly": true
}
}
},
"patronGroupAtCheckout": {
"description": "Patron Group at checkout",
"type": "object",
"properties": {
"id": {
"description": "Unique ID (generated UUID) of the patron group",
"type": "string",
"readonly": true,
"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": "Patron group name",
"type": "string",
"readonly": true
}
},
"additionalProperties": false
},
"feesAndFines": {
"description": "Fees and fines associated with loans",
"type": "object",
"properties": {
"amountRemainingToPay": {
"type": "number",
"description": "Total remaining amount due on fees and fines for the loan (read only, defined by the server)",
"readonly": true
}
},
"additionalProperties": false
},
"declaredLostDate": {
"description": "Date and time the item was declared lost during this loan",
"type": "string",
"format": "date-time"
},
"metadata": {
"description": "Metadata about creation and changes to loan, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"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}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"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}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"required": [
"itemId",
"loanDate",
"action"
]
}
Example:
{
"id": "cf23adf0-61ba-4887-bf82-956c4aae2260",
"userId": "df7f4993-8c14-4a0f-ab63-93975ab01c76",
"proxyUserId": "346ad017-dac1-417d-9ed8-0ac7eeb886aa",
"itemId": "cb20f34f-b773-462f-a091-b233cc96b9e6",
"item": {
"title": "The Long Way to a Small, Angry Planet",
"barcode": "036000291452",
"status": {
"name": "Checked out"
},
"location": {
"name": "Main Library"
},
"materialType": {
"name": "Book"
},
"contributors": [
{
"name": "Steve Jones"
}
]
},
"loanPolicyId" : "e9af4ba4-6801-4722-be45-d7a49d13564d",
"loanPolicy": {
"name" : "Can Circulate Rolling"
},
"overdueFinePolicyId": "b59fe39f-efdc-4a88-993a-04fb405e5ecc",
"overdueFinePolicy": {
"name": "Overdue fine policy"
},
"lostItemPolicyId": "ea77439c-9ff5-4c37-8c92-0df02576c873",
"lostItemPolicy": {
"name": "Lost item policy"
},
"borrower" : {
"firstName" : "FirstName",
"lastName" : "LastName",
"middleName" : "MiddleName",
"barcode" : "102322966933815"
},
"loanDate": "2017-03-01T23:11:00.000Z",
"dueDate": "2017-04-01T23:11:00.000Z",
"checkoutServicePointId": "e9af4ba4-6801-4722-bf45-d7a49d54564d",
"checkinServicePointId": "e9af4ba4-6801-4722-bf45-d7a49d54564d",
"status": {
"name": "Open"
},
"action": "checkedout",
"renewalCount": 0
}
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 loan -- malformed JSON at 13:4"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"loan 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
HTTP status code 501
Not implemented yet
delete /circulation/loans/{loanId}
Delete loan item with given {loanId}
URI Parameters
- loanId: required(string)
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 loan -- constraint violation"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"loan 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
HTTP status code 501
Not implemented yet
Collection of request items.
Retrieve a list of request items.
Create a new request item.
get /circulation/requests
Retrieve a list of request items.
Query Parameters
- 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
- 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.
by using CQL
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode requesterId="cf23adf0-61ba-4887-bf82-956c4aae2260"
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
HTTP status code 200
Returns a list of request items
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Collection of item requests",
"description": "Collection of item requests",
"type": "object",
"properties": {
"requests": {
"description": "Paged collection of item requests",
"id": "requests",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "A request for an item",
"description": "Request for an item that might be at a different location or already checked out to another patron",
"properties": {
"id": {
"description": "UUID of the request",
"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}$"
},
"requestType": {
"description": "Whether the item should be held upon return, recalled or paged for",
"type": "string",
"enum": [
"Hold",
"Recall",
"Page"
]
},
"requestLevel": {
"description": "Level of the request - Item or Title",
"type": "string",
"enum": [
"Item"
]
},
"requestDate": {
"description": "Date the request was made",
"type": "string",
"format": "date-time"
},
"patronComments": {
"description": "Comments made by the patron",
"type": "string"
},
"requesterId": {
"description": "ID of the user who made the request",
"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}$"
},
"proxyUserId": {
"description": "ID of the user representing a proxy for the patron",
"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}$"
},
"instanceId": {
"description": "ID of the instance being requested",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"holdingsRecordId": {
"description": "ID of the holdings record being requested",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"itemId": {
"description": "ID of the item being requested",
"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}$"
},
"status": {
"description": "Status of the request",
"type": "string",
"enum": [
"Open - Not yet filled",
"Open - Awaiting pickup",
"Open - In transit",
"Open - Awaiting delivery",
"Closed - Filled",
"Closed - Cancelled",
"Closed - Unfilled",
"Closed - Pickup expired"
]
},
"cancellationReasonId": {
"description": "The id of the request reason",
"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}$"
},
"cancelledByUserId": {
"description": "The id of the user that cancelled the request",
"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}$"
},
"cancellationAdditionalInformation": {
"description": "Additional information about a cancellation",
"type": "string"
},
"cancelledDate": {
"description": "Date the request was cancelled",
"type": "string",
"format": "date-time"
},
"position": {
"description": "position of the request in a per-item request queue",
"type": "integer",
"minimum": 1
},
"instance": {
"description": "Copy of some instance metadata (used for searching and sorting)",
"type": "object",
"properties": {
"title": {
"description": "title of the item",
"type": "string"
},
"identifiers": {
"type": "array",
"description": "An extensible set of name-value pairs of identifiers associated with the resource",
"minItems": 0,
"items": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "Resource identifier value"
},
"identifierTypeId": {
"type": "string",
"description": "UUID of resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
}
},
"additionalProperties": false,
"required": [
"value",
"identifierTypeId"
]
}
}
}
},
"item": {
"description": "Copy of some item metadata (used for searching and sorting)",
"type": "object",
"properties": {
"barcode": {
"description": "barcode of the item",
"type": "string"
}
},
"additionalProperties": false
},
"requester": {
"description": "Copy of some requesting patron metadata (used for searching and sorting), will be taken from the user referred to by the requesterId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"patronGroupId": {
"description": "UUID for the patron group that this user belongs to",
"type": "string",
"readonly": true,
"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}$"
},
"patronGroup": {
"description": "record for the user's patron group",
"type": "object",
"additionalProperties": false,
"readonly": true,
"properties": {
"id": {
"description": "ID of the patron group",
"type": "string",
"readonly": true,
"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}$"
},
"group": {
"description": "The unique name of the patron group",
"type": "string",
"readonly": true
},
"desc": {
"description": "A description of the patron group",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"proxy": {
"description": "Copy of some proxy patron metadata (used for searching and sorting), will be taken from the user referred to by the proxyUserId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"patronGroupId": {
"description": "UUID for the patrongroup that this user belongs to",
"type": "string",
"readonly": true,
"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}$"
},
"patronGroup": {
"description": "record for the user's patrongroup",
"type": "object",
"readonly": true,
"additionalProperties": false,
"properties": {
"id": {
"description": "ID of the patrongroup",
"type": "string",
"readonly": true,
"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}$"
},
"group": {
"description": "The unique name of the patrongroup",
"type": "string",
"readonly": true
},
"desc": {
"description": "A description of the patrongroup",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"fulfilmentPreference": {
"description": "How should the request be fulfilled (whether the item should be kept on the hold shelf for collection or delivered to the requester)",
"type": "string",
"enum": [
"Hold Shelf",
"Delivery"
]
},
"deliveryAddressTypeId": {
"description": "Deliver to the address of this type, for the requesting patron",
"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}$"
},
"deliveryAddress": {
"description": "Address the item is to be delivered to (derived from requester information)",
"type": "object",
"readonly": true,
"properties": {
"addressLine1": {
"description": "Address line 1",
"type": "string",
"readonly": true
},
"addressLine2": {
"description": "Address line 2",
"type": "string",
"readonly": true
},
"city": {
"description": "City name",
"type": "string",
"readonly": true
},
"region": {
"description": "Region",
"type": "string",
"readonly": true
},
"postalCode": {
"description": "Postal code",
"type": "string",
"readonly": true
},
"countryId": {
"description": "Country code",
"type": "string",
"readonly": true
},
"addressTypeId": {
"description": "Type of address (refers to address types)",
"type": "string",
"readonly": true,
"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
},
"requestExpirationDate": {
"description": "Date when the request expires",
"type": "string",
"format": "date-time"
},
"holdShelfExpirationDate": {
"description": "Date when an item returned to the hold shelf expires",
"type": "string",
"format": "date-time"
},
"pickupServicePointId": {
"description": "The ID of the Service Point where this request can be picked up",
"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}$"
},
"pickupServicePoint": {
"description": "The full object of the Service Point record from pickupServicePointId",
"additionalProperties": false,
"readonly": true,
"properties": {
"name": {
"description": "Unique name for the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Unique code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human-readable name for the service point",
"type": "string",
"readonly": true
},
"description": {
"description": "Description of the service point",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Shelving lag time",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this service point a pickup location?",
"type": "boolean",
"readonly": true
}
}
},
"tags": {
"type": "object",
"description": "Tags",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "tags",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"metadata": {
"description": "Metadata about creation and changes to requests, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"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}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"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}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
},
"requestProcessingParameters": {
"type": "object",
"description": "Additional parameters used for request processing and discarded afterwards. Not part of request record.",
"properties": {
"overrideBlocks": {
"type": "object",
"description": "Blocks to override if user has corresponding permissions",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"itemNotLoanableBlock": {
"description": "'Item not loanable' block",
"type": "object",
"properties": {
"dueDate": {
"description": "Due date for a new loan",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"dueDate"
]
},
"patronBlock": {
"description": "Automated patron block",
"type": "object",
"additionalProperties": false
},
"itemLimitBlock": {
"description": "Item limit block",
"type": "object",
"additionalProperties": false
},
"renewalBlock": {
"description": "Renewal block",
"type": "object",
"additionalProperties": false
},
"renewalDueDateRequiredBlock": {
"description": "Override renewal block which requires due date field",
"type": "object",
"properties": {
"dueDate": {
"description": "Due date for a new loan",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"dueDate"
]
},
"comment": {
"description": "Reason for override",
"type": "string"
}
},
"additionalProperties": false
}
}
}
},
"additionalProperties": false,
"required": [
"requesterId",
"requestType",
"requestDate",
"fulfilmentPreference"
]
}
},
"totalRecords": {
"description": "Total number of item requests",
"type": "integer"
}
},
"required": [
"requests",
"totalRecords"
]
}
Example:
{
"requests": [
{
"id": "89105c06-dbdb-4aa0-9695-d4d19c733270",
"requestType": "Recall",
"requestLevel": "Item",
"requestDate": "2017-07-29T22:25:37Z",
"requesterId": "21932a85-bd00-446b-9565-46e0c1a5490b",
"itemId": "195efae1-588f-47bd-a181-13a2eb437701",
"instanceId": "195efae1-588f-47bd-a181-13a2eb434521",
"holdingsRecordId": "195efae1-588f-47bd-a181-13a2eb434521",
"fulfilmentPreference": "Hold Shelf",
"position": 1
},
{
"id": "f5cec279-0da6-4b44-a3df-f49b0903f325",
"requestType": "Hold",
"requestLevel": "Item",
"requestDate": "2017-08-05T11:43:23Z",
"requesterId": "61d939e4-f2ae-4c53-95d2-224a802fa2a6",
"itemId": "3e5d5433-a271-499c-94f4-5f3e4652e537",
"instanceId": "1e7d3354-a271-499c-94f4-5f3e4652a345",
"holdingsRecordId": "296efae1-588f-47bd-a181-13a2eb434521",
"fulfilmentPreference": "Delivery",
"requestExpirationDate": "2017-08-31T22:25:37Z",
"holdShelfExpirationDate": "2017-09-01T22:25:37Z",
"position": 1,
"instance": {
"title": "Children of Time"
},
"item": {
"barcode": "760932543816"
},
"requester": {
"firstName": "Stephen",
"lastName": "Jones",
"middleName": "Anthony",
"barcode": "567023127436"
},
"tags": {
"tagList": [
"new",
"important"
]
}
}
],
"totalRecords": 2
}
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 requests -- 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 requests -- 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
HTTP status code 501
Not implemented yet
post /circulation/requests
Create a new request 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#",
"title": "A request for an item",
"description": "Request for an item that might be at a different location or already checked out to another patron",
"type": "object",
"properties": {
"id": {
"description": "UUID of the request",
"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}$"
},
"requestType": {
"description": "Whether the item should be held upon return, recalled or paged for",
"type": "string",
"enum": [
"Hold",
"Recall",
"Page"
]
},
"requestLevel": {
"description": "Level of the request - Item or Title",
"type": "string",
"enum": [
"Item"
]
},
"requestDate": {
"description": "Date the request was made",
"type": "string",
"format": "date-time"
},
"patronComments": {
"description": "Comments made by the patron",
"type": "string"
},
"requesterId": {
"description": "ID of the user who made the request",
"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}$"
},
"proxyUserId": {
"description": "ID of the user representing a proxy for the patron",
"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}$"
},
"instanceId": {
"description": "ID of the instance being requested",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"holdingsRecordId": {
"description": "ID of the holdings record being requested",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"itemId": {
"description": "ID of the item being requested",
"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}$"
},
"status": {
"description": "Status of the request",
"type": "string",
"enum": [
"Open - Not yet filled",
"Open - Awaiting pickup",
"Open - In transit",
"Open - Awaiting delivery",
"Closed - Filled",
"Closed - Cancelled",
"Closed - Unfilled",
"Closed - Pickup expired"
]
},
"cancellationReasonId": {
"description": "The id of the request reason",
"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}$"
},
"cancelledByUserId": {
"description": "The id of the user that cancelled the request",
"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}$"
},
"cancellationAdditionalInformation": {
"description": "Additional information about a cancellation",
"type": "string"
},
"cancelledDate": {
"description": "Date the request was cancelled",
"type": "string",
"format": "date-time"
},
"position": {
"description": "position of the request in a per-item request queue",
"type": "integer",
"minimum": 1
},
"instance": {
"description": "Copy of some instance metadata (used for searching and sorting)",
"type": "object",
"properties": {
"title": {
"description": "title of the item",
"type": "string"
},
"identifiers": {
"type": "array",
"description": "An extensible set of name-value pairs of identifiers associated with the resource",
"minItems": 0,
"items": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "Resource identifier value"
},
"identifierTypeId": {
"type": "string",
"description": "UUID of resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
}
},
"additionalProperties": false,
"required": [
"value",
"identifierTypeId"
]
}
}
}
},
"item": {
"description": "Copy of some item metadata (used for searching and sorting)",
"type": "object",
"properties": {
"barcode": {
"description": "barcode of the item",
"type": "string"
}
},
"additionalProperties": false
},
"requester": {
"description": "Copy of some requesting patron metadata (used for searching and sorting), will be taken from the user referred to by the requesterId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"patronGroupId": {
"description": "UUID for the patron group that this user belongs to",
"type": "string",
"readonly": true,
"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}$"
},
"patronGroup": {
"description": "record for the user's patron group",
"type": "object",
"additionalProperties": false,
"readonly": true,
"properties": {
"id": {
"description": "ID of the patron group",
"type": "string",
"readonly": true,
"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}$"
},
"group": {
"description": "The unique name of the patron group",
"type": "string",
"readonly": true
},
"desc": {
"description": "A description of the patron group",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"proxy": {
"description": "Copy of some proxy patron metadata (used for searching and sorting), will be taken from the user referred to by the proxyUserId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"patronGroupId": {
"description": "UUID for the patrongroup that this user belongs to",
"type": "string",
"readonly": true,
"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}$"
},
"patronGroup": {
"description": "record for the user's patrongroup",
"type": "object",
"readonly": true,
"additionalProperties": false,
"properties": {
"id": {
"description": "ID of the patrongroup",
"type": "string",
"readonly": true,
"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}$"
},
"group": {
"description": "The unique name of the patrongroup",
"type": "string",
"readonly": true
},
"desc": {
"description": "A description of the patrongroup",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"fulfilmentPreference": {
"description": "How should the request be fulfilled (whether the item should be kept on the hold shelf for collection or delivered to the requester)",
"type": "string",
"enum": [
"Hold Shelf",
"Delivery"
]
},
"deliveryAddressTypeId": {
"description": "Deliver to the address of this type, for the requesting patron",
"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}$"
},
"deliveryAddress": {
"description": "Address the item is to be delivered to (derived from requester information)",
"type": "object",
"readonly": true,
"properties": {
"addressLine1": {
"description": "Address line 1",
"type": "string",
"readonly": true
},
"addressLine2": {
"description": "Address line 2",
"type": "string",
"readonly": true
},
"city": {
"description": "City name",
"type": "string",
"readonly": true
},
"region": {
"description": "Region",
"type": "string",
"readonly": true
},
"postalCode": {
"description": "Postal code",
"type": "string",
"readonly": true
},
"countryId": {
"description": "Country code",
"type": "string",
"readonly": true
},
"addressTypeId": {
"description": "Type of address (refers to address types)",
"type": "string",
"readonly": true,
"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
},
"requestExpirationDate": {
"description": "Date when the request expires",
"type": "string",
"format": "date-time"
},
"holdShelfExpirationDate": {
"description": "Date when an item returned to the hold shelf expires",
"type": "string",
"format": "date-time"
},
"pickupServicePointId": {
"description": "The ID of the Service Point where this request can be picked up",
"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}$"
},
"pickupServicePoint": {
"description": "The full object of the Service Point record from pickupServicePointId",
"additionalProperties": false,
"readonly": true,
"properties": {
"name": {
"description": "Unique name for the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Unique code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human-readable name for the service point",
"type": "string",
"readonly": true
},
"description": {
"description": "Description of the service point",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Shelving lag time",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this service point a pickup location?",
"type": "boolean",
"readonly": true
}
}
},
"tags": {
"type": "object",
"description": "Tags",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "tags",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"metadata": {
"description": "Metadata about creation and changes to requests, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"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}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"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}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
},
"requestProcessingParameters": {
"type": "object",
"description": "Additional parameters used for request processing and discarded afterwards. Not part of request record.",
"properties": {
"overrideBlocks": {
"type": "object",
"description": "Blocks to override if user has corresponding permissions",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"itemNotLoanableBlock": {
"description": "'Item not loanable' block",
"type": "object",
"properties": {
"dueDate": {
"description": "Due date for a new loan",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"dueDate"
]
},
"patronBlock": {
"description": "Automated patron block",
"type": "object",
"additionalProperties": false
},
"itemLimitBlock": {
"description": "Item limit block",
"type": "object",
"additionalProperties": false
},
"renewalBlock": {
"description": "Renewal block",
"type": "object",
"additionalProperties": false
},
"renewalDueDateRequiredBlock": {
"description": "Override renewal block which requires due date field",
"type": "object",
"properties": {
"dueDate": {
"description": "Due date for a new loan",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"dueDate"
]
},
"comment": {
"description": "Reason for override",
"type": "string"
}
},
"additionalProperties": false
}
}
}
},
"additionalProperties": false,
"required": [
"requesterId",
"requestType",
"requestDate",
"fulfilmentPreference"
]
}
Example:
{
"id": "89105c06-dbdb-4aa0-9695-d4d19c733270",
"requestType": "Recall",
"requestDate": "2017-07-29T22:25:37Z",
"requesterId": "21932a85-bd00-446b-9565-46e0c1a5490b",
"holdingsRecordId": "e63273e7-48f5-4c43-ab4e-1751ecacaa21",
"instanceId": "86c722c3-2f5e-42e1-bd0e-7ffbbd3b4972",
"requestLevel": "Item",
"itemId": "195efae1-588f-47bd-a181-13a2eb437701",
"fulfilmentPreference": "Hold Shelf",
"requestExpirationDate": "2017-07-25T22:25:37Z",
"position": 1,
"instance": {
"title": "Children of Time"
},
"item": {
"barcode": "760932543816"
},
"tags": {
"tagList": [
"new",
"important"
]
}
}
HTTP status code 201
Returns a newly created item, with server-controlled fields like 'id' populated
Headers
- Location: required(string)
URI to the created request item
Body
Media type: application/json
Type: any
Example:
{
"id": "89105c06-dbdb-4aa0-9695-d4d19c733270",
"requestType": "Recall",
"requestDate": "2017-07-29T22:25:37Z",
"requesterId": "21932a85-bd00-446b-9565-46e0c1a5490b",
"holdingsRecordId": "e63273e7-48f5-4c43-ab4e-1751ecacaa21",
"instanceId": "86c722c3-2f5e-42e1-bd0e-7ffbbd3b4972",
"requestLevel": "Item",
"itemId": "195efae1-588f-47bd-a181-13a2eb437701",
"fulfilmentPreference": "Hold Shelf",
"requestExpirationDate": "2017-07-25T22:25:37Z",
"position": 1,
"instance": {
"title": "Children of Time"
},
"item": {
"barcode": "760932543816"
},
"tags": {
"tagList": [
"new",
"important"
]
}
}
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 request -- 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 requests -- 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
HTTP status code 501
Not implemented yet
delete /circulation/requests
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
Entity representing a request
Retrieve request item with given {requestId}
Update request item with given {requestId}
Delete request item with given {requestId}
get /circulation/requests/{requestId}
Retrieve request item with given {requestId}
URI Parameters
- requestId: required(string)
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#",
"title": "A request for an item",
"description": "Request for an item that might be at a different location or already checked out to another patron",
"type": "object",
"properties": {
"id": {
"description": "UUID of the request",
"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}$"
},
"requestType": {
"description": "Whether the item should be held upon return, recalled or paged for",
"type": "string",
"enum": [
"Hold",
"Recall",
"Page"
]
},
"requestLevel": {
"description": "Level of the request - Item or Title",
"type": "string",
"enum": [
"Item"
]
},
"requestDate": {
"description": "Date the request was made",
"type": "string",
"format": "date-time"
},
"patronComments": {
"description": "Comments made by the patron",
"type": "string"
},
"requesterId": {
"description": "ID of the user who made the request",
"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}$"
},
"proxyUserId": {
"description": "ID of the user representing a proxy for the patron",
"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}$"
},
"instanceId": {
"description": "ID of the instance being requested",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"holdingsRecordId": {
"description": "ID of the holdings record being requested",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"itemId": {
"description": "ID of the item being requested",
"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}$"
},
"status": {
"description": "Status of the request",
"type": "string",
"enum": [
"Open - Not yet filled",
"Open - Awaiting pickup",
"Open - In transit",
"Open - Awaiting delivery",
"Closed - Filled",
"Closed - Cancelled",
"Closed - Unfilled",
"Closed - Pickup expired"
]
},
"cancellationReasonId": {
"description": "The id of the request reason",
"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}$"
},
"cancelledByUserId": {
"description": "The id of the user that cancelled the request",
"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}$"
},
"cancellationAdditionalInformation": {
"description": "Additional information about a cancellation",
"type": "string"
},
"cancelledDate": {
"description": "Date the request was cancelled",
"type": "string",
"format": "date-time"
},
"position": {
"description": "position of the request in a per-item request queue",
"type": "integer",
"minimum": 1
},
"instance": {
"description": "Copy of some instance metadata (used for searching and sorting)",
"type": "object",
"properties": {
"title": {
"description": "title of the item",
"type": "string"
},
"identifiers": {
"type": "array",
"description": "An extensible set of name-value pairs of identifiers associated with the resource",
"minItems": 0,
"items": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "Resource identifier value"
},
"identifierTypeId": {
"type": "string",
"description": "UUID of resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
}
},
"additionalProperties": false,
"required": [
"value",
"identifierTypeId"
]
}
}
}
},
"item": {
"description": "Copy of some item metadata (used for searching and sorting)",
"type": "object",
"properties": {
"barcode": {
"description": "barcode of the item",
"type": "string"
}
},
"additionalProperties": false
},
"requester": {
"description": "Copy of some requesting patron metadata (used for searching and sorting), will be taken from the user referred to by the requesterId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"patronGroupId": {
"description": "UUID for the patron group that this user belongs to",
"type": "string",
"readonly": true,
"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}$"
},
"patronGroup": {
"description": "record for the user's patron group",
"type": "object",
"additionalProperties": false,
"readonly": true,
"properties": {
"id": {
"description": "ID of the patron group",
"type": "string",
"readonly": true,
"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}$"
},
"group": {
"description": "The unique name of the patron group",
"type": "string",
"readonly": true
},
"desc": {
"description": "A description of the patron group",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"proxy": {
"description": "Copy of some proxy patron metadata (used for searching and sorting), will be taken from the user referred to by the proxyUserId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"patronGroupId": {
"description": "UUID for the patrongroup that this user belongs to",
"type": "string",
"readonly": true,
"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}$"
},
"patronGroup": {
"description": "record for the user's patrongroup",
"type": "object",
"readonly": true,
"additionalProperties": false,
"properties": {
"id": {
"description": "ID of the patrongroup",
"type": "string",
"readonly": true,
"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}$"
},
"group": {
"description": "The unique name of the patrongroup",
"type": "string",
"readonly": true
},
"desc": {
"description": "A description of the patrongroup",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"fulfilmentPreference": {
"description": "How should the request be fulfilled (whether the item should be kept on the hold shelf for collection or delivered to the requester)",
"type": "string",
"enum": [
"Hold Shelf",
"Delivery"
]
},
"deliveryAddressTypeId": {
"description": "Deliver to the address of this type, for the requesting patron",
"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}$"
},
"deliveryAddress": {
"description": "Address the item is to be delivered to (derived from requester information)",
"type": "object",
"readonly": true,
"properties": {
"addressLine1": {
"description": "Address line 1",
"type": "string",
"readonly": true
},
"addressLine2": {
"description": "Address line 2",
"type": "string",
"readonly": true
},
"city": {
"description": "City name",
"type": "string",
"readonly": true
},
"region": {
"description": "Region",
"type": "string",
"readonly": true
},
"postalCode": {
"description": "Postal code",
"type": "string",
"readonly": true
},
"countryId": {
"description": "Country code",
"type": "string",
"readonly": true
},
"addressTypeId": {
"description": "Type of address (refers to address types)",
"type": "string",
"readonly": true,
"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
},
"requestExpirationDate": {
"description": "Date when the request expires",
"type": "string",
"format": "date-time"
},
"holdShelfExpirationDate": {
"description": "Date when an item returned to the hold shelf expires",
"type": "string",
"format": "date-time"
},
"pickupServicePointId": {
"description": "The ID of the Service Point where this request can be picked up",
"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}$"
},
"pickupServicePoint": {
"description": "The full object of the Service Point record from pickupServicePointId",
"additionalProperties": false,
"readonly": true,
"properties": {
"name": {
"description": "Unique name for the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Unique code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human-readable name for the service point",
"type": "string",
"readonly": true
},
"description": {
"description": "Description of the service point",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Shelving lag time",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this service point a pickup location?",
"type": "boolean",
"readonly": true
}
}
},
"tags": {
"type": "object",
"description": "Tags",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "tags",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"metadata": {
"description": "Metadata about creation and changes to requests, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"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}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"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}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
},
"requestProcessingParameters": {
"type": "object",
"description": "Additional parameters used for request processing and discarded afterwards. Not part of request record.",
"properties": {
"overrideBlocks": {
"type": "object",
"description": "Blocks to override if user has corresponding permissions",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"itemNotLoanableBlock": {
"description": "'Item not loanable' block",
"type": "object",
"properties": {
"dueDate": {
"description": "Due date for a new loan",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"dueDate"
]
},
"patronBlock": {
"description": "Automated patron block",
"type": "object",
"additionalProperties": false
},
"itemLimitBlock": {
"description": "Item limit block",
"type": "object",
"additionalProperties": false
},
"renewalBlock": {
"description": "Renewal block",
"type": "object",
"additionalProperties": false
},
"renewalDueDateRequiredBlock": {
"description": "Override renewal block which requires due date field",
"type": "object",
"properties": {
"dueDate": {
"description": "Due date for a new loan",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"dueDate"
]
},
"comment": {
"description": "Reason for override",
"type": "string"
}
},
"additionalProperties": false
}
}
}
},
"additionalProperties": false,
"required": [
"requesterId",
"requestType",
"requestDate",
"fulfilmentPreference"
]
}
Example:
{
"id": "89105c06-dbdb-4aa0-9695-d4d19c733270",
"requestType": "Recall",
"requestDate": "2017-07-29T22:25:37Z",
"requesterId": "21932a85-bd00-446b-9565-46e0c1a5490b",
"holdingsRecordId": "e63273e7-48f5-4c43-ab4e-1751ecacaa21",
"instanceId": "86c722c3-2f5e-42e1-bd0e-7ffbbd3b4972",
"requestLevel": "Item",
"itemId": "195efae1-588f-47bd-a181-13a2eb437701",
"fulfilmentPreference": "Hold Shelf",
"requestExpirationDate": "2017-07-25T22:25:37Z",
"position": 1,
"instance": {
"title": "Children of Time"
},
"item": {
"barcode": "760932543816"
},
"tags": {
"tagList": [
"new",
"important"
]
}
}
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"request 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
HTTP status code 501
Not implemented yet
put /circulation/requests/{requestId}
Update request item with given {requestId}
URI Parameters
- requestId: required(string)
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#",
"title": "A request for an item",
"description": "Request for an item that might be at a different location or already checked out to another patron",
"type": "object",
"properties": {
"id": {
"description": "UUID of the request",
"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}$"
},
"requestType": {
"description": "Whether the item should be held upon return, recalled or paged for",
"type": "string",
"enum": [
"Hold",
"Recall",
"Page"
]
},
"requestLevel": {
"description": "Level of the request - Item or Title",
"type": "string",
"enum": [
"Item"
]
},
"requestDate": {
"description": "Date the request was made",
"type": "string",
"format": "date-time"
},
"patronComments": {
"description": "Comments made by the patron",
"type": "string"
},
"requesterId": {
"description": "ID of the user who made the request",
"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}$"
},
"proxyUserId": {
"description": "ID of the user representing a proxy for the patron",
"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}$"
},
"instanceId": {
"description": "ID of the instance being requested",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"holdingsRecordId": {
"description": "ID of the holdings record being requested",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"itemId": {
"description": "ID of the item being requested",
"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}$"
},
"status": {
"description": "Status of the request",
"type": "string",
"enum": [
"Open - Not yet filled",
"Open - Awaiting pickup",
"Open - In transit",
"Open - Awaiting delivery",
"Closed - Filled",
"Closed - Cancelled",
"Closed - Unfilled",
"Closed - Pickup expired"
]
},
"cancellationReasonId": {
"description": "The id of the request reason",
"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}$"
},
"cancelledByUserId": {
"description": "The id of the user that cancelled the request",
"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}$"
},
"cancellationAdditionalInformation": {
"description": "Additional information about a cancellation",
"type": "string"
},
"cancelledDate": {
"description": "Date the request was cancelled",
"type": "string",
"format": "date-time"
},
"position": {
"description": "position of the request in a per-item request queue",
"type": "integer",
"minimum": 1
},
"instance": {
"description": "Copy of some instance metadata (used for searching and sorting)",
"type": "object",
"properties": {
"title": {
"description": "title of the item",
"type": "string"
},
"identifiers": {
"type": "array",
"description": "An extensible set of name-value pairs of identifiers associated with the resource",
"minItems": 0,
"items": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "Resource identifier value"
},
"identifierTypeId": {
"type": "string",
"description": "UUID of resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
}
},
"additionalProperties": false,
"required": [
"value",
"identifierTypeId"
]
}
}
}
},
"item": {
"description": "Copy of some item metadata (used for searching and sorting)",
"type": "object",
"properties": {
"barcode": {
"description": "barcode of the item",
"type": "string"
}
},
"additionalProperties": false
},
"requester": {
"description": "Copy of some requesting patron metadata (used for searching and sorting), will be taken from the user referred to by the requesterId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"patronGroupId": {
"description": "UUID for the patron group that this user belongs to",
"type": "string",
"readonly": true,
"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}$"
},
"patronGroup": {
"description": "record for the user's patron group",
"type": "object",
"additionalProperties": false,
"readonly": true,
"properties": {
"id": {
"description": "ID of the patron group",
"type": "string",
"readonly": true,
"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}$"
},
"group": {
"description": "The unique name of the patron group",
"type": "string",
"readonly": true
},
"desc": {
"description": "A description of the patron group",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"proxy": {
"description": "Copy of some proxy patron metadata (used for searching and sorting), will be taken from the user referred to by the proxyUserId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"patronGroupId": {
"description": "UUID for the patrongroup that this user belongs to",
"type": "string",
"readonly": true,
"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}$"
},
"patronGroup": {
"description": "record for the user's patrongroup",
"type": "object",
"readonly": true,
"additionalProperties": false,
"properties": {
"id": {
"description": "ID of the patrongroup",
"type": "string",
"readonly": true,
"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}$"
},
"group": {
"description": "The unique name of the patrongroup",
"type": "string",
"readonly": true
},
"desc": {
"description": "A description of the patrongroup",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"fulfilmentPreference": {
"description": "How should the request be fulfilled (whether the item should be kept on the hold shelf for collection or delivered to the requester)",
"type": "string",
"enum": [
"Hold Shelf",
"Delivery"
]
},
"deliveryAddressTypeId": {
"description": "Deliver to the address of this type, for the requesting patron",
"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}$"
},
"deliveryAddress": {
"description": "Address the item is to be delivered to (derived from requester information)",
"type": "object",
"readonly": true,
"properties": {
"addressLine1": {
"description": "Address line 1",
"type": "string",
"readonly": true
},
"addressLine2": {
"description": "Address line 2",
"type": "string",
"readonly": true
},
"city": {
"description": "City name",
"type": "string",
"readonly": true
},
"region": {
"description": "Region",
"type": "string",
"readonly": true
},
"postalCode": {
"description": "Postal code",
"type": "string",
"readonly": true
},
"countryId": {
"description": "Country code",
"type": "string",
"readonly": true
},
"addressTypeId": {
"description": "Type of address (refers to address types)",
"type": "string",
"readonly": true,
"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
},
"requestExpirationDate": {
"description": "Date when the request expires",
"type": "string",
"format": "date-time"
},
"holdShelfExpirationDate": {
"description": "Date when an item returned to the hold shelf expires",
"type": "string",
"format": "date-time"
},
"pickupServicePointId": {
"description": "The ID of the Service Point where this request can be picked up",
"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}$"
},
"pickupServicePoint": {
"description": "The full object of the Service Point record from pickupServicePointId",
"additionalProperties": false,
"readonly": true,
"properties": {
"name": {
"description": "Unique name for the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Unique code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human-readable name for the service point",
"type": "string",
"readonly": true
},
"description": {
"description": "Description of the service point",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Shelving lag time",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this service point a pickup location?",
"type": "boolean",
"readonly": true
}
}
},
"tags": {
"type": "object",
"description": "Tags",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "tags",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"metadata": {
"description": "Metadata about creation and changes to requests, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"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}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"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}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
},
"requestProcessingParameters": {
"type": "object",
"description": "Additional parameters used for request processing and discarded afterwards. Not part of request record.",
"properties": {
"overrideBlocks": {
"type": "object",
"description": "Blocks to override if user has corresponding permissions",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"itemNotLoanableBlock": {
"description": "'Item not loanable' block",
"type": "object",
"properties": {
"dueDate": {
"description": "Due date for a new loan",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"dueDate"
]
},
"patronBlock": {
"description": "Automated patron block",
"type": "object",
"additionalProperties": false
},
"itemLimitBlock": {
"description": "Item limit block",
"type": "object",
"additionalProperties": false
},
"renewalBlock": {
"description": "Renewal block",
"type": "object",
"additionalProperties": false
},
"renewalDueDateRequiredBlock": {
"description": "Override renewal block which requires due date field",
"type": "object",
"properties": {
"dueDate": {
"description": "Due date for a new loan",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"dueDate"
]
},
"comment": {
"description": "Reason for override",
"type": "string"
}
},
"additionalProperties": false
}
}
}
},
"additionalProperties": false,
"required": [
"requesterId",
"requestType",
"requestDate",
"fulfilmentPreference"
]
}
Example:
{
"id": "89105c06-dbdb-4aa0-9695-d4d19c733270",
"requestType": "Recall",
"requestDate": "2017-07-29T22:25:37Z",
"requesterId": "21932a85-bd00-446b-9565-46e0c1a5490b",
"holdingsRecordId": "e63273e7-48f5-4c43-ab4e-1751ecacaa21",
"instanceId": "86c722c3-2f5e-42e1-bd0e-7ffbbd3b4972",
"requestLevel": "Item",
"itemId": "195efae1-588f-47bd-a181-13a2eb437701",
"fulfilmentPreference": "Hold Shelf",
"requestExpirationDate": "2017-07-25T22:25:37Z",
"position": 1,
"instance": {
"title": "Children of Time"
},
"item": {
"barcode": "760932543816"
},
"tags": {
"tagList": [
"new",
"important"
]
}
}
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 request -- malformed JSON at 13:4"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"request 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
HTTP status code 501
Not implemented yet
delete /circulation/requests/{requestId}
Delete request item with given {requestId}
URI Parameters
- requestId: required(string)
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 request -- constraint violation"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"request 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
HTTP status code 501
Not implemented yet
Entity representing a instance
Retrieve instance item with given {instanceId}
get /circulation/requests/queue/instance/{instanceId}
Retrieve instance item with given {instanceId}
URI Parameters
- instanceId: required(string)
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#",
"title": "Collection of item requests",
"description": "Collection of item requests",
"type": "object",
"properties": {
"requests": {
"description": "Paged collection of item requests",
"id": "requests",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "A request for an item",
"description": "Request for an item that might be at a different location or already checked out to another patron",
"properties": {
"id": {
"description": "UUID of the request",
"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}$"
},
"requestType": {
"description": "Whether the item should be held upon return, recalled or paged for",
"type": "string",
"enum": [
"Hold",
"Recall",
"Page"
]
},
"requestLevel": {
"description": "Level of the request - Item or Title",
"type": "string",
"enum": [
"Item"
]
},
"requestDate": {
"description": "Date the request was made",
"type": "string",
"format": "date-time"
},
"patronComments": {
"description": "Comments made by the patron",
"type": "string"
},
"requesterId": {
"description": "ID of the user who made the request",
"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}$"
},
"proxyUserId": {
"description": "ID of the user representing a proxy for the patron",
"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}$"
},
"instanceId": {
"description": "ID of the instance being requested",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"holdingsRecordId": {
"description": "ID of the holdings record being requested",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"itemId": {
"description": "ID of the item being requested",
"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}$"
},
"status": {
"description": "Status of the request",
"type": "string",
"enum": [
"Open - Not yet filled",
"Open - Awaiting pickup",
"Open - In transit",
"Open - Awaiting delivery",
"Closed - Filled",
"Closed - Cancelled",
"Closed - Unfilled",
"Closed - Pickup expired"
]
},
"cancellationReasonId": {
"description": "The id of the request reason",
"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}$"
},
"cancelledByUserId": {
"description": "The id of the user that cancelled the request",
"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}$"
},
"cancellationAdditionalInformation": {
"description": "Additional information about a cancellation",
"type": "string"
},
"cancelledDate": {
"description": "Date the request was cancelled",
"type": "string",
"format": "date-time"
},
"position": {
"description": "position of the request in a per-item request queue",
"type": "integer",
"minimum": 1
},
"instance": {
"description": "Copy of some instance metadata (used for searching and sorting)",
"type": "object",
"properties": {
"title": {
"description": "title of the item",
"type": "string"
},
"identifiers": {
"type": "array",
"description": "An extensible set of name-value pairs of identifiers associated with the resource",
"minItems": 0,
"items": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "Resource identifier value"
},
"identifierTypeId": {
"type": "string",
"description": "UUID of resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
}
},
"additionalProperties": false,
"required": [
"value",
"identifierTypeId"
]
}
}
}
},
"item": {
"description": "Copy of some item metadata (used for searching and sorting)",
"type": "object",
"properties": {
"barcode": {
"description": "barcode of the item",
"type": "string"
}
},
"additionalProperties": false
},
"requester": {
"description": "Copy of some requesting patron metadata (used for searching and sorting), will be taken from the user referred to by the requesterId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"patronGroupId": {
"description": "UUID for the patron group that this user belongs to",
"type": "string",
"readonly": true,
"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}$"
},
"patronGroup": {
"description": "record for the user's patron group",
"type": "object",
"additionalProperties": false,
"readonly": true,
"properties": {
"id": {
"description": "ID of the patron group",
"type": "string",
"readonly": true,
"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}$"
},
"group": {
"description": "The unique name of the patron group",
"type": "string",
"readonly": true
},
"desc": {
"description": "A description of the patron group",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"proxy": {
"description": "Copy of some proxy patron metadata (used for searching and sorting), will be taken from the user referred to by the proxyUserId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"patronGroupId": {
"description": "UUID for the patrongroup that this user belongs to",
"type": "string",
"readonly": true,
"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}$"
},
"patronGroup": {
"description": "record for the user's patrongroup",
"type": "object",
"readonly": true,
"additionalProperties": false,
"properties": {
"id": {
"description": "ID of the patrongroup",
"type": "string",
"readonly": true,
"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}$"
},
"group": {
"description": "The unique name of the patrongroup",
"type": "string",
"readonly": true
},
"desc": {
"description": "A description of the patrongroup",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"fulfilmentPreference": {
"description": "How should the request be fulfilled (whether the item should be kept on the hold shelf for collection or delivered to the requester)",
"type": "string",
"enum": [
"Hold Shelf",
"Delivery"
]
},
"deliveryAddressTypeId": {
"description": "Deliver to the address of this type, for the requesting patron",
"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}$"
},
"deliveryAddress": {
"description": "Address the item is to be delivered to (derived from requester information)",
"type": "object",
"readonly": true,
"properties": {
"addressLine1": {
"description": "Address line 1",
"type": "string",
"readonly": true
},
"addressLine2": {
"description": "Address line 2",
"type": "string",
"readonly": true
},
"city": {
"description": "City name",
"type": "string",
"readonly": true
},
"region": {
"description": "Region",
"type": "string",
"readonly": true
},
"postalCode": {
"description": "Postal code",
"type": "string",
"readonly": true
},
"countryId": {
"description": "Country code",
"type": "string",
"readonly": true
},
"addressTypeId": {
"description": "Type of address (refers to address types)",
"type": "string",
"readonly": true,
"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
},
"requestExpirationDate": {
"description": "Date when the request expires",
"type": "string",
"format": "date-time"
},
"holdShelfExpirationDate": {
"description": "Date when an item returned to the hold shelf expires",
"type": "string",
"format": "date-time"
},
"pickupServicePointId": {
"description": "The ID of the Service Point where this request can be picked up",
"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}$"
},
"pickupServicePoint": {
"description": "The full object of the Service Point record from pickupServicePointId",
"additionalProperties": false,
"readonly": true,
"properties": {
"name": {
"description": "Unique name for the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Unique code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human-readable name for the service point",
"type": "string",
"readonly": true
},
"description": {
"description": "Description of the service point",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Shelving lag time",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this service point a pickup location?",
"type": "boolean",
"readonly": true
}
}
},
"tags": {
"type": "object",
"description": "Tags",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "tags",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"metadata": {
"description": "Metadata about creation and changes to requests, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"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}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"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}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
},
"requestProcessingParameters": {
"type": "object",
"description": "Additional parameters used for request processing and discarded afterwards. Not part of request record.",
"properties": {
"overrideBlocks": {
"type": "object",
"description": "Blocks to override if user has corresponding permissions",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"itemNotLoanableBlock": {
"description": "'Item not loanable' block",
"type": "object",
"properties": {
"dueDate": {
"description": "Due date for a new loan",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"dueDate"
]
},
"patronBlock": {
"description": "Automated patron block",
"type": "object",
"additionalProperties": false
},
"itemLimitBlock": {
"description": "Item limit block",
"type": "object",
"additionalProperties": false
},
"renewalBlock": {
"description": "Renewal block",
"type": "object",
"additionalProperties": false
},
"renewalDueDateRequiredBlock": {
"description": "Override renewal block which requires due date field",
"type": "object",
"properties": {
"dueDate": {
"description": "Due date for a new loan",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"dueDate"
]
},
"comment": {
"description": "Reason for override",
"type": "string"
}
},
"additionalProperties": false
}
}
}
},
"additionalProperties": false,
"required": [
"requesterId",
"requestType",
"requestDate",
"fulfilmentPreference"
]
}
},
"totalRecords": {
"description": "Total number of item requests",
"type": "integer"
}
},
"required": [
"requests",
"totalRecords"
]
}
Example:
{
"requests": [
{
"id": "89105c06-dbdb-4aa0-9695-d4d19c733270",
"requestType": "Recall",
"requestDate": "2017-07-29T22:25:37Z",
"requesterId": "21932a85-bd00-446b-9565-46e0c1a5490b",
"itemId": "195efae1-588f-47bd-a181-13a2eb437701",
"fulfilmentPreference": "Hold Shelf",
"position": 1
},
{
"id": "f5cec279-0da6-4b44-a3df-f49b0903f325",
"requestType": "Hold",
"requestDate": "2017-08-05T11:43:23Z",
"requesterId": "61d939e4-f2ae-4c53-95d2-224a802fa2a6",
"itemId": "195efae1-588f-47bd-a181-13a2eb437701",
"fulfilmentPreference": "Delivery",
"position": 2
},
{
"id": "666e788f-1d9c-4846-b347-c40e711153fb",
"requestType": "Hold",
"requestDate": "2018-01-02T16:35:27Z",
"requesterId": "08876b22-8572-4b35-b25e-afc45c8e6e61",
"itemId": "195efae1-588f-47bd-a181-13a2eb437701",
"fulfilmentPreference": "Hold Shelf",
"position": 3
}
],
"totalRecords": 2
}
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 instance -- 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 instance -- unauthorized"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"instance 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
Reorder requests in the instance queue
post /circulation/requests/queue/instance/{instanceId}/reorder
Reorder requests in the instance queue
URI Parameters
- instanceId: required(string)
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Reordered queue",
"description": "New positions for all requests in the queue",
"type": "object",
"properties": {
"reorderedQueue" : {
"type": "array",
"description": "All request from the item queue and their's new positions in the queue.",
"items": {
"description": "Reorder request",
"type": "object",
"properties": {
"id" : {
"description": "Request id",
"type": "string",
"pattern" : "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"newPosition": {
"description": "New position for the request",
"type": "integer",
"minimum": 1
}
},
"additionalProperties": false,
"required": [
"id",
"newPosition"
]
}
}
},
"additionalProperties": false,
"required": [
"reorderedQueue"
]
}
Example:
{
"reorderedQueue": [
{
"id": "2ffd3f92-2947-4944-927b-20c986acb9e3",
"newPosition": 1
},
{
"id": "7d182699-cde9-4546-bae4-975ca04ab385",
"newPosition": 2
},
{
"id": "8e239a98-f7e4-4a62-b096-a2e69ac01ca5",
"newPosition": 3
},
{
"id": "d70e3358-c3ac-48ad-960f-e8db9aeadf4a",
"newPosition": 4
}
]
}
HTTP status code 200
Queue has been reordered successfully
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Collection of item requests",
"description": "Collection of item requests",
"type": "object",
"properties": {
"requests": {
"description": "Paged collection of item requests",
"id": "requests",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "A request for an item",
"description": "Request for an item that might be at a different location or already checked out to another patron",
"properties": {
"id": {
"description": "UUID of the request",
"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}$"
},
"requestType": {
"description": "Whether the item should be held upon return, recalled or paged for",
"type": "string",
"enum": [
"Hold",
"Recall",
"Page"
]
},
"requestLevel": {
"description": "Level of the request - Item or Title",
"type": "string",
"enum": [
"Item"
]
},
"requestDate": {
"description": "Date the request was made",
"type": "string",
"format": "date-time"
},
"patronComments": {
"description": "Comments made by the patron",
"type": "string"
},
"requesterId": {
"description": "ID of the user who made the request",
"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}$"
},
"proxyUserId": {
"description": "ID of the user representing a proxy for the patron",
"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}$"
},
"instanceId": {
"description": "ID of the instance being requested",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"holdingsRecordId": {
"description": "ID of the holdings record being requested",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"itemId": {
"description": "ID of the item being requested",
"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}$"
},
"status": {
"description": "Status of the request",
"type": "string",
"enum": [
"Open - Not yet filled",
"Open - Awaiting pickup",
"Open - In transit",
"Open - Awaiting delivery",
"Closed - Filled",
"Closed - Cancelled",
"Closed - Unfilled",
"Closed - Pickup expired"
]
},
"cancellationReasonId": {
"description": "The id of the request reason",
"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}$"
},
"cancelledByUserId": {
"description": "The id of the user that cancelled the request",
"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}$"
},
"cancellationAdditionalInformation": {
"description": "Additional information about a cancellation",
"type": "string"
},
"cancelledDate": {
"description": "Date the request was cancelled",
"type": "string",
"format": "date-time"
},
"position": {
"description": "position of the request in a per-item request queue",
"type": "integer",
"minimum": 1
},
"instance": {
"description": "Copy of some instance metadata (used for searching and sorting)",
"type": "object",
"properties": {
"title": {
"description": "title of the item",
"type": "string"
},
"identifiers": {
"type": "array",
"description": "An extensible set of name-value pairs of identifiers associated with the resource",
"minItems": 0,
"items": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "Resource identifier value"
},
"identifierTypeId": {
"type": "string",
"description": "UUID of resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
}
},
"additionalProperties": false,
"required": [
"value",
"identifierTypeId"
]
}
}
}
},
"item": {
"description": "Copy of some item metadata (used for searching and sorting)",
"type": "object",
"properties": {
"barcode": {
"description": "barcode of the item",
"type": "string"
}
},
"additionalProperties": false
},
"requester": {
"description": "Copy of some requesting patron metadata (used for searching and sorting), will be taken from the user referred to by the requesterId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"patronGroupId": {
"description": "UUID for the patron group that this user belongs to",
"type": "string",
"readonly": true,
"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}$"
},
"patronGroup": {
"description": "record for the user's patron group",
"type": "object",
"additionalProperties": false,
"readonly": true,
"properties": {
"id": {
"description": "ID of the patron group",
"type": "string",
"readonly": true,
"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}$"
},
"group": {
"description": "The unique name of the patron group",
"type": "string",
"readonly": true
},
"desc": {
"description": "A description of the patron group",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"proxy": {
"description": "Copy of some proxy patron metadata (used for searching and sorting), will be taken from the user referred to by the proxyUserId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"patronGroupId": {
"description": "UUID for the patrongroup that this user belongs to",
"type": "string",
"readonly": true,
"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}$"
},
"patronGroup": {
"description": "record for the user's patrongroup",
"type": "object",
"readonly": true,
"additionalProperties": false,
"properties": {
"id": {
"description": "ID of the patrongroup",
"type": "string",
"readonly": true,
"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}$"
},
"group": {
"description": "The unique name of the patrongroup",
"type": "string",
"readonly": true
},
"desc": {
"description": "A description of the patrongroup",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"fulfilmentPreference": {
"description": "How should the request be fulfilled (whether the item should be kept on the hold shelf for collection or delivered to the requester)",
"type": "string",
"enum": [
"Hold Shelf",
"Delivery"
]
},
"deliveryAddressTypeId": {
"description": "Deliver to the address of this type, for the requesting patron",
"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}$"
},
"deliveryAddress": {
"description": "Address the item is to be delivered to (derived from requester information)",
"type": "object",
"readonly": true,
"properties": {
"addressLine1": {
"description": "Address line 1",
"type": "string",
"readonly": true
},
"addressLine2": {
"description": "Address line 2",
"type": "string",
"readonly": true
},
"city": {
"description": "City name",
"type": "string",
"readonly": true
},
"region": {
"description": "Region",
"type": "string",
"readonly": true
},
"postalCode": {
"description": "Postal code",
"type": "string",
"readonly": true
},
"countryId": {
"description": "Country code",
"type": "string",
"readonly": true
},
"addressTypeId": {
"description": "Type of address (refers to address types)",
"type": "string",
"readonly": true,
"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
},
"requestExpirationDate": {
"description": "Date when the request expires",
"type": "string",
"format": "date-time"
},
"holdShelfExpirationDate": {
"description": "Date when an item returned to the hold shelf expires",
"type": "string",
"format": "date-time"
},
"pickupServicePointId": {
"description": "The ID of the Service Point where this request can be picked up",
"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}$"
},
"pickupServicePoint": {
"description": "The full object of the Service Point record from pickupServicePointId",
"additionalProperties": false,
"readonly": true,
"properties": {
"name": {
"description": "Unique name for the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Unique code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human-readable name for the service point",
"type": "string",
"readonly": true
},
"description": {
"description": "Description of the service point",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Shelving lag time",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this service point a pickup location?",
"type": "boolean",
"readonly": true
}
}
},
"tags": {
"type": "object",
"description": "Tags",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "tags",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"metadata": {
"description": "Metadata about creation and changes to requests, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"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}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"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}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
},
"requestProcessingParameters": {
"type": "object",
"description": "Additional parameters used for request processing and discarded afterwards. Not part of request record.",
"properties": {
"overrideBlocks": {
"type": "object",
"description": "Blocks to override if user has corresponding permissions",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"itemNotLoanableBlock": {
"description": "'Item not loanable' block",
"type": "object",
"properties": {
"dueDate": {
"description": "Due date for a new loan",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"dueDate"
]
},
"patronBlock": {
"description": "Automated patron block",
"type": "object",
"additionalProperties": false
},
"itemLimitBlock": {
"description": "Item limit block",
"type": "object",
"additionalProperties": false
},
"renewalBlock": {
"description": "Renewal block",
"type": "object",
"additionalProperties": false
},
"renewalDueDateRequiredBlock": {
"description": "Override renewal block which requires due date field",
"type": "object",
"properties": {
"dueDate": {
"description": "Due date for a new loan",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"dueDate"
]
},
"comment": {
"description": "Reason for override",
"type": "string"
}
},
"additionalProperties": false
}
}
}
},
"additionalProperties": false,
"required": [
"requesterId",
"requestType",
"requestDate",
"fulfilmentPreference"
]
}
},
"totalRecords": {
"description": "Total number of item requests",
"type": "integer"
}
},
"required": [
"requests",
"totalRecords"
]
}
Example:
{
"requests": [
{
"id": "89105c06-dbdb-4aa0-9695-d4d19c733270",
"requestType": "Recall",
"requestLevel": "Item",
"requestDate": "2017-07-29T22:25:37Z",
"requesterId": "21932a85-bd00-446b-9565-46e0c1a5490b",
"itemId": "195efae1-588f-47bd-a181-13a2eb437701",
"instanceId": "195efae1-588f-47bd-a181-13a2eb434521",
"holdingsRecordId": "195efae1-588f-47bd-a181-13a2eb434521",
"fulfilmentPreference": "Hold Shelf",
"position": 1
},
{
"id": "f5cec279-0da6-4b44-a3df-f49b0903f325",
"requestType": "Hold",
"requestLevel": "Item",
"requestDate": "2017-08-05T11:43:23Z",
"requesterId": "61d939e4-f2ae-4c53-95d2-224a802fa2a6",
"itemId": "3e5d5433-a271-499c-94f4-5f3e4652e537",
"instanceId": "1e7d3354-a271-499c-94f4-5f3e4652a345",
"holdingsRecordId": "296efae1-588f-47bd-a181-13a2eb434521",
"fulfilmentPreference": "Delivery",
"requestExpirationDate": "2017-08-31T22:25:37Z",
"holdShelfExpirationDate": "2017-09-01T22:25:37Z",
"position": 1,
"instance": {
"title": "Children of Time"
},
"item": {
"barcode": "760932543816"
},
"requester": {
"firstName": "Stephen",
"lastName": "Jones",
"middleName": "Anthony",
"barcode": "567023127436"
},
"tags": {
"tagList": [
"new",
"important"
]
}
}
],
"totalRecords": 2
}
HTTP status code 404
Queue for item not found.
HTTP status code 422
Validation errors.
Body
Media type: text/plain
Type: any
Example:
Page requests can not be displaced from position 1.
HTTP status code 500
Internal server error.
Body
Media type: text/plain
Type: any
Example:
Internal server error.
Entity representing a item
Retrieve item item with given {itemId}
get /circulation/requests/queue/item/{itemId}
Retrieve item item with given {itemId}
URI Parameters
- itemId: required(string)
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#",
"title": "Collection of item requests",
"description": "Collection of item requests",
"type": "object",
"properties": {
"requests": {
"description": "Paged collection of item requests",
"id": "requests",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "A request for an item",
"description": "Request for an item that might be at a different location or already checked out to another patron",
"properties": {
"id": {
"description": "UUID of the request",
"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}$"
},
"requestType": {
"description": "Whether the item should be held upon return, recalled or paged for",
"type": "string",
"enum": [
"Hold",
"Recall",
"Page"
]
},
"requestLevel": {
"description": "Level of the request - Item or Title",
"type": "string",
"enum": [
"Item"
]
},
"requestDate": {
"description": "Date the request was made",
"type": "string",
"format": "date-time"
},
"patronComments": {
"description": "Comments made by the patron",
"type": "string"
},
"requesterId": {
"description": "ID of the user who made the request",
"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}$"
},
"proxyUserId": {
"description": "ID of the user representing a proxy for the patron",
"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}$"
},
"instanceId": {
"description": "ID of the instance being requested",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"holdingsRecordId": {
"description": "ID of the holdings record being requested",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"itemId": {
"description": "ID of the item being requested",
"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}$"
},
"status": {
"description": "Status of the request",
"type": "string",
"enum": [
"Open - Not yet filled",
"Open - Awaiting pickup",
"Open - In transit",
"Open - Awaiting delivery",
"Closed - Filled",
"Closed - Cancelled",
"Closed - Unfilled",
"Closed - Pickup expired"
]
},
"cancellationReasonId": {
"description": "The id of the request reason",
"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}$"
},
"cancelledByUserId": {
"description": "The id of the user that cancelled the request",
"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}$"
},
"cancellationAdditionalInformation": {
"description": "Additional information about a cancellation",
"type": "string"
},
"cancelledDate": {
"description": "Date the request was cancelled",
"type": "string",
"format": "date-time"
},
"position": {
"description": "position of the request in a per-item request queue",
"type": "integer",
"minimum": 1
},
"instance": {
"description": "Copy of some instance metadata (used for searching and sorting)",
"type": "object",
"properties": {
"title": {
"description": "title of the item",
"type": "string"
},
"identifiers": {
"type": "array",
"description": "An extensible set of name-value pairs of identifiers associated with the resource",
"minItems": 0,
"items": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "Resource identifier value"
},
"identifierTypeId": {
"type": "string",
"description": "UUID of resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
}
},
"additionalProperties": false,
"required": [
"value",
"identifierTypeId"
]
}
}
}
},
"item": {
"description": "Copy of some item metadata (used for searching and sorting)",
"type": "object",
"properties": {
"barcode": {
"description": "barcode of the item",
"type": "string"
}
},
"additionalProperties": false
},
"requester": {
"description": "Copy of some requesting patron metadata (used for searching and sorting), will be taken from the user referred to by the requesterId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"patronGroupId": {
"description": "UUID for the patron group that this user belongs to",
"type": "string",
"readonly": true,
"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}$"
},
"patronGroup": {
"description": "record for the user's patron group",
"type": "object",
"additionalProperties": false,
"readonly": true,
"properties": {
"id": {
"description": "ID of the patron group",
"type": "string",
"readonly": true,
"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}$"
},
"group": {
"description": "The unique name of the patron group",
"type": "string",
"readonly": true
},
"desc": {
"description": "A description of the patron group",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"proxy": {
"description": "Copy of some proxy patron metadata (used for searching and sorting), will be taken from the user referred to by the proxyUserId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"patronGroupId": {
"description": "UUID for the patrongroup that this user belongs to",
"type": "string",
"readonly": true,
"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}$"
},
"patronGroup": {
"description": "record for the user's patrongroup",
"type": "object",
"readonly": true,
"additionalProperties": false,
"properties": {
"id": {
"description": "ID of the patrongroup",
"type": "string",
"readonly": true,
"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}$"
},
"group": {
"description": "The unique name of the patrongroup",
"type": "string",
"readonly": true
},
"desc": {
"description": "A description of the patrongroup",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"fulfilmentPreference": {
"description": "How should the request be fulfilled (whether the item should be kept on the hold shelf for collection or delivered to the requester)",
"type": "string",
"enum": [
"Hold Shelf",
"Delivery"
]
},
"deliveryAddressTypeId": {
"description": "Deliver to the address of this type, for the requesting patron",
"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}$"
},
"deliveryAddress": {
"description": "Address the item is to be delivered to (derived from requester information)",
"type": "object",
"readonly": true,
"properties": {
"addressLine1": {
"description": "Address line 1",
"type": "string",
"readonly": true
},
"addressLine2": {
"description": "Address line 2",
"type": "string",
"readonly": true
},
"city": {
"description": "City name",
"type": "string",
"readonly": true
},
"region": {
"description": "Region",
"type": "string",
"readonly": true
},
"postalCode": {
"description": "Postal code",
"type": "string",
"readonly": true
},
"countryId": {
"description": "Country code",
"type": "string",
"readonly": true
},
"addressTypeId": {
"description": "Type of address (refers to address types)",
"type": "string",
"readonly": true,
"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
},
"requestExpirationDate": {
"description": "Date when the request expires",
"type": "string",
"format": "date-time"
},
"holdShelfExpirationDate": {
"description": "Date when an item returned to the hold shelf expires",
"type": "string",
"format": "date-time"
},
"pickupServicePointId": {
"description": "The ID of the Service Point where this request can be picked up",
"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}$"
},
"pickupServicePoint": {
"description": "The full object of the Service Point record from pickupServicePointId",
"additionalProperties": false,
"readonly": true,
"properties": {
"name": {
"description": "Unique name for the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Unique code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human-readable name for the service point",
"type": "string",
"readonly": true
},
"description": {
"description": "Description of the service point",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Shelving lag time",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this service point a pickup location?",
"type": "boolean",
"readonly": true
}
}
},
"tags": {
"type": "object",
"description": "Tags",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "tags",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"metadata": {
"description": "Metadata about creation and changes to requests, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"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}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"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}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
},
"requestProcessingParameters": {
"type": "object",
"description": "Additional parameters used for request processing and discarded afterwards. Not part of request record.",
"properties": {
"overrideBlocks": {
"type": "object",
"description": "Blocks to override if user has corresponding permissions",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"itemNotLoanableBlock": {
"description": "'Item not loanable' block",
"type": "object",
"properties": {
"dueDate": {
"description": "Due date for a new loan",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"dueDate"
]
},
"patronBlock": {
"description": "Automated patron block",
"type": "object",
"additionalProperties": false
},
"itemLimitBlock": {
"description": "Item limit block",
"type": "object",
"additionalProperties": false
},
"renewalBlock": {
"description": "Renewal block",
"type": "object",
"additionalProperties": false
},
"renewalDueDateRequiredBlock": {
"description": "Override renewal block which requires due date field",
"type": "object",
"properties": {
"dueDate": {
"description": "Due date for a new loan",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"dueDate"
]
},
"comment": {
"description": "Reason for override",
"type": "string"
}
},
"additionalProperties": false
}
}
}
},
"additionalProperties": false,
"required": [
"requesterId",
"requestType",
"requestDate",
"fulfilmentPreference"
]
}
},
"totalRecords": {
"description": "Total number of item requests",
"type": "integer"
}
},
"required": [
"requests",
"totalRecords"
]
}
Example:
{
"requests": [
{
"id": "89105c06-dbdb-4aa0-9695-d4d19c733270",
"requestType": "Recall",
"requestDate": "2017-07-29T22:25:37Z",
"requesterId": "21932a85-bd00-446b-9565-46e0c1a5490b",
"itemId": "195efae1-588f-47bd-a181-13a2eb437701",
"fulfilmentPreference": "Hold Shelf",
"position": 1
},
{
"id": "f5cec279-0da6-4b44-a3df-f49b0903f325",
"requestType": "Hold",
"requestDate": "2017-08-05T11:43:23Z",
"requesterId": "61d939e4-f2ae-4c53-95d2-224a802fa2a6",
"itemId": "195efae1-588f-47bd-a181-13a2eb437701",
"fulfilmentPreference": "Delivery",
"position": 2
},
{
"id": "666e788f-1d9c-4846-b347-c40e711153fb",
"requestType": "Hold",
"requestDate": "2018-01-02T16:35:27Z",
"requesterId": "08876b22-8572-4b35-b25e-afc45c8e6e61",
"itemId": "195efae1-588f-47bd-a181-13a2eb437701",
"fulfilmentPreference": "Hold Shelf",
"position": 3
}
],
"totalRecords": 2
}
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 item -- 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 item -- unauthorized"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"item 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
Reorder requests in the item queue
post /circulation/requests/queue/item/{itemId}/reorder
Reorder requests in the item queue
URI Parameters
- itemId: required(string)
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Reordered queue",
"description": "New positions for all requests in the queue",
"type": "object",
"properties": {
"reorderedQueue" : {
"type": "array",
"description": "All request from the item queue and their's new positions in the queue.",
"items": {
"description": "Reorder request",
"type": "object",
"properties": {
"id" : {
"description": "Request id",
"type": "string",
"pattern" : "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"newPosition": {
"description": "New position for the request",
"type": "integer",
"minimum": 1
}
},
"additionalProperties": false,
"required": [
"id",
"newPosition"
]
}
}
},
"additionalProperties": false,
"required": [
"reorderedQueue"
]
}
Example:
{
"reorderedQueue": [
{
"id": "2ffd3f92-2947-4944-927b-20c986acb9e3",
"newPosition": 1
},
{
"id": "7d182699-cde9-4546-bae4-975ca04ab385",
"newPosition": 2
},
{
"id": "8e239a98-f7e4-4a62-b096-a2e69ac01ca5",
"newPosition": 3
},
{
"id": "d70e3358-c3ac-48ad-960f-e8db9aeadf4a",
"newPosition": 4
}
]
}
HTTP status code 200
Queue has been reordered successfully
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Collection of item requests",
"description": "Collection of item requests",
"type": "object",
"properties": {
"requests": {
"description": "Paged collection of item requests",
"id": "requests",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "A request for an item",
"description": "Request for an item that might be at a different location or already checked out to another patron",
"properties": {
"id": {
"description": "UUID of the request",
"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}$"
},
"requestType": {
"description": "Whether the item should be held upon return, recalled or paged for",
"type": "string",
"enum": [
"Hold",
"Recall",
"Page"
]
},
"requestLevel": {
"description": "Level of the request - Item or Title",
"type": "string",
"enum": [
"Item"
]
},
"requestDate": {
"description": "Date the request was made",
"type": "string",
"format": "date-time"
},
"patronComments": {
"description": "Comments made by the patron",
"type": "string"
},
"requesterId": {
"description": "ID of the user who made the request",
"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}$"
},
"proxyUserId": {
"description": "ID of the user representing a proxy for the patron",
"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}$"
},
"instanceId": {
"description": "ID of the instance being requested",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"holdingsRecordId": {
"description": "ID of the holdings record being requested",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"itemId": {
"description": "ID of the item being requested",
"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}$"
},
"status": {
"description": "Status of the request",
"type": "string",
"enum": [
"Open - Not yet filled",
"Open - Awaiting pickup",
"Open - In transit",
"Open - Awaiting delivery",
"Closed - Filled",
"Closed - Cancelled",
"Closed - Unfilled",
"Closed - Pickup expired"
]
},
"cancellationReasonId": {
"description": "The id of the request reason",
"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}$"
},
"cancelledByUserId": {
"description": "The id of the user that cancelled the request",
"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}$"
},
"cancellationAdditionalInformation": {
"description": "Additional information about a cancellation",
"type": "string"
},
"cancelledDate": {
"description": "Date the request was cancelled",
"type": "string",
"format": "date-time"
},
"position": {
"description": "position of the request in a per-item request queue",
"type": "integer",
"minimum": 1
},
"instance": {
"description": "Copy of some instance metadata (used for searching and sorting)",
"type": "object",
"properties": {
"title": {
"description": "title of the item",
"type": "string"
},
"identifiers": {
"type": "array",
"description": "An extensible set of name-value pairs of identifiers associated with the resource",
"minItems": 0,
"items": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "Resource identifier value"
},
"identifierTypeId": {
"type": "string",
"description": "UUID of resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
}
},
"additionalProperties": false,
"required": [
"value",
"identifierTypeId"
]
}
}
}
},
"item": {
"description": "Copy of some item metadata (used for searching and sorting)",
"type": "object",
"properties": {
"barcode": {
"description": "barcode of the item",
"type": "string"
}
},
"additionalProperties": false
},
"requester": {
"description": "Copy of some requesting patron metadata (used for searching and sorting), will be taken from the user referred to by the requesterId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"patronGroupId": {
"description": "UUID for the patron group that this user belongs to",
"type": "string",
"readonly": true,
"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}$"
},
"patronGroup": {
"description": "record for the user's patron group",
"type": "object",
"additionalProperties": false,
"readonly": true,
"properties": {
"id": {
"description": "ID of the patron group",
"type": "string",
"readonly": true,
"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}$"
},
"group": {
"description": "The unique name of the patron group",
"type": "string",
"readonly": true
},
"desc": {
"description": "A description of the patron group",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"proxy": {
"description": "Copy of some proxy patron metadata (used for searching and sorting), will be taken from the user referred to by the proxyUserId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"patronGroupId": {
"description": "UUID for the patrongroup that this user belongs to",
"type": "string",
"readonly": true,
"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}$"
},
"patronGroup": {
"description": "record for the user's patrongroup",
"type": "object",
"readonly": true,
"additionalProperties": false,
"properties": {
"id": {
"description": "ID of the patrongroup",
"type": "string",
"readonly": true,
"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}$"
},
"group": {
"description": "The unique name of the patrongroup",
"type": "string",
"readonly": true
},
"desc": {
"description": "A description of the patrongroup",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"fulfilmentPreference": {
"description": "How should the request be fulfilled (whether the item should be kept on the hold shelf for collection or delivered to the requester)",
"type": "string",
"enum": [
"Hold Shelf",
"Delivery"
]
},
"deliveryAddressTypeId": {
"description": "Deliver to the address of this type, for the requesting patron",
"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}$"
},
"deliveryAddress": {
"description": "Address the item is to be delivered to (derived from requester information)",
"type": "object",
"readonly": true,
"properties": {
"addressLine1": {
"description": "Address line 1",
"type": "string",
"readonly": true
},
"addressLine2": {
"description": "Address line 2",
"type": "string",
"readonly": true
},
"city": {
"description": "City name",
"type": "string",
"readonly": true
},
"region": {
"description": "Region",
"type": "string",
"readonly": true
},
"postalCode": {
"description": "Postal code",
"type": "string",
"readonly": true
},
"countryId": {
"description": "Country code",
"type": "string",
"readonly": true
},
"addressTypeId": {
"description": "Type of address (refers to address types)",
"type": "string",
"readonly": true,
"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
},
"requestExpirationDate": {
"description": "Date when the request expires",
"type": "string",
"format": "date-time"
},
"holdShelfExpirationDate": {
"description": "Date when an item returned to the hold shelf expires",
"type": "string",
"format": "date-time"
},
"pickupServicePointId": {
"description": "The ID of the Service Point where this request can be picked up",
"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}$"
},
"pickupServicePoint": {
"description": "The full object of the Service Point record from pickupServicePointId",
"additionalProperties": false,
"readonly": true,
"properties": {
"name": {
"description": "Unique name for the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Unique code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human-readable name for the service point",
"type": "string",
"readonly": true
},
"description": {
"description": "Description of the service point",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Shelving lag time",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this service point a pickup location?",
"type": "boolean",
"readonly": true
}
}
},
"tags": {
"type": "object",
"description": "Tags",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "tags",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"metadata": {
"description": "Metadata about creation and changes to requests, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"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}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"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}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
},
"requestProcessingParameters": {
"type": "object",
"description": "Additional parameters used for request processing and discarded afterwards. Not part of request record.",
"properties": {
"overrideBlocks": {
"type": "object",
"description": "Blocks to override if user has corresponding permissions",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"itemNotLoanableBlock": {
"description": "'Item not loanable' block",
"type": "object",
"properties": {
"dueDate": {
"description": "Due date for a new loan",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"dueDate"
]
},
"patronBlock": {
"description": "Automated patron block",
"type": "object",
"additionalProperties": false
},
"itemLimitBlock": {
"description": "Item limit block",
"type": "object",
"additionalProperties": false
},
"renewalBlock": {
"description": "Renewal block",
"type": "object",
"additionalProperties": false
},
"renewalDueDateRequiredBlock": {
"description": "Override renewal block which requires due date field",
"type": "object",
"properties": {
"dueDate": {
"description": "Due date for a new loan",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"dueDate"
]
},
"comment": {
"description": "Reason for override",
"type": "string"
}
},
"additionalProperties": false
}
}
}
},
"additionalProperties": false,
"required": [
"requesterId",
"requestType",
"requestDate",
"fulfilmentPreference"
]
}
},
"totalRecords": {
"description": "Total number of item requests",
"type": "integer"
}
},
"required": [
"requests",
"totalRecords"
]
}
Example:
{
"requests": [
{
"id": "89105c06-dbdb-4aa0-9695-d4d19c733270",
"requestType": "Recall",
"requestLevel": "Item",
"requestDate": "2017-07-29T22:25:37Z",
"requesterId": "21932a85-bd00-446b-9565-46e0c1a5490b",
"itemId": "195efae1-588f-47bd-a181-13a2eb437701",
"instanceId": "195efae1-588f-47bd-a181-13a2eb434521",
"holdingsRecordId": "195efae1-588f-47bd-a181-13a2eb434521",
"fulfilmentPreference": "Hold Shelf",
"position": 1
},
{
"id": "f5cec279-0da6-4b44-a3df-f49b0903f325",
"requestType": "Hold",
"requestLevel": "Item",
"requestDate": "2017-08-05T11:43:23Z",
"requesterId": "61d939e4-f2ae-4c53-95d2-224a802fa2a6",
"itemId": "3e5d5433-a271-499c-94f4-5f3e4652e537",
"instanceId": "1e7d3354-a271-499c-94f4-5f3e4652a345",
"holdingsRecordId": "296efae1-588f-47bd-a181-13a2eb434521",
"fulfilmentPreference": "Delivery",
"requestExpirationDate": "2017-08-31T22:25:37Z",
"holdShelfExpirationDate": "2017-09-01T22:25:37Z",
"position": 1,
"instance": {
"title": "Children of Time"
},
"item": {
"barcode": "760932543816"
},
"requester": {
"firstName": "Stephen",
"lastName": "Jones",
"middleName": "Anthony",
"barcode": "567023127436"
},
"tags": {
"tagList": [
"new",
"important"
]
}
}
],
"totalRecords": 2
}
HTTP status code 404
Queue for item not found.
HTTP status code 422
Validation errors.
Body
Media type: text/plain
Type: any
Example:
Page requests can not be displaced from position 1.
HTTP status code 500
Internal server error.
Body
Media type: text/plain
Type: any
Example:
Internal server error.
Creates a request for any item from the given instance ID
post /circulation/requests/instances
Creates a request for any item from the given instance ID
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "A request for any item based on the specified instance ID",
"description": "Request for any item selected from the instance that might be at a different location or already checked out to another patron",
"type": "object",
"properties": {
"requestDate": {
"description": "Date the request was made",
"type": "string",
"format": "date-time"
},
"requesterId": {
"description": "ID of the user who made the request",
"type": "string",
"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}$"
},
"instanceId": {
"description": "ID of the instance being requested",
"type": "string",
"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}$"
},
"requestLevel": {
"description": "Level of the request - Item or Title",
"type": "string",
"enum": ["Item", "Title"]
},
"requestExpirationDate": {
"description": "Date when the request expires",
"type": "string",
"format": "date-time"
},
"pickupServicePointId": {
"description": "The ID of the Service Point where this request can be picked up",
"type": "string",
"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}$"
},
"patronComments": {
"description": "Comments made by the patron",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"instanceId",
"requestLevel",
"requesterId",
"requestDate",
"pickupServicePointId"
]
}
Example:
{
"requestDate": "2017-07-29T22:25:37Z",
"requesterId": "21932a85-bd00-446b-9565-46e0c1a5490b",
"instanceId": "195efae1-588f-47bd-a181-13a2eb437701",
"requestLevel": "Item",
"requestExpirationDate": "2017-07-25T22:25:37Z",
"pickupServicePointId": "8359f2bc-b83e-48e1-8a5b-ca1a74e840de"
}
HTTP status code 201
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "A request for an item",
"description": "Request for an item that might be at a different location or already checked out to another patron",
"type": "object",
"properties": {
"id": {
"description": "UUID of the request",
"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}$"
},
"requestType": {
"description": "Whether the item should be held upon return, recalled or paged for",
"type": "string",
"enum": [
"Hold",
"Recall",
"Page"
]
},
"requestLevel": {
"description": "Level of the request - Item or Title",
"type": "string",
"enum": [
"Item"
]
},
"requestDate": {
"description": "Date the request was made",
"type": "string",
"format": "date-time"
},
"patronComments": {
"description": "Comments made by the patron",
"type": "string"
},
"requesterId": {
"description": "ID of the user who made the request",
"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}$"
},
"proxyUserId": {
"description": "ID of the user representing a proxy for the patron",
"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}$"
},
"instanceId": {
"description": "ID of the instance being requested",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"holdingsRecordId": {
"description": "ID of the holdings record being requested",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"itemId": {
"description": "ID of the item being requested",
"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}$"
},
"status": {
"description": "Status of the request",
"type": "string",
"enum": [
"Open - Not yet filled",
"Open - Awaiting pickup",
"Open - In transit",
"Open - Awaiting delivery",
"Closed - Filled",
"Closed - Cancelled",
"Closed - Unfilled",
"Closed - Pickup expired"
]
},
"cancellationReasonId": {
"description": "The id of the request reason",
"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}$"
},
"cancelledByUserId": {
"description": "The id of the user that cancelled the request",
"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}$"
},
"cancellationAdditionalInformation": {
"description": "Additional information about a cancellation",
"type": "string"
},
"cancelledDate": {
"description": "Date the request was cancelled",
"type": "string",
"format": "date-time"
},
"position": {
"description": "position of the request in a per-item request queue",
"type": "integer",
"minimum": 1
},
"instance": {
"description": "Copy of some instance metadata (used for searching and sorting)",
"type": "object",
"properties": {
"title": {
"description": "title of the item",
"type": "string"
},
"identifiers": {
"type": "array",
"description": "An extensible set of name-value pairs of identifiers associated with the resource",
"minItems": 0,
"items": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "Resource identifier value"
},
"identifierTypeId": {
"type": "string",
"description": "UUID of resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)",
"$schema": "http://json-schema.org/draft-04/schema#",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
}
},
"additionalProperties": false,
"required": [
"value",
"identifierTypeId"
]
}
}
}
},
"item": {
"description": "Copy of some item metadata (used for searching and sorting)",
"type": "object",
"properties": {
"barcode": {
"description": "barcode of the item",
"type": "string"
}
},
"additionalProperties": false
},
"requester": {
"description": "Copy of some requesting patron metadata (used for searching and sorting), will be taken from the user referred to by the requesterId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode of the patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"patronGroupId": {
"description": "UUID for the patron group that this user belongs to",
"type": "string",
"readonly": true,
"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}$"
},
"patronGroup": {
"description": "record for the user's patron group",
"type": "object",
"additionalProperties": false,
"readonly": true,
"properties": {
"id": {
"description": "ID of the patron group",
"type": "string",
"readonly": true,
"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}$"
},
"group": {
"description": "The unique name of the patron group",
"type": "string",
"readonly": true
},
"desc": {
"description": "A description of the patron group",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"proxy": {
"description": "Copy of some proxy patron metadata (used for searching and sorting), will be taken from the user referred to by the proxyUserId",
"readonly": true,
"type": "object",
"properties": {
"firstName": {
"description": "first name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"lastName": {
"description": "last name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"middleName": {
"description": "middle name of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"barcode": {
"description": "barcode of the proxy patron (read only, defined by the server)",
"type": "string",
"readonly": true
},
"patronGroupId": {
"description": "UUID for the patrongroup that this user belongs to",
"type": "string",
"readonly": true,
"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}$"
},
"patronGroup": {
"description": "record for the user's patrongroup",
"type": "object",
"readonly": true,
"additionalProperties": false,
"properties": {
"id": {
"description": "ID of the patrongroup",
"type": "string",
"readonly": true,
"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}$"
},
"group": {
"description": "The unique name of the patrongroup",
"type": "string",
"readonly": true
},
"desc": {
"description": "A description of the patrongroup",
"type": "string",
"readonly": true
}
}
}
},
"additionalProperties": false
},
"fulfilmentPreference": {
"description": "How should the request be fulfilled (whether the item should be kept on the hold shelf for collection or delivered to the requester)",
"type": "string",
"enum": [
"Hold Shelf",
"Delivery"
]
},
"deliveryAddressTypeId": {
"description": "Deliver to the address of this type, for the requesting patron",
"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}$"
},
"deliveryAddress": {
"description": "Address the item is to be delivered to (derived from requester information)",
"type": "object",
"readonly": true,
"properties": {
"addressLine1": {
"description": "Address line 1",
"type": "string",
"readonly": true
},
"addressLine2": {
"description": "Address line 2",
"type": "string",
"readonly": true
},
"city": {
"description": "City name",
"type": "string",
"readonly": true
},
"region": {
"description": "Region",
"type": "string",
"readonly": true
},
"postalCode": {
"description": "Postal code",
"type": "string",
"readonly": true
},
"countryId": {
"description": "Country code",
"type": "string",
"readonly": true
},
"addressTypeId": {
"description": "Type of address (refers to address types)",
"type": "string",
"readonly": true,
"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
},
"requestExpirationDate": {
"description": "Date when the request expires",
"type": "string",
"format": "date-time"
},
"holdShelfExpirationDate": {
"description": "Date when an item returned to the hold shelf expires",
"type": "string",
"format": "date-time"
},
"pickupServicePointId": {
"description": "The ID of the Service Point where this request can be picked up",
"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}$"
},
"pickupServicePoint": {
"description": "The full object of the Service Point record from pickupServicePointId",
"additionalProperties": false,
"readonly": true,
"properties": {
"name": {
"description": "Unique name for the service point",
"type": "string",
"readonly": true
},
"code": {
"description": "Unique code for the service point",
"type": "string",
"readonly": true
},
"discoveryDisplayName": {
"description": "Human-readable name for the service point",
"type": "string",
"readonly": true
},
"description": {
"description": "Description of the service point",
"type": "string",
"readonly": true
},
"shelvingLagTime": {
"description": "Shelving lag time",
"type": "integer",
"readonly": true
},
"pickupLocation": {
"description": "Is this service point a pickup location?",
"type": "boolean",
"readonly": true
}
}
},
"tags": {
"type": "object",
"description": "Tags",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "tags",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"metadata": {
"description": "Metadata about creation and changes to requests, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"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}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"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}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
},
"requestProcessingParameters": {
"type": "object",
"description": "Additional parameters used for request processing and discarded afterwards. Not part of request record.",
"properties": {
"overrideBlocks": {
"type": "object",
"description": "Blocks to override if user has corresponding permissions",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"itemNotLoanableBlock": {
"description": "'Item not loanable' block",
"type": "object",
"properties": {
"dueDate": {
"description": "Due date for a new loan",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"dueDate"
]
},
"patronBlock": {
"description": "Automated patron block",
"type": "object",
"additionalProperties": false
},
"itemLimitBlock": {
"description": "Item limit block",
"type": "object",
"additionalProperties": false
},
"renewalBlock": {
"description": "Renewal block",
"type": "object",
"additionalProperties": false
},
"renewalDueDateRequiredBlock": {
"description": "Override renewal block which requires due date field",
"type": "object",
"properties": {
"dueDate": {
"description": "Due date for a new loan",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"dueDate"
]
},
"comment": {
"description": "Reason for override",
"type": "string"
}
},
"additionalProperties": false
}
}
}
},
"additionalProperties": false,
"required": [
"requesterId",
"requestType",
"requestDate",
"fulfilmentPreference"
]
}
Example:
{
"id": "89105c06-dbdb-4aa0-9695-d4d19c733270",
"requestType": "Recall",
"requestDate": "2017-07-29T22:25:37Z",
"requesterId": "21932a85-bd00-446b-9565-46e0c1a5490b",
"holdingsRecordId": "e63273e7-48f5-4c43-ab4e-1751ecacaa21",
"instanceId": "86c722c3-2f5e-42e1-bd0e-7ffbbd3b4972",
"requestLevel": "Item",
"itemId": "195efae1-588f-47bd-a181-13a2eb437701",
"fulfilmentPreference": "Hold Shelf",
"requestExpirationDate": "2017-07-25T22:25:37Z",
"position": 1,
"instance": {
"title": "Children of Time"
},
"item": {
"barcode": "760932543816"
},
"tags": {
"tagList": [
"new",
"important"
]
}
}
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A collection of extended errors",
"type": "object",
"properties": {
"errors": {
"description": "List of extended errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An extended error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
"overridableBlock": {
"type": "object",
"description": "Details of an overridable block the error is related to",
"properties": {
"name": {
"type": "string",
"description": "Name of the block",
"enum": [
"patronBlock",
"itemLimitBlock",
"itemNotLoanableBlock"
]
},
"missingPermissions": {
"type": "array",
"description": "Missing Okapi permissions required to override the block",
"items": {
"type": "string"
}
}
},
"required": [
"name",
"missingPermissions"
]
}
},
"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
Body
Media type: text/plain
Type: any
Example:
Internal server error