openapi: 3.2.0 info: title: Folio Circulation Bff API version: v1 description: 'Operations tagged Circulation Bff across 2 of this provider''s published API definitions: folio-mod-circulation-bff-circulationbff-openapi.json, folio-mod-circulation-bff-circulationbff-openapi.yml. Each path carries the servers of the definition it was published in.' tags: - name: Circulation Bff paths: /circulation-bff/requests: post: operationId: createRequest description: Create ECS TLR or Circulation request parameters: - in: header name: X-Okapi-Tenant required: true schema: type: string description: The tenant ID for the request requestBody: content: application/json: schema: $ref: '#/components/schemas/bffRequest' required: true responses: '201': description: Instances by query extended with item information content: application/json: schema: $ref: '#/components/schemas/request' '400': $ref: '#/components/responses/badRequestResponse' '422': $ref: '#/components/responses/unprocessableEntityResponse' '500': $ref: '#/components/responses/internalServerErrorResponse' tags: - Circulation Bff summary: Create request x-summary-source: derived /circulation-bff/loans/check-in-by-barcode: post: operationId: checkInByBarcode description: Checks item in by barcode requestBody: content: application/json: schema: $ref: '#/components/schemas/checkInRequest' required: true responses: '200': description: Item successfully checked in content: application/json: schema: $ref: '#/components/schemas/checkInResponse' '400': $ref: '#/components/responses/badRequestResponse' '422': $ref: '#/components/responses/unprocessableEntityResponse' '500': $ref: '#/components/responses/internalServerErrorResponse' tags: - Circulation Bff summary: Check in by barcode x-summary-source: derived /circulation-bff/loans/check-out-by-barcode: post: operationId: checkOutByBarcode description: Checks item out by barcode requestBody: content: application/json: schema: $ref: '#/components/schemas/checkOutRequest' required: true responses: '200': description: Item successfully checked out content: application/json: schema: $ref: '#/components/schemas/checkOutResponse' '400': $ref: '#/components/responses/badRequestResponse' '422': $ref: '#/components/responses/unprocessableEntityResponse' '500': $ref: '#/components/responses/internalServerErrorResponse' tags: - Circulation Bff summary: Check out by barcode x-summary-source: derived components: schemas: parameter: description: List of key/value parameters of an error type: object properties: key: description: Parameter key type: string value: description: Parameter value type: string example: key: source value: 'null' checkOutResponse: type: object description: Check-out response properties: id: description: Unique ID (generated UUID) of the loan type: string userId: description: ID of the patron the item was lent to. Required for open loans, not required for closed loans (for anonymization). type: string borrower: description: Additional information about the borrower of the item, taken from the user referred to by the userId type: object properties: firstName: description: First name of the borrower (read-only, defined by the server) type: string lastName: description: Last name of the borrower (read-only, defined by the server) type: string middleName: description: Middle name of the borrower (read-only, defined by the server) type: string barcode: description: Barcode used to identify the borrower (read-only, defined by the server) type: string preferredFirstName: description: Preferred first name of the borrower (read-only, defined by the server) type: string patronGroup: description: Current patron group of the borrower (read-only, defined by the server) type: string additionalProperties: true proxyUserId: description: ID of the user representing a proxy for the patron type: string itemId: description: ID of the item lent to the patron type: string loanPolicyId: description: ID of last policy used in relation to this loan type: string loanPolicy: description: Additional information about the loan policy of the item, taken from the loanPolicyId type: object properties: name: description: Name of last policy used in relation to this loan (read-only, defined by the server) type: string additionalProperties: true overdueFinePolicyId: description: ID of last overdue fine policy used in relation to this loan type: string overdueFinePolicy: description: Additional information about the overdue fine policy of the item type: object properties: name: description: Name of last overdue fine policy used (read-only, defined by the server) type: string additionalProperties: true lostItemPolicyId: description: ID of last lost item policy used in relation to this loan type: string lostItemPolicy: description: Additional information about the lost item policy type: object properties: name: description: Name of last lost item policy used (read-only, defined by the server) type: string additionalProperties: true 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 barcode: description: The barcode of the item type: string status: description: Overall status of the item type: object properties: name: description: Name of the item status type: string date: description: Date time when status was last changed type: string format: date-time additionalProperties: true additionalProperties: true 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 action: description: Last action performed on a loan (e.g., checkedout, checkedin) type: string renewalCount: description: Count of how many times a loan has been renewed type: integer minimum: 0 feesAndFines: description: Fees and fines associated with loans type: object properties: amountRemainingToPay: description: Total remaining amount due on fees and fines for the loan (read-only, defined by the server) type: number additionalProperties: true metadata: description: Metadata about creation and changes to loan, provided by the server (client should not provide) type: object additionalProperties: true requestSearchIndex: $schema: http://json-schema.org/draft-04/schema# description: Request fields used for search type: object 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 bffRequest: 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 $ref: '#/components/schemas/uuid' 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 $ref: '#/components/schemas/uuid' proxyUserId: description: ID of the user representing a proxy for the patron type: string $ref: '#/components/schemas/uuid' instanceId: description: ID of the instance being requested type: string $ref: '#/components/schemas/uuid' holdingsRecordId: description: ID of the holdings record being requested type: string $ref: '#/components/schemas/uuid' itemId: description: ID of the item being requested type: string $ref: '#/components/schemas/uuid' item: description: Copy of some item metadata (used for searching and sorting) type: object properties: barcode: description: barcode of the item type: string additionalProperties: true 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 $ref: '#/components/schemas/uuid' patronGroup: type: string description: record for the user's patrongroup additionalProperties: true 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 $ref: '#/components/schemas/uuid' patronGroup: description: record for the user's patrongroup type: object readonly: true properties: id: description: ID of the patrongroup type: string readonly: true $ref: '#/components/schemas/uuid' group: description: The unique name of the patrongroup type: string readonly: true desc: description: A description of the patrongroup type: string readonly: true 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 $ref: '#/components/schemas/uuid' 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 $ref: '#/components/schemas/uuid' 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 $ref: '#/components/schemas/uuid' tags: type: object description: Tags $ref: '#/components/schemas/uuid' metadata: description: Metadata about creation and changes to requests, provided by the server (client should not provide) type: object $ref: '#/components/schemas/metadata' 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 $ref: '#/components/schemas/overrideBlocks' required: - requesterId - requestType - requestDate - fulfillmentPreference - instanceId - requestLevel overrideBlocks: $schema: http://json-schema.org/draft-04/schema# type: object description: Blocks to override (e.g. during checkout or renewal) 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 checkInRequest: type: object description: Check-in request properties: itemBarcode: description: Item barcode type: string servicePointId: description: ID of the service point where item is being checked-in type: string format: uuid checkInDate: description: Date and time of item check-in type: string format: date-time claimedReturnedResolution: description: Describes how the library resolved the situation where the item was claimed returned type: string 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 format: uuid required: - itemBarcode - servicePointId - checkInDate metadata: type: object description: Record metadata properties: createdDate: description: Date and time when the record was created type: string createdByUserId: description: ID of the user who created the record (when available) type: string 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 updatedByUserId: description: ID of the user who last updated the record (when available) type: string updatedByUsername: description: Username of the user who last updated the record (when available) type: string errorResponse: description: A set of errors type: object properties: errors: description: List of errors type: array items: $ref: '#/components/schemas/error' total_records: description: Total number of errors type: integer example: errors: - message: Illegal argument error type: IllegalArgumentException code: unknown_error total_records: 1 checkOutRequest: type: object description: Check-out request 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 format: uuid overrideBlocks: description: Blocks to override type: object properties: itemNotLoanableBlock: description: '''Item not loanable'' block' type: object properties: dueDate: description: Due date for a new loan type: string format: date-time required: - dueDate patronBlock: description: Automated patron block type: object itemLimitBlock: description: Item limit block type: object renewalBlock: description: Renewal block type: object 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 required: - dueDate comment: description: Reason for override type: string required: - itemBarcode - userBarcode - servicePointId request: 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 $ref: '#/components/schemas/uuid' 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 ecsRequestPhase: description: Stage in ECS request process, absence of this field means this is a single-tenant request type: string enum: - Primary - Secondary 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 $ref: '#/components/schemas/uuid' proxyUserId: description: ID of the user representing a proxy for the patron type: string $ref: '#/components/schemas/uuid' instanceId: description: ID of the instance being requested type: string $ref: '#/components/schemas/uuid' holdingsRecordId: description: ID of the holdings record being requested type: string $ref: '#/components/schemas/uuid' itemId: description: ID of the item being requested type: string $ref: '#/components/schemas/uuid' 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 $ref: '#/components/schemas/uuid' cancelledByUserId: description: The id of the user that cancelled the request type: string $ref: '#/components/schemas/uuid' 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) $ref: '#/components/schemas/uuid' required: - value - identifierTypeId additionalProperties: true item: description: Copy of some item metadata (used for searching and sorting) type: object properties: barcode: description: barcode of the item type: string additionalProperties: true 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 $ref: '#/components/schemas/uuid' patronGroup: type: object description: record for the user's patrongroup $ref: '#/components/schemas/patronGroup' additionalProperties: true 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 $ref: '#/components/schemas/uuid' patronGroup: description: record for the user's patrongroup type: object readonly: true properties: id: description: ID of the patrongroup type: string readonly: true $ref: '#/components/schemas/uuid' group: description: The unique name of the patrongroup type: string readonly: true desc: description: A description of the patrongroup type: string readonly: true 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 $ref: '#/components/schemas/uuid' 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 $ref: '#/components/schemas/uuid' 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 $ref: '#/components/schemas/uuid' pickupServicePoint: description: The full object of the Service Point record from pickupServicePointId readonly: true properties: name: description: Unique name for the service point type: string readonly: true code: description: Unique code for the service point type: string readonly: true discoveryDisplayName: description: Human-readable name for the service point type: string readonly: true description: description: Description of the service point type: string readonly: true shelvingLagTime: description: Shelving lag time type: integer readonly: true pickupLocation: description: Is this service point a pickup location? type: boolean readonly: true tags: type: object description: Tags $ref: '#/components/schemas/uuid' metadata: description: Metadata about creation and changes to requests, provided by the server (client should not provide) type: object $ref: '#/components/schemas/metadata' 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 $ref: '#/components/schemas/overrideBlocks' searchIndex: description: Request fields used for search type: object $ref: '#/components/schemas/requestSearchIndex' batchRequestInfo: description: Information about the batch request this request is part of type: object properties: batchRequestId: description: ID of the batch request type: string $ref: '#/components/schemas/uuid' batchRequestSubmittedAt: description: Date and time when the batch request was submitted type: string format: date-time additionalProperties: false required: - batchRequestId - batchRequestSubmittedAt required: - requesterId - requestType - requestDate - fulfillmentPreference patronGroup: description: patron group type: object properties: id: description: ID of the patron group type: string $ref: '#/components/schemas/uuid' group: description: The unique name of the patron group type: string desc: description: A description of the patron group type: string checkInResponse: type: object description: Check-in response properties: item: description: Item data type: object properties: id: description: Item ID type: string instanceId: description: Related Instance Id type: string holdingsRecordId: description: Related holding record id type: string title: description: Related title type: string barcode: description: Barcode of 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 inTransitDestinationServicePoint: description: Service point an item is intended to be transited to (should only be present when in transit) type: object properties: id: description: The ID of the service point type: string name: description: Name of the service point type: string location: description: Effective location of the item type: object properties: name: description: Name of the location type: string enumeration: description: Enumeration of the item type: string volume: description: Volume of the item type: string chronology: description: Chronology of the item type: string displaySummary: description: Display summary of the item type: string copyNumber: description: Copy number of the item type: string callNumber: description: Call number of the item type: string additionalProperties: true staffSlipContext: description: Staff slips data type: object properties: item: description: Staff slips item data type: object properties: title: description: Title of the instance record type: string primaryContributor: description: Primary contributor name from the instance record type: string allContributors: description: List of contributor names from the instance record concatenated with semicolon type: string barcode: description: Barcode of the item type: string status: description: Status of the item type: string enumeration: description: Enumeration of the item type: string volume: description: Volume of the item type: string chronology: description: Chronology of the item type: string yearCaption: description: Year caption of the item type: string materialType: description: Material type of the item type: string loanType: description: Loan type of the item type: string copy: description: Copy number of the item type: string numberOfPieces: description: Number of item pieces type: string displaySummary: description: Display summary of the item type: string descriptionOfPieces: description: Description of item pieces type: string effectiveLocationSpecific: description: Name of the effective location type: string effectiveLocationLibrary: description: Library name of the effective location type: string effectiveLocationCampus: description: Campus name of the effective location type: string effectiveLocationInstitution: description: Institution name of the effective location type: string effectiveLocationDiscoveryDisplayName: description: Discovery display name of the effective location type: string effectiveLocationPrimaryServicePointName: description: Primary service point name of the effective location type: string callNumber: description: Call number of the item type: string callNumberPrefix: description: Prefix of the item's call number type: string callNumberSuffix: description: Suffix of the item's call number type: string lastCheckedInDateTime: description: Last checked in date of the item type: string format: date-time toServicePoint: description: Destination service point of the item type: string fromServicePoint: description: Last checked in service point of the item type: string additionalProperties: true additionalProperties: true loan: description: Links the item with the patron and applies certain conditions based on policies type: object properties: id: description: Unique ID of the loan type: string userId: description: Unique ID of the user who has borrowed the item type: string borrower: description: Additional information about the borrower of the item, taken from the user referred to by the userId type: object properties: firstName: description: First name of the borrower type: string lastName: description: Last name of the borrower type: string middleName: description: Middle name of the borrower type: string barcode: description: Barcode used to identify the borrower type: string preferredFirstName: description: Preferred first name of the borrower type: string patronGroup: description: Current patron group of the borrower type: string additionalProperties: true item: description: Item data type: object properties: id: description: Item ID type: string inTransitDestinationServicePointId: description: Service point an item is intended to be transited to (should only be present when in transit) type: string inTransitDestinationServicePoint: description: Service point an item is intended to be transited to (should only be present when in transit) type: object properties: id: description: The ID of the service point type: string name: description: Name of the service point type: string location: description: Effective location of the item type: object properties: name: description: Name of the location type: string instanceId: description: Related Instance Id type: string holdingsRecordId: description: Related holding record id type: string additionalProperties: true additionalProperties: true uuid: $schema: http://json-schema.org/draft-04/schema# description: A universally unique identifier (UUID), this is a 128-bit number used to identify a record and is shown in hex with dashes, for example 6312d172-f0cf-40f6-b27d-9fa8feaf332f; the UUID version must be from 1-5; see https://dev.folio.org/guides/uuids/ 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}$ error: description: An error type: object properties: message: type: string description: Error message text type: type: string description: Error message type code: type: string description: Error message code parameters: type: array items: $ref: '#/components/schemas/parameter' examples: unknownError: value: errors: - message: Illegal argument error type: IllegalArgumentException code: unknown_error total_records: 1 validationErrorResponse: value: errors: - message: must not be null type: MethodArgumentNotValidException code: validation_error parameters: - key: parameter value: 'null' total_records: 1 responses: internalServerErrorResponse: description: When unhandled exception occurred during code execution, e.g. NullPointerException. content: application/json: schema: $ref: '#/components/schemas/errorResponse' examples: unknownError: $ref: '#/components/examples/unknownError' unprocessableEntityResponse: description: Validation error for the request. content: application/json: schema: $ref: '#/components/schemas/errorResponse' examples: response: $ref: '#/components/examples/validationErrorResponse' badRequestResponse: description: Validation errors content: application/json: schema: $ref: '#/components/schemas/errorResponse' examples: validationErrorResponse: $ref: '#/components/examples/validationErrorResponse' x-refined-from: - folio-mod-circulation-bff-circulationbff-openapi.json - folio-mod-circulation-bff-circulationbff-openapi.yml