Circulation (v14.2)

http://localhost:9130

Table of contents

Circulation Business Logic API

API for loans and requests

/circulation

POST /circulation/check-out-by-barcode

Creates a loan by checking out an item to a loanee

POST /circulation/check-out-by-barcode
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"
    },
    "forceLoanPolicyId": {
      "description": "Force loan policy",
      "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}$"
    }
  },
  "required": [
    "itemBarcode",
    "userBarcode",
    "servicePointId"
  ]
}

Example:

{
  "userBarcode": "466983136459401",
  "proxyUserBarcode": "693750137582350",
  "itemBarcode": "2887532577331",
  "servicePointId": "3260a6f0-0b53-4d9c-ad74-2dba3830d69f"
}

Response 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
        },
        "preferredFirstName": {
          "description": "preferred first name of the borrower (read only, defined by the server)",
          "type": "string",
          "readonly": true
        },
        "patronGroup": {
          "description": "current patron group of 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
          }
        },
        "primaryContributor": {
          "description": "primary contributor of the item",
          "type": "string",
          "readonly": true
        },
        "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
        },
        "displaySummary": {
          "description": "Display summary about the item",
          "type": "string"
        },
        "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"
        }
      }
    },
    "forUseAtLocation": {
      "description": "Status of loan/item that is to be used in the library",
      "type": "object",
      "properties": {
        "status": {
          "description": "Indicates if the item is currently used by or being held for the patron",
          "type": "string",
          "enum": [
            "In use",
            "Held",
            "Returned"
          ]
        },
        "statusDate": {
          "description": "Date and time the status was registered",
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "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"
    },
    "isDcb": {
      "description": "Indicates whether or not this loan is associated for DCB use case",
      "type": "boolean"
    },
    "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#",
      "id": "metadata.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"
      }
    ],
    "primaryContributor" : "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",
    "preferredFirstName" : "preferredFirstName",
    "patronGroup" : "3684a786-6671-4268-8ed0-9db82ebca60b"
  },
  "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
}

Response 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#",
            "id": "parameters.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"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

POST /circulation/renew-by-barcode

Updates the due date of an existing loan

POST /circulation/renew-by-barcode
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"
  }
}

Response 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
        },
        "preferredFirstName": {
          "description": "preferred first name of the borrower (read only, defined by the server)",
          "type": "string",
          "readonly": true
        },
        "patronGroup": {
          "description": "current patron group of 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
          }
        },
        "primaryContributor": {
          "description": "primary contributor of the item",
          "type": "string",
          "readonly": true
        },
        "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
        },
        "displaySummary": {
          "description": "Display summary about the item",
          "type": "string"
        },
        "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"
        }
      }
    },
    "forUseAtLocation": {
      "description": "Status of loan/item that is to be used in the library",
      "type": "object",
      "properties": {
        "status": {
          "description": "Indicates if the item is currently used by or being held for the patron",
          "type": "string",
          "enum": [
            "In use",
            "Held",
            "Returned"
          ]
        },
        "statusDate": {
          "description": "Date and time the status was registered",
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "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"
    },
    "isDcb": {
      "description": "Indicates whether or not this loan is associated for DCB use case",
      "type": "boolean"
    },
    "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#",
      "id": "metadata.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"
      }
    ],
    "primaryContributor" : "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",
    "preferredFirstName" : "preferredFirstName",
    "patronGroup" : "3684a786-6671-4268-8ed0-9db82ebca60b"
  },
  "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
}

Response 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
        },
        "preferredFirstName": {
          "description": "preferred first name of the borrower (read only, defined by the server)",
          "type": "string",
          "readonly": true
        },
        "patronGroup": {
          "description": "current patron group of 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
          }
        },
        "primaryContributor": {
          "description": "primary contributor of the item",
          "type": "string",
          "readonly": true
        },
        "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
        },
        "displaySummary": {
          "description": "Display summary about the item",
          "type": "string"
        },
        "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"
        }
      }
    },
    "forUseAtLocation": {
      "description": "Status of loan/item that is to be used in the library",
      "type": "object",
      "properties": {
        "status": {
          "description": "Indicates if the item is currently used by or being held for the patron",
          "type": "string",
          "enum": [
            "In use",
            "Held",
            "Returned"
          ]
        },
        "statusDate": {
          "description": "Date and time the status was registered",
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "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"
    },
    "isDcb": {
      "description": "Indicates whether or not this loan is associated for DCB use case",
      "type": "boolean"
    },
    "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#",
      "id": "metadata.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"
      }
    ],
    "primaryContributor" : "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",
    "preferredFirstName" : "preferredFirstName",
    "patronGroup" : "3684a786-6671-4268-8ed0-9db82ebca60b"
  },
  "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
}

Response 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#",
            "id": "parameters.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"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

POST /circulation/renew-by-id

Updates the due date of an existing loan

POST /circulation/renew-by-id
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"
}

Response 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
        },
        "preferredFirstName": {
          "description": "preferred first name of the borrower (read only, defined by the server)",
          "type": "string",
          "readonly": true
        },
        "patronGroup": {
          "description": "current patron group of 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
          }
        },
        "primaryContributor": {
          "description": "primary contributor of the item",
          "type": "string",
          "readonly": true
        },
        "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
        },
        "displaySummary": {
          "description": "Display summary about the item",
          "type": "string"
        },
        "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"
        }
      }
    },
    "forUseAtLocation": {
      "description": "Status of loan/item that is to be used in the library",
      "type": "object",
      "properties": {
        "status": {
          "description": "Indicates if the item is currently used by or being held for the patron",
          "type": "string",
          "enum": [
            "In use",
            "Held",
            "Returned"
          ]
        },
        "statusDate": {
          "description": "Date and time the status was registered",
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "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"
    },
    "isDcb": {
      "description": "Indicates whether or not this loan is associated for DCB use case",
      "type": "boolean"
    },
    "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#",
      "id": "metadata.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"
      }
    ],
    "primaryContributor" : "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",
    "preferredFirstName" : "preferredFirstName",
    "patronGroup" : "3684a786-6671-4268-8ed0-9db82ebca60b"
  },
  "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
}

Response 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
        },
        "preferredFirstName": {
          "description": "preferred first name of the borrower (read only, defined by the server)",
          "type": "string",
          "readonly": true
        },
        "patronGroup": {
          "description": "current patron group of 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
          }
        },
        "primaryContributor": {
          "description": "primary contributor of the item",
          "type": "string",
          "readonly": true
        },
        "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
        },
        "displaySummary": {
          "description": "Display summary about the item",
          "type": "string"
        },
        "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"
        }
      }
    },
    "forUseAtLocation": {
      "description": "Status of loan/item that is to be used in the library",
      "type": "object",
      "properties": {
        "status": {
          "description": "Indicates if the item is currently used by or being held for the patron",
          "type": "string",
          "enum": [
            "In use",
            "Held",
            "Returned"
          ]
        },
        "statusDate": {
          "description": "Date and time the status was registered",
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "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"
    },
    "isDcb": {
      "description": "Indicates whether or not this loan is associated for DCB use case",
      "type": "boolean"
    },
    "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#",
      "id": "metadata.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"
      }
    ],
    "primaryContributor" : "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",
    "preferredFirstName" : "preferredFirstName",
    "patronGroup" : "3684a786-6671-4268-8ed0-9db82ebca60b"
  },
  "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
}

Response 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#",
            "id": "parameters.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"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

POST /circulation/check-in-by-barcode

Updates the status of an existing loan

POST /circulation/check-in-by-barcode
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",
      "$ref": "raml-util/schemas/uuid.schema"
    },
    "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"
      ]
    },
    "sessionId": {
      "description": "Randomly generated UUID which must be the same for all check-in requests issued in scope of the same check-in session ",
      "type": "string",
      "$ref": "raml-util/schemas/uuid.schema"
    }
  },
  "additionalProperties": false,
  "required": [
    "itemBarcode",
    "checkInDate",
    "servicePointId"
  ]
}

Example:

{
  "itemBarcode": "2887532577331",
  "servicePointId": "8359f2bc-b83e-48e1-8a5b-ca1a74e840de",
  "checkInDate": "2018-03-05T14:23:41.000Z",
  "sessionId": "c97910a2-9f98-4005-ae88-e448bd26489f"
}

Response 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
            },
            "preferredFirstName": {
              "description": "preferred first name of the borrower (read only, defined by the server)",
              "type": "string",
              "readonly": true
            },
            "patronGroup": {
              "description": "current patron group of 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
              }
            },
            "primaryContributor": {
              "description": "primary contributor of the item",
              "type": "string",
              "readonly": true
            },
            "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
            },
            "displaySummary": {
              "description": "Display summary about the item",
              "type": "string"
            },
            "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"
            }
          }
        },
        "forUseAtLocation": {
          "description": "Status of loan/item that is to be used in the library",
          "type": "object",
          "properties": {
            "status": {
              "description": "Indicates if the item is currently used by or being held for the patron",
              "type": "string",
              "enum": [
                "In use",
                "Held",
                "Returned"
              ]
            },
            "statusDate": {
              "description": "Date and time the status was registered",
              "type": "string",
              "format": "date-time"
            }
          }
        },
        "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"
        },
        "isDcb": {
          "description": "Indicates whether or not this loan is associated for DCB use case",
          "type": "boolean"
        },
        "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#",
          "id": "metadata.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"
        },
        "displaySummary": {
          "description": "Display summary about the item",
          "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"
    }
  }
}

Response 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#",
            "id": "parameters.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"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

GET /circulation/loans

Retrieve a list of loan items.

GET /circulation/loans
Query Parameters
  • totalRecords: (string - default: auto - pattern: exact|estimated|none|auto)

    How to calculate the totalRecords property. "exact" for the correct number, "estimated" for an estimation, "auto" to automatically select "exact" or "estimated", "none" for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords

    Example:

    none
  • 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. Using limit=0 will return totalRecords with the exact value. For details about totalRecords see https://github.com/folio-org/raml-module-builder#estimated-totalrecords

    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"
    

Response 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
              },
              "preferredFirstName": {
                "description": "preferred first name of the borrower (read only, defined by the server)",
                "type": "string",
                "readonly": true
              },
              "patronGroup": {
                "description": "current patron group of 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
                }
              },
              "primaryContributor": {
                "description": "primary contributor of the item",
                "type": "string",
                "readonly": true
              },
              "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
              },
              "displaySummary": {
                "description": "Display summary about the item",
                "type": "string"
              },
              "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"
              }
            }
          },
          "forUseAtLocation": {
            "description": "Status of loan/item that is to be used in the library",
            "type": "object",
            "properties": {
              "status": {
                "description": "Indicates if the item is currently used by or being held for the patron",
                "type": "string",
                "enum": [
                  "In use",
                  "Held",
                  "Returned"
                ]
              },
              "statusDate": {
                "description": "Date and time the status was registered",
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "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"
          },
          "isDcb": {
            "description": "Indicates whether or not this loan is associated for DCB use case",
            "type": "boolean"
          },
          "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#",
            "id": "metadata.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
}

Response 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

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to list loans -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

Response 501

Not implemented yet

POST /circulation/loans

Create a new loan item.

POST /circulation/loans
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
        },
        "preferredFirstName": {
          "description": "preferred first name of the borrower (read only, defined by the server)",
          "type": "string",
          "readonly": true
        },
        "patronGroup": {
          "description": "current patron group of 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
          }
        },
        "primaryContributor": {
          "description": "primary contributor of the item",
          "type": "string",
          "readonly": true
        },
        "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
        },
        "displaySummary": {
          "description": "Display summary about the item",
          "type": "string"
        },
        "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"
        }
      }
    },
    "forUseAtLocation": {
      "description": "Status of loan/item that is to be used in the library",
      "type": "object",
      "properties": {
        "status": {
          "description": "Indicates if the item is currently used by or being held for the patron",
          "type": "string",
          "enum": [
            "In use",
            "Held",
            "Returned"
          ]
        },
        "statusDate": {
          "description": "Date and time the status was registered",
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "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"
    },
    "isDcb": {
      "description": "Indicates whether or not this loan is associated for DCB use case",
      "type": "boolean"
    },
    "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#",
      "id": "metadata.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"
      }
    ],
    "primaryContributor" : "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",
    "preferredFirstName" : "preferredFirstName",
    "patronGroup" : "3684a786-6671-4268-8ed0-9db82ebca60b"
  },
  "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
}

Response 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"
      }
    ],
    "primaryContributor" : "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",
    "preferredFirstName" : "preferredFirstName",
    "patronGroup" : "3684a786-6671-4268-8ed0-9db82ebca60b"
  },
  "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
}

Response 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"

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to create loans -- unauthorized

Response 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

DELETE /circulation/loans

Response 204

All loans deleted

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

GET /circulation/loans/{loanId}

Retrieve loan item with given {loanId}

GET /circulation/loans/{loanId}
URI Parameters
  • loanId: required (string)

Response 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
        },
        "preferredFirstName": {
          "description": "preferred first name of the borrower (read only, defined by the server)",
          "type": "string",
          "readonly": true
        },
        "patronGroup": {
          "description": "current patron group of 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
          }
        },
        "primaryContributor": {
          "description": "primary contributor of the item",
          "type": "string",
          "readonly": true
        },
        "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
        },
        "displaySummary": {
          "description": "Display summary about the item",
          "type": "string"
        },
        "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"
        }
      }
    },
    "forUseAtLocation": {
      "description": "Status of loan/item that is to be used in the library",
      "type": "object",
      "properties": {
        "status": {
          "description": "Indicates if the item is currently used by or being held for the patron",
          "type": "string",
          "enum": [
            "In use",
            "Held",
            "Returned"
          ]
        },
        "statusDate": {
          "description": "Date and time the status was registered",
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "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"
    },
    "isDcb": {
      "description": "Indicates whether or not this loan is associated for DCB use case",
      "type": "boolean"
    },
    "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#",
      "id": "metadata.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"
      }
    ],
    "primaryContributor" : "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",
    "preferredFirstName" : "preferredFirstName",
    "patronGroup" : "3684a786-6671-4268-8ed0-9db82ebca60b"
  },
  "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
}

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"loan not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

Response 501

Not implemented yet

PUT /circulation/loans/{loanId}

Update loan item with given {loanId}

PUT /circulation/loans/{loanId}
URI Parameters
  • loanId: required (string)
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
        },
        "preferredFirstName": {
          "description": "preferred first name of the borrower (read only, defined by the server)",
          "type": "string",
          "readonly": true
        },
        "patronGroup": {
          "description": "current patron group of 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
          }
        },
        "primaryContributor": {
          "description": "primary contributor of the item",
          "type": "string",
          "readonly": true
        },
        "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
        },
        "displaySummary": {
          "description": "Display summary about the item",
          "type": "string"
        },
        "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"
        }
      }
    },
    "forUseAtLocation": {
      "description": "Status of loan/item that is to be used in the library",
      "type": "object",
      "properties": {
        "status": {
          "description": "Indicates if the item is currently used by or being held for the patron",
          "type": "string",
          "enum": [
            "In use",
            "Held",
            "Returned"
          ]
        },
        "statusDate": {
          "description": "Date and time the status was registered",
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "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"
    },
    "isDcb": {
      "description": "Indicates whether or not this loan is associated for DCB use case",
      "type": "boolean"
    },
    "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#",
      "id": "metadata.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"
      }
    ],
    "primaryContributor" : "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",
    "preferredFirstName" : "preferredFirstName",
    "patronGroup" : "3684a786-6671-4268-8ed0-9db82ebca60b"
  },
  "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
}

Response 204

Item successfully updated

Response 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"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"loan not found"

Response 409

Optimistic locking version conflict

Body

Media type: text/plain

Type: any

Example:

version conflict

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

Response 501

Not implemented yet

DELETE /circulation/loans/{loanId}

Delete loan item with given {loanId}

DELETE /circulation/loans/{loanId}
URI Parameters
  • loanId: required (string)

Response 204

Item deleted successfully

Response 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"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"loan not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

Response 501

Not implemented yet

GET /circulation/requests

Retrieve a list of request items.

GET /circulation/requests
Query Parameters
  • totalRecords: (string - default: auto - pattern: exact|estimated|none|auto)

    How to calculate the totalRecords property. "exact" for the correct number, "estimated" for an estimation, "auto" to automatically select "exact" or "estimated", "none" for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords

    Example:

    none
  • 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. Using limit=0 will return totalRecords with the exact value. For details about totalRecords see https://github.com/folio-org/raml-module-builder#estimated-totalrecords

    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"
    

Response 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",
              "Title"
            ]
          },
          "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#",
            "id": "uuid.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#",
            "id": "uuid.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#",
                      "id": "uuid.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
          },
          "fulfillmentPreference": {
            "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
              }
            }
          },
          "printDetails": {
            "description": "The print details of the request",
            "type": "object",
            "readonly": true,
            "properties": {
              "printCount": {
                "description": "Total no of times the request is printed",
                "type": "integer",
                "readOnly": true
              },
              "requesterId": {
                "description": "User uuid of last print requester",
                "type": "string",
                "readOnly": true
              },
              "isPrinted": {
                "description": "Whether the request is ever printed",
                "type": "boolean",
                "readOnly": true
              },
              "printEventDate": {
                "description": "Recent printed time of the request",
                "type": "string",
                "format": "date-time",
                "readOnly": true
              },
              "lastPrintRequester": {
                "description": "Details of the User who printed the request recently",
                "readonly": true,
                "type": "object",
                "properties": {
                  "firstName": {
                    "description": "first name of the user",
                    "type": "string",
                    "readonly": true
                  },
                  "lastName": {
                    "description": "last name of the user",
                    "type": "string",
                    "readonly": true
                  },
                  "middleName": {
                    "description": "middle name of the user",
                    "type": "string",
                    "readonly": true
                  }
                }
              }
            }
          },
          "tags": {
            "type": "object",
            "description": "Tags",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "tags.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#",
            "id": "metadata.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
              }
            }
          },
          "searchIndex": {
            "description": "Request fields used for search",
            "type": "object",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "properties": {
              "callNumberComponents": {
                "type": "object",
                "description": "Effective call number components",
                "properties": {
                  "callNumber": {
                    "type": "string",
                    "description": "Effective Call Number is an identifier assigned to an item or its holding and associated with the item."
                  },
                  "prefix": {
                    "type": "string",
                    "description": "Effective Call Number Prefix is the prefix of the identifier assigned to an item or its holding and associated with the item."
                  },
                  "suffix": {
                    "type": "string",
                    "description": "Effective Call Number Suffix is the suffix of the identifier assigned to an item or its holding and associated with the item."
                  }
                },
                "additionalProperties": false
              },
              "shelvingOrder": {
                "type": "string",
                "description": "A system generated normalization of the call number that allows for call number sorting in reports and search results"
              },
              "pickupServicePointName": {
                "description": "The name of the request pickup service point",
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "itemLocationCode": {
            "description": "Allow specifying item location when creating title-level requests",
            "type": "string"
          },
          "isDcbReRequestCancellation": {
            "description": "Indicates whether the request was cancelled during a DCB transaction update",
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "required": [
          "requesterId",
          "requestType",
          "requestDate",
          "fulfillmentPreference"
        ]
      }
    },
    "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",
      "fulfillmentPreference": "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",
      "fulfillmentPreference": "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
}

Response 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

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to list requests -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

Response 501

Not implemented yet

POST /circulation/requests

Create a new request item.

POST /circulation/requests
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",
        "Title"
      ]
    },
    "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#",
      "id": "uuid.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#",
      "id": "uuid.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#",
                "id": "uuid.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
    },
    "fulfillmentPreference": {
      "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
        }
      }
    },
    "printDetails": {
      "description": "The print details of the request",
      "type": "object",
      "readonly": true,
      "properties": {
        "printCount": {
          "description": "Total no of times the request is printed",
          "type": "integer",
          "readOnly": true
        },
        "requesterId": {
          "description": "User uuid of last print requester",
          "type": "string",
          "readOnly": true
        },
        "isPrinted": {
          "description": "Whether the request is ever printed",
          "type": "boolean",
          "readOnly": true
        },
        "printEventDate": {
          "description": "Recent printed time of the request",
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "lastPrintRequester": {
          "description": "Details of the User who printed the request recently",
          "readonly": true,
          "type": "object",
          "properties": {
            "firstName": {
              "description": "first name of the user",
              "type": "string",
              "readonly": true
            },
            "lastName": {
              "description": "last name of the user",
              "type": "string",
              "readonly": true
            },
            "middleName": {
              "description": "middle name of the user",
              "type": "string",
              "readonly": true
            }
          }
        }
      }
    },
    "tags": {
      "type": "object",
      "description": "Tags",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "tags.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#",
      "id": "metadata.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
        }
      }
    },
    "searchIndex": {
      "description": "Request fields used for search",
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "properties": {
        "callNumberComponents": {
          "type": "object",
          "description": "Effective call number components",
          "properties": {
            "callNumber": {
              "type": "string",
              "description": "Effective Call Number is an identifier assigned to an item or its holding and associated with the item."
            },
            "prefix": {
              "type": "string",
              "description": "Effective Call Number Prefix is the prefix of the identifier assigned to an item or its holding and associated with the item."
            },
            "suffix": {
              "type": "string",
              "description": "Effective Call Number Suffix is the suffix of the identifier assigned to an item or its holding and associated with the item."
            }
          },
          "additionalProperties": false
        },
        "shelvingOrder": {
          "type": "string",
          "description": "A system generated normalization of the call number that allows for call number sorting in reports and search results"
        },
        "pickupServicePointName": {
          "description": "The name of the request pickup service point",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "itemLocationCode": {
      "description": "Allow specifying item location when creating title-level requests",
      "type": "string"
    },
    "isDcbReRequestCancellation": {
      "description": "Indicates whether the request was cancelled during a DCB transaction update",
      "type": "boolean"
    }
  },
  "additionalProperties": false,
  "required": [
    "requesterId",
    "requestType",
    "requestDate",
    "fulfillmentPreference"
  ]
}

Example:

{
  "id": "89105c06-dbdb-4aa0-9695-d4d19c733270",
  "requestLevel": "Item",
  "requestType": "Hold",
  "status": "Open - Not yet filled",
  "requestDate": "2023-03-23T11:04:25.000+00:00",
  "requestExpirationDate": "2023-06-23T11:04:25.000+00:00",
  "requesterId": "21932a85-bd00-446b-9565-46e0c1a5490b",
  "requester": {
    "barcode": "1234",
    "lastName": "Lastname",
    "firstName": "Firstname"
  },
  "instanceId": "86c722c3-2f5e-42e1-bd0e-7ffbbd3b4972",
  "instance": {
    "title": "Children of Time",
    "identifiers": [
      {
        "value": "0123456789",
        "identifierTypeId": "8261054f-9876-422d-bd51-4ed9f33c7654"
      },
      {
        "value": "98765432123456",
        "identifierTypeId": "8261054f-9876-422d-bd51-4ed9f33c7654"
      }
    ]
  },
  "holdingsRecordId": "e63273e7-48f5-4c43-ab4e-1751ecacaa21",
  "itemId": "195efae1-588f-47bd-a181-13a2eb437701",
  "item": {
    "barcode": "760932543816"
  },
  "position": 1,
  "fulfillmentPreference": "Hold Shelf",
  "pickupServicePointId": "3a40852d-49fd-4df2-a1f9-6e2641a6e91f",
  "tags": {
    "tagList": [
      "new",
      "important"
    ]
  },
  "searchIndex": {
    "shelvingOrder": "F 416 H37 A2 59001",
    "callNumberComponents": {
      "callNumber": "F16.H37 A2 9001"
    },
    "pickupServicePointName": "Circ Desk 1"
  },
  "printDetails": {
    "printCount": 32,
    "requesterId": "21457ab5-4635-4e56-906a-908f05e9233b",
    "isPrinted": true,
    "printEventDate": "2024-09-13T06:34:16.035+00:00",
    "lastPrintRequester": {
      "firstName": "firstName",
      "lastName": "lastName",
      "middleName": "middleName"
    }
  }
}

Response 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",
  "requestLevel": "Item",
  "requestType": "Hold",
  "status": "Open - Not yet filled",
  "requestDate": "2023-03-23T11:04:25.000+00:00",
  "requestExpirationDate": "2023-06-23T11:04:25.000+00:00",
  "requesterId": "21932a85-bd00-446b-9565-46e0c1a5490b",
  "requester": {
    "barcode": "1234",
    "lastName": "Lastname",
    "firstName": "Firstname"
  },
  "instanceId": "86c722c3-2f5e-42e1-bd0e-7ffbbd3b4972",
  "instance": {
    "title": "Children of Time",
    "identifiers": [
      {
        "value": "0123456789",
        "identifierTypeId": "8261054f-9876-422d-bd51-4ed9f33c7654"
      },
      {
        "value": "98765432123456",
        "identifierTypeId": "8261054f-9876-422d-bd51-4ed9f33c7654"
      }
    ]
  },
  "holdingsRecordId": "e63273e7-48f5-4c43-ab4e-1751ecacaa21",
  "itemId": "195efae1-588f-47bd-a181-13a2eb437701",
  "item": {
    "barcode": "760932543816"
  },
  "position": 1,
  "fulfillmentPreference": "Hold Shelf",
  "pickupServicePointId": "3a40852d-49fd-4df2-a1f9-6e2641a6e91f",
  "tags": {
    "tagList": [
      "new",
      "important"
    ]
  },
  "searchIndex": {
    "shelvingOrder": "F 416 H37 A2 59001",
    "callNumberComponents": {
      "callNumber": "F16.H37 A2 9001"
    },
    "pickupServicePointName": "Circ Desk 1"
  },
  "printDetails": {
    "printCount": 32,
    "requesterId": "21457ab5-4635-4e56-906a-908f05e9233b",
    "isPrinted": true,
    "printEventDate": "2024-09-13T06:34:16.035+00:00",
    "lastPrintRequester": {
      "firstName": "firstName",
      "lastName": "lastName",
      "middleName": "middleName"
    }
  }
}

Response 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"

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to create requests -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

Response 501

Not implemented yet

DELETE /circulation/requests

DELETE /circulation/requests

Response 204

All requests deleted

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

Response 501

Not implemented yet

GET /circulation/requests/{requestId}

Retrieve request item with given {requestId}

GET /circulation/requests/{requestId}
URI Parameters
  • requestId: required (string)

Response 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",
        "Title"
      ]
    },
    "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#",
      "id": "uuid.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#",
      "id": "uuid.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#",
                "id": "uuid.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
    },
    "fulfillmentPreference": {
      "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
        }
      }
    },
    "printDetails": {
      "description": "The print details of the request",
      "type": "object",
      "readonly": true,
      "properties": {
        "printCount": {
          "description": "Total no of times the request is printed",
          "type": "integer",
          "readOnly": true
        },
        "requesterId": {
          "description": "User uuid of last print requester",
          "type": "string",
          "readOnly": true
        },
        "isPrinted": {
          "description": "Whether the request is ever printed",
          "type": "boolean",
          "readOnly": true
        },
        "printEventDate": {
          "description": "Recent printed time of the request",
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "lastPrintRequester": {
          "description": "Details of the User who printed the request recently",
          "readonly": true,
          "type": "object",
          "properties": {
            "firstName": {
              "description": "first name of the user",
              "type": "string",
              "readonly": true
            },
            "lastName": {
              "description": "last name of the user",
              "type": "string",
              "readonly": true
            },
            "middleName": {
              "description": "middle name of the user",
              "type": "string",
              "readonly": true
            }
          }
        }
      }
    },
    "tags": {
      "type": "object",
      "description": "Tags",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "tags.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#",
      "id": "metadata.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
        }
      }
    },
    "searchIndex": {
      "description": "Request fields used for search",
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "properties": {
        "callNumberComponents": {
          "type": "object",
          "description": "Effective call number components",
          "properties": {
            "callNumber": {
              "type": "string",
              "description": "Effective Call Number is an identifier assigned to an item or its holding and associated with the item."
            },
            "prefix": {
              "type": "string",
              "description": "Effective Call Number Prefix is the prefix of the identifier assigned to an item or its holding and associated with the item."
            },
            "suffix": {
              "type": "string",
              "description": "Effective Call Number Suffix is the suffix of the identifier assigned to an item or its holding and associated with the item."
            }
          },
          "additionalProperties": false
        },
        "shelvingOrder": {
          "type": "string",
          "description": "A system generated normalization of the call number that allows for call number sorting in reports and search results"
        },
        "pickupServicePointName": {
          "description": "The name of the request pickup service point",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "itemLocationCode": {
      "description": "Allow specifying item location when creating title-level requests",
      "type": "string"
    },
    "isDcbReRequestCancellation": {
      "description": "Indicates whether the request was cancelled during a DCB transaction update",
      "type": "boolean"
    }
  },
  "additionalProperties": false,
  "required": [
    "requesterId",
    "requestType",
    "requestDate",
    "fulfillmentPreference"
  ]
}

Example:

{
  "id": "89105c06-dbdb-4aa0-9695-d4d19c733270",
  "requestLevel": "Item",
  "requestType": "Hold",
  "status": "Open - Not yet filled",
  "requestDate": "2023-03-23T11:04:25.000+00:00",
  "requestExpirationDate": "2023-06-23T11:04:25.000+00:00",
  "requesterId": "21932a85-bd00-446b-9565-46e0c1a5490b",
  "requester": {
    "barcode": "1234",
    "lastName": "Lastname",
    "firstName": "Firstname"
  },
  "instanceId": "86c722c3-2f5e-42e1-bd0e-7ffbbd3b4972",
  "instance": {
    "title": "Children of Time",
    "identifiers": [
      {
        "value": "0123456789",
        "identifierTypeId": "8261054f-9876-422d-bd51-4ed9f33c7654"
      },
      {
        "value": "98765432123456",
        "identifierTypeId": "8261054f-9876-422d-bd51-4ed9f33c7654"
      }
    ]
  },
  "holdingsRecordId": "e63273e7-48f5-4c43-ab4e-1751ecacaa21",
  "itemId": "195efae1-588f-47bd-a181-13a2eb437701",
  "item": {
    "barcode": "760932543816"
  },
  "position": 1,
  "fulfillmentPreference": "Hold Shelf",
  "pickupServicePointId": "3a40852d-49fd-4df2-a1f9-6e2641a6e91f",
  "tags": {
    "tagList": [
      "new",
      "important"
    ]
  },
  "searchIndex": {
    "shelvingOrder": "F 416 H37 A2 59001",
    "callNumberComponents": {
      "callNumber": "F16.H37 A2 9001"
    },
    "pickupServicePointName": "Circ Desk 1"
  },
  "printDetails": {
    "printCount": 32,
    "requesterId": "21457ab5-4635-4e56-906a-908f05e9233b",
    "isPrinted": true,
    "printEventDate": "2024-09-13T06:34:16.035+00:00",
    "lastPrintRequester": {
      "firstName": "firstName",
      "lastName": "lastName",
      "middleName": "middleName"
    }
  }
}

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"request not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

Response 501

Not implemented yet

PUT /circulation/requests/{requestId}

Update request item with given {requestId}

PUT /circulation/requests/{requestId}
URI Parameters
  • requestId: required (string)
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",
        "Title"
      ]
    },
    "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#",
      "id": "uuid.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#",
      "id": "uuid.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#",
                "id": "uuid.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
    },
    "fulfillmentPreference": {
      "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
        }
      }
    },
    "printDetails": {
      "description": "The print details of the request",
      "type": "object",
      "readonly": true,
      "properties": {
        "printCount": {
          "description": "Total no of times the request is printed",
          "type": "integer",
          "readOnly": true
        },
        "requesterId": {
          "description": "User uuid of last print requester",
          "type": "string",
          "readOnly": true
        },
        "isPrinted": {
          "description": "Whether the request is ever printed",
          "type": "boolean",
          "readOnly": true
        },
        "printEventDate": {
          "description": "Recent printed time of the request",
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "lastPrintRequester": {
          "description": "Details of the User who printed the request recently",
          "readonly": true,
          "type": "object",
          "properties": {
            "firstName": {
              "description": "first name of the user",
              "type": "string",
              "readonly": true
            },
            "lastName": {
              "description": "last name of the user",
              "type": "string",
              "readonly": true
            },
            "middleName": {
              "description": "middle name of the user",
              "type": "string",
              "readonly": true
            }
          }
        }
      }
    },
    "tags": {
      "type": "object",
      "description": "Tags",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "tags.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#",
      "id": "metadata.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
        }
      }
    },
    "searchIndex": {
      "description": "Request fields used for search",
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "properties": {
        "callNumberComponents": {
          "type": "object",
          "description": "Effective call number components",
          "properties": {
            "callNumber": {
              "type": "string",
              "description": "Effective Call Number is an identifier assigned to an item or its holding and associated with the item."
            },
            "prefix": {
              "type": "string",
              "description": "Effective Call Number Prefix is the prefix of the identifier assigned to an item or its holding and associated with the item."
            },
            "suffix": {
              "type": "string",
              "description": "Effective Call Number Suffix is the suffix of the identifier assigned to an item or its holding and associated with the item."
            }
          },
          "additionalProperties": false
        },
        "shelvingOrder": {
          "type": "string",
          "description": "A system generated normalization of the call number that allows for call number sorting in reports and search results"
        },
        "pickupServicePointName": {
          "description": "The name of the request pickup service point",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "itemLocationCode": {
      "description": "Allow specifying item location when creating title-level requests",
      "type": "string"
    },
    "isDcbReRequestCancellation": {
      "description": "Indicates whether the request was cancelled during a DCB transaction update",
      "type": "boolean"
    }
  },
  "additionalProperties": false,
  "required": [
    "requesterId",
    "requestType",
    "requestDate",
    "fulfillmentPreference"
  ]
}

Example:

{
  "id": "89105c06-dbdb-4aa0-9695-d4d19c733270",
  "requestLevel": "Item",
  "requestType": "Hold",
  "status": "Open - Not yet filled",
  "requestDate": "2023-03-23T11:04:25.000+00:00",
  "requestExpirationDate": "2023-06-23T11:04:25.000+00:00",
  "requesterId": "21932a85-bd00-446b-9565-46e0c1a5490b",
  "requester": {
    "barcode": "1234",
    "lastName": "Lastname",
    "firstName": "Firstname"
  },
  "instanceId": "86c722c3-2f5e-42e1-bd0e-7ffbbd3b4972",
  "instance": {
    "title": "Children of Time",
    "identifiers": [
      {
        "value": "0123456789",
        "identifierTypeId": "8261054f-9876-422d-bd51-4ed9f33c7654"
      },
      {
        "value": "98765432123456",
        "identifierTypeId": "8261054f-9876-422d-bd51-4ed9f33c7654"
      }
    ]
  },
  "holdingsRecordId": "e63273e7-48f5-4c43-ab4e-1751ecacaa21",
  "itemId": "195efae1-588f-47bd-a181-13a2eb437701",
  "item": {
    "barcode": "760932543816"
  },
  "position": 1,
  "fulfillmentPreference": "Hold Shelf",
  "pickupServicePointId": "3a40852d-49fd-4df2-a1f9-6e2641a6e91f",
  "tags": {
    "tagList": [
      "new",
      "important"
    ]
  },
  "searchIndex": {
    "shelvingOrder": "F 416 H37 A2 59001",
    "callNumberComponents": {
      "callNumber": "F16.H37 A2 9001"
    },
    "pickupServicePointName": "Circ Desk 1"
  },
  "printDetails": {
    "printCount": 32,
    "requesterId": "21457ab5-4635-4e56-906a-908f05e9233b",
    "isPrinted": true,
    "printEventDate": "2024-09-13T06:34:16.035+00:00",
    "lastPrintRequester": {
      "firstName": "firstName",
      "lastName": "lastName",
      "middleName": "middleName"
    }
  }
}

Response 204

Item successfully updated

Response 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"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"request not found"

Response 409

Optimistic locking version conflict

Body

Media type: text/plain

Type: any

Example:

version conflict

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

Response 501

Not implemented yet

DELETE /circulation/requests/{requestId}

Delete request item with given {requestId}

DELETE /circulation/requests/{requestId}
URI Parameters
  • requestId: required (string)

Response 204

Item deleted successfully

Response 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"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"request not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

Response 501

Not implemented yet

GET /circulation/requests/queue/instance/{instanceId}

Retrieve instance item with given {instanceId}

GET /circulation/requests/queue/instance/{instanceId}
URI Parameters
  • instanceId: required (string)

Response 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",
              "Title"
            ]
          },
          "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#",
            "id": "uuid.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#",
            "id": "uuid.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#",
                      "id": "uuid.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
          },
          "fulfillmentPreference": {
            "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
              }
            }
          },
          "printDetails": {
            "description": "The print details of the request",
            "type": "object",
            "readonly": true,
            "properties": {
              "printCount": {
                "description": "Total no of times the request is printed",
                "type": "integer",
                "readOnly": true
              },
              "requesterId": {
                "description": "User uuid of last print requester",
                "type": "string",
                "readOnly": true
              },
              "isPrinted": {
                "description": "Whether the request is ever printed",
                "type": "boolean",
                "readOnly": true
              },
              "printEventDate": {
                "description": "Recent printed time of the request",
                "type": "string",
                "format": "date-time",
                "readOnly": true
              },
              "lastPrintRequester": {
                "description": "Details of the User who printed the request recently",
                "readonly": true,
                "type": "object",
                "properties": {
                  "firstName": {
                    "description": "first name of the user",
                    "type": "string",
                    "readonly": true
                  },
                  "lastName": {
                    "description": "last name of the user",
                    "type": "string",
                    "readonly": true
                  },
                  "middleName": {
                    "description": "middle name of the user",
                    "type": "string",
                    "readonly": true
                  }
                }
              }
            }
          },
          "tags": {
            "type": "object",
            "description": "Tags",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "tags.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#",
            "id": "metadata.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
              }
            }
          },
          "searchIndex": {
            "description": "Request fields used for search",
            "type": "object",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "properties": {
              "callNumberComponents": {
                "type": "object",
                "description": "Effective call number components",
                "properties": {
                  "callNumber": {
                    "type": "string",
                    "description": "Effective Call Number is an identifier assigned to an item or its holding and associated with the item."
                  },
                  "prefix": {
                    "type": "string",
                    "description": "Effective Call Number Prefix is the prefix of the identifier assigned to an item or its holding and associated with the item."
                  },
                  "suffix": {
                    "type": "string",
                    "description": "Effective Call Number Suffix is the suffix of the identifier assigned to an item or its holding and associated with the item."
                  }
                },
                "additionalProperties": false
              },
              "shelvingOrder": {
                "type": "string",
                "description": "A system generated normalization of the call number that allows for call number sorting in reports and search results"
              },
              "pickupServicePointName": {
                "description": "The name of the request pickup service point",
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "itemLocationCode": {
            "description": "Allow specifying item location when creating title-level requests",
            "type": "string"
          },
          "isDcbReRequestCancellation": {
            "description": "Indicates whether the request was cancelled during a DCB transaction update",
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "required": [
          "requesterId",
          "requestType",
          "requestDate",
          "fulfillmentPreference"
        ]
      }
    },
    "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",
      "fulfillmentPreference": "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",
      "fulfillmentPreference": "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",
      "fulfillmentPreference": "Hold Shelf",
      "position": 3
    }
  ],
  "totalRecords": 2
}

Response 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"

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

"unable to list instance -- unauthorized"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"instance not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

POST /circulation/requests/queue/instance/{instanceId}/reorder

Reorder requests in the instance queue

POST /circulation/requests/queue/instance/{instanceId}/reorder
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
    }
  ]
}

Response 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",
              "Title"
            ]
          },
          "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#",
            "id": "uuid.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#",
            "id": "uuid.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#",
                      "id": "uuid.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
          },
          "fulfillmentPreference": {
            "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
              }
            }
          },
          "printDetails": {
            "description": "The print details of the request",
            "type": "object",
            "readonly": true,
            "properties": {
              "printCount": {
                "description": "Total no of times the request is printed",
                "type": "integer",
                "readOnly": true
              },
              "requesterId": {
                "description": "User uuid of last print requester",
                "type": "string",
                "readOnly": true
              },
              "isPrinted": {
                "description": "Whether the request is ever printed",
                "type": "boolean",
                "readOnly": true
              },
              "printEventDate": {
                "description": "Recent printed time of the request",
                "type": "string",
                "format": "date-time",
                "readOnly": true
              },
              "lastPrintRequester": {
                "description": "Details of the User who printed the request recently",
                "readonly": true,
                "type": "object",
                "properties": {
                  "firstName": {
                    "description": "first name of the user",
                    "type": "string",
                    "readonly": true
                  },
                  "lastName": {
                    "description": "last name of the user",
                    "type": "string",
                    "readonly": true
                  },
                  "middleName": {
                    "description": "middle name of the user",
                    "type": "string",
                    "readonly": true
                  }
                }
              }
            }
          },
          "tags": {
            "type": "object",
            "description": "Tags",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "tags.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#",
            "id": "metadata.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
              }
            }
          },
          "searchIndex": {
            "description": "Request fields used for search",
            "type": "object",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "properties": {
              "callNumberComponents": {
                "type": "object",
                "description": "Effective call number components",
                "properties": {
                  "callNumber": {
                    "type": "string",
                    "description": "Effective Call Number is an identifier assigned to an item or its holding and associated with the item."
                  },
                  "prefix": {
                    "type": "string",
                    "description": "Effective Call Number Prefix is the prefix of the identifier assigned to an item or its holding and associated with the item."
                  },
                  "suffix": {
                    "type": "string",
                    "description": "Effective Call Number Suffix is the suffix of the identifier assigned to an item or its holding and associated with the item."
                  }
                },
                "additionalProperties": false
              },
              "shelvingOrder": {
                "type": "string",
                "description": "A system generated normalization of the call number that allows for call number sorting in reports and search results"
              },
              "pickupServicePointName": {
                "description": "The name of the request pickup service point",
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "itemLocationCode": {
            "description": "Allow specifying item location when creating title-level requests",
            "type": "string"
          },
          "isDcbReRequestCancellation": {
            "description": "Indicates whether the request was cancelled during a DCB transaction update",
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "required": [
          "requesterId",
          "requestType",
          "requestDate",
          "fulfillmentPreference"
        ]
      }
    },
    "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",
      "fulfillmentPreference": "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",
      "fulfillmentPreference": "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
}

Response 404

Queue for item not found.

Response 422

Validation errors.

Body

Media type: text/plain

Type: any

Example:

Page requests can not be displaced from position 1.

Response 500

Internal server error.

Body

Media type: text/plain

Type: any

Example:

Internal server error.

GET /circulation/requests/queue/item/{itemId}

Retrieve item item with given {itemId}

GET /circulation/requests/queue/item/{itemId}
URI Parameters
  • itemId: required (string)

Response 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",
              "Title"
            ]
          },
          "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#",
            "id": "uuid.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#",
            "id": "uuid.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#",
                      "id": "uuid.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
          },
          "fulfillmentPreference": {
            "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
              }
            }
          },
          "printDetails": {
            "description": "The print details of the request",
            "type": "object",
            "readonly": true,
            "properties": {
              "printCount": {
                "description": "Total no of times the request is printed",
                "type": "integer",
                "readOnly": true
              },
              "requesterId": {
                "description": "User uuid of last print requester",
                "type": "string",
                "readOnly": true
              },
              "isPrinted": {
                "description": "Whether the request is ever printed",
                "type": "boolean",
                "readOnly": true
              },
              "printEventDate": {
                "description": "Recent printed time of the request",
                "type": "string",
                "format": "date-time",
                "readOnly": true
              },
              "lastPrintRequester": {
                "description": "Details of the User who printed the request recently",
                "readonly": true,
                "type": "object",
                "properties": {
                  "firstName": {
                    "description": "first name of the user",
                    "type": "string",
                    "readonly": true
                  },
                  "lastName": {
                    "description": "last name of the user",
                    "type": "string",
                    "readonly": true
                  },
                  "middleName": {
                    "description": "middle name of the user",
                    "type": "string",
                    "readonly": true
                  }
                }
              }
            }
          },
          "tags": {
            "type": "object",
            "description": "Tags",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "tags.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#",
            "id": "metadata.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
              }
            }
          },
          "searchIndex": {
            "description": "Request fields used for search",
            "type": "object",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "properties": {
              "callNumberComponents": {
                "type": "object",
                "description": "Effective call number components",
                "properties": {
                  "callNumber": {
                    "type": "string",
                    "description": "Effective Call Number is an identifier assigned to an item or its holding and associated with the item."
                  },
                  "prefix": {
                    "type": "string",
                    "description": "Effective Call Number Prefix is the prefix of the identifier assigned to an item or its holding and associated with the item."
                  },
                  "suffix": {
                    "type": "string",
                    "description": "Effective Call Number Suffix is the suffix of the identifier assigned to an item or its holding and associated with the item."
                  }
                },
                "additionalProperties": false
              },
              "shelvingOrder": {
                "type": "string",
                "description": "A system generated normalization of the call number that allows for call number sorting in reports and search results"
              },
              "pickupServicePointName": {
                "description": "The name of the request pickup service point",
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "itemLocationCode": {
            "description": "Allow specifying item location when creating title-level requests",
            "type": "string"
          },
          "isDcbReRequestCancellation": {
            "description": "Indicates whether the request was cancelled during a DCB transaction update",
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "required": [
          "requesterId",
          "requestType",
          "requestDate",
          "fulfillmentPreference"
        ]
      }
    },
    "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",
      "fulfillmentPreference": "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",
      "fulfillmentPreference": "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",
      "fulfillmentPreference": "Hold Shelf",
      "position": 3
    }
  ],
  "totalRecords": 2
}

Response 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"

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

"unable to list item -- unauthorized"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"item not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

POST /circulation/requests/queue/item/{itemId}/reorder

Reorder requests in the item queue

POST /circulation/requests/queue/item/{itemId}/reorder
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
    }
  ]
}

Response 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",
              "Title"
            ]
          },
          "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#",
            "id": "uuid.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#",
            "id": "uuid.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#",
                      "id": "uuid.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
          },
          "fulfillmentPreference": {
            "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
              }
            }
          },
          "printDetails": {
            "description": "The print details of the request",
            "type": "object",
            "readonly": true,
            "properties": {
              "printCount": {
                "description": "Total no of times the request is printed",
                "type": "integer",
                "readOnly": true
              },
              "requesterId": {
                "description": "User uuid of last print requester",
                "type": "string",
                "readOnly": true
              },
              "isPrinted": {
                "description": "Whether the request is ever printed",
                "type": "boolean",
                "readOnly": true
              },
              "printEventDate": {
                "description": "Recent printed time of the request",
                "type": "string",
                "format": "date-time",
                "readOnly": true
              },
              "lastPrintRequester": {
                "description": "Details of the User who printed the request recently",
                "readonly": true,
                "type": "object",
                "properties": {
                  "firstName": {
                    "description": "first name of the user",
                    "type": "string",
                    "readonly": true
                  },
                  "lastName": {
                    "description": "last name of the user",
                    "type": "string",
                    "readonly": true
                  },
                  "middleName": {
                    "description": "middle name of the user",
                    "type": "string",
                    "readonly": true
                  }
                }
              }
            }
          },
          "tags": {
            "type": "object",
            "description": "Tags",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "tags.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#",
            "id": "metadata.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
              }
            }
          },
          "searchIndex": {
            "description": "Request fields used for search",
            "type": "object",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "properties": {
              "callNumberComponents": {
                "type": "object",
                "description": "Effective call number components",
                "properties": {
                  "callNumber": {
                    "type": "string",
                    "description": "Effective Call Number is an identifier assigned to an item or its holding and associated with the item."
                  },
                  "prefix": {
                    "type": "string",
                    "description": "Effective Call Number Prefix is the prefix of the identifier assigned to an item or its holding and associated with the item."
                  },
                  "suffix": {
                    "type": "string",
                    "description": "Effective Call Number Suffix is the suffix of the identifier assigned to an item or its holding and associated with the item."
                  }
                },
                "additionalProperties": false
              },
              "shelvingOrder": {
                "type": "string",
                "description": "A system generated normalization of the call number that allows for call number sorting in reports and search results"
              },
              "pickupServicePointName": {
                "description": "The name of the request pickup service point",
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "itemLocationCode": {
            "description": "Allow specifying item location when creating title-level requests",
            "type": "string"
          },
          "isDcbReRequestCancellation": {
            "description": "Indicates whether the request was cancelled during a DCB transaction update",
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "required": [
          "requesterId",
          "requestType",
          "requestDate",
          "fulfillmentPreference"
        ]
      }
    },
    "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",
      "fulfillmentPreference": "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",
      "fulfillmentPreference": "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
}

Response 404

Queue for item not found.

Response 422

Validation errors.

Body

Media type: text/plain

Type: any

Example:

Page requests can not be displaced from position 1.

Response 500

Internal server error.

Body

Media type: text/plain

Type: any

Example:

Internal server error.

POST /circulation/requests/instances

Creates a request for any item from the given instance ID

POST /circulation/requests/instances
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"
}

Response 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",
        "Title"
      ]
    },
    "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#",
      "id": "uuid.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#",
      "id": "uuid.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#",
                "id": "uuid.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
    },
    "fulfillmentPreference": {
      "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
        }
      }
    },
    "printDetails": {
      "description": "The print details of the request",
      "type": "object",
      "readonly": true,
      "properties": {
        "printCount": {
          "description": "Total no of times the request is printed",
          "type": "integer",
          "readOnly": true
        },
        "requesterId": {
          "description": "User uuid of last print requester",
          "type": "string",
          "readOnly": true
        },
        "isPrinted": {
          "description": "Whether the request is ever printed",
          "type": "boolean",
          "readOnly": true
        },
        "printEventDate": {
          "description": "Recent printed time of the request",
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "lastPrintRequester": {
          "description": "Details of the User who printed the request recently",
          "readonly": true,
          "type": "object",
          "properties": {
            "firstName": {
              "description": "first name of the user",
              "type": "string",
              "readonly": true
            },
            "lastName": {
              "description": "last name of the user",
              "type": "string",
              "readonly": true
            },
            "middleName": {
              "description": "middle name of the user",
              "type": "string",
              "readonly": true
            }
          }
        }
      }
    },
    "tags": {
      "type": "object",
      "description": "Tags",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "tags.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#",
      "id": "metadata.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
        }
      }
    },
    "searchIndex": {
      "description": "Request fields used for search",
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "properties": {
        "callNumberComponents": {
          "type": "object",
          "description": "Effective call number components",
          "properties": {
            "callNumber": {
              "type": "string",
              "description": "Effective Call Number is an identifier assigned to an item or its holding and associated with the item."
            },
            "prefix": {
              "type": "string",
              "description": "Effective Call Number Prefix is the prefix of the identifier assigned to an item or its holding and associated with the item."
            },
            "suffix": {
              "type": "string",
              "description": "Effective Call Number Suffix is the suffix of the identifier assigned to an item or its holding and associated with the item."
            }
          },
          "additionalProperties": false
        },
        "shelvingOrder": {
          "type": "string",
          "description": "A system generated normalization of the call number that allows for call number sorting in reports and search results"
        },
        "pickupServicePointName": {
          "description": "The name of the request pickup service point",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "itemLocationCode": {
      "description": "Allow specifying item location when creating title-level requests",
      "type": "string"
    },
    "isDcbReRequestCancellation": {
      "description": "Indicates whether the request was cancelled during a DCB transaction update",
      "type": "boolean"
    }
  },
  "additionalProperties": false,
  "required": [
    "requesterId",
    "requestType",
    "requestDate",
    "fulfillmentPreference"
  ]
}

Example:

{
  "id": "89105c06-dbdb-4aa0-9695-d4d19c733270",
  "requestLevel": "Item",
  "requestType": "Hold",
  "status": "Open - Not yet filled",
  "requestDate": "2023-03-23T11:04:25.000+00:00",
  "requestExpirationDate": "2023-06-23T11:04:25.000+00:00",
  "requesterId": "21932a85-bd00-446b-9565-46e0c1a5490b",
  "requester": {
    "barcode": "1234",
    "lastName": "Lastname",
    "firstName": "Firstname"
  },
  "instanceId": "86c722c3-2f5e-42e1-bd0e-7ffbbd3b4972",
  "instance": {
    "title": "Children of Time",
    "identifiers": [
      {
        "value": "0123456789",
        "identifierTypeId": "8261054f-9876-422d-bd51-4ed9f33c7654"
      },
      {
        "value": "98765432123456",
        "identifierTypeId": "8261054f-9876-422d-bd51-4ed9f33c7654"
      }
    ]
  },
  "holdingsRecordId": "e63273e7-48f5-4c43-ab4e-1751ecacaa21",
  "itemId": "195efae1-588f-47bd-a181-13a2eb437701",
  "item": {
    "barcode": "760932543816"
  },
  "position": 1,
  "fulfillmentPreference": "Hold Shelf",
  "pickupServicePointId": "3a40852d-49fd-4df2-a1f9-6e2641a6e91f",
  "tags": {
    "tagList": [
      "new",
      "important"
    ]
  },
  "searchIndex": {
    "shelvingOrder": "F 416 H37 A2 59001",
    "callNumberComponents": {
      "callNumber": "F16.H37 A2 9001"
    },
    "pickupServicePointName": "Circ Desk 1"
  },
  "printDetails": {
    "printCount": 32,
    "requesterId": "21457ab5-4635-4e56-906a-908f05e9233b",
    "isPrinted": true,
    "printEventDate": "2024-09-13T06:34:16.035+00:00",
    "lastPrintRequester": {
      "firstName": "firstName",
      "lastName": "lastName",
      "middleName": "middleName"
    }
  }
}

Response 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#",
            "id": "parameters.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"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

GET /circulation/requests/allowed-service-points

Get allowed pickup service points grouped by request type

GET /circulation/requests/allowed-service-points
Query String
  • operation: (one of create, replace, move)

    Operation (create, replace or move)

  • requestId: (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}$)

    Request ID

  • requesterId: (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}$)

    Requester ID

  • itemId: (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}$)

    Item ID

  • instanceId: (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}$)

    Instance ID

  • useStubItem: (boolean)

    When true, allows to apply circulation rules based on patron group only

  • ecsRequestRouting: (boolean)

    When true, returns only service points with ecsRequestRouting

Response 200

List of allowed service points was retrieved successfully

Body

Media type: application/json

Type:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Allowed pickup service points grouped by request type",
  "type": "object",
  "properties": {
    "Page": {
      "description": "Allowed pickup service point IDs for Page requests",
      "type": "array",
      "$ref": "allowed-service-points.json"
    },
    "Hold": {
      "description": "Allowed pickup service point IDs for Hold requests",
      "type": "array",
      "$ref": "allowed-service-points.json"
    },
    "Recall": {
      "description": "Allowed pickup service point IDs for Recall requests",
      "type": "array",
      "$ref": "allowed-service-points.json"
    }
  },
  "additionalProperties": false
}

Example:

{
  "Page": [
    {
      "id": "13934820-81ca-47ed-ac88-6f3e3bab106f",
      "name": "Circ Desk 1"
    }
  ],
  "Hold": [
    {
      "id": "13934820-81ca-47ed-ac88-6f3e3bab106f",
      "name": "Circ Desk 1"
    }
  ]
}

Response 400

Invalid request

Body

Media type: text/plain

Type: any

Example:

Request query parameters must contain 'requester'

Response 422

Validation failure

Body

Media type: text/plain

Type: any

Example:

Validation failed

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error