foliolib.folio.api.circulationItem.Circulationitem
- class foliolib.folio.api.circulationItem.Circulationitem(tenant: str)
Bases:
foliolib.folio.FolioApiCirculation item API
Base class of the Folio API
- Parameters
tenant (str) – Tenant id
Methods
createcirculationitem(circulationItem, ...)Add new circulation item
getcirculationitemsbyquery(**kwargs)Return a list of items based on query
retrievecirculationitembyid(circulationItemId)Retrieve circulation item
updatecirculationitem(circulationItem, ...)Change the circulation item
- createcirculationitem(circulationItem, circulationItemId)
Add new circulation item
POST /circulation-item/{circulationItemId}- Parameters
circulationItem (dict) – See Schema below.
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad request
OkapiRequestUnprocessableEntity – Validation errors
OkapiRequestFatalError – Internal server error
Schema
{ "type": "object", "description": "CirculationItem", "properties": { "id": { "type": "string", "format": "uuid" }, "holdingsRecordId": { "type": "string", "format": "uuid" }, "status": { "type": "object", "description": "status of the Item", "properties": { "name": { "type": "string", "enum": [ "Aged to lost", "Available", "Awaiting delivery", "Awaiting pickup", "Checked out", "Claimed returned", "Declared lost", "Lost and paid", "Long missing", "Missing", "In process", "In process (non-requestable)", "In transit", "Intellectual item", "On order", "Order closed", "Paged", "Restricted", "Unavailable", "Unknown", "Withdrawn" ] }, "date": { "description": "Date of the current item state. E.g. date set when item state was changed by the Check out app", "type": "string", "format": "date-time" } } }, "dcbItem": { "type": "boolean" }, "materialTypeId": { "type": "string" }, "permanentLoanTypeId": { "type": "string" }, "instanceTitle": { "type": "string" }, "barcode": { "type": "string" }, "pickupLocation": { "type": "string" }, "effectiveLocationId": { "type": "string" }, "lendingLibraryCode": { "type": "string" } }, "additionalProperties": false }
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Circulation Item", "type": "object", "properties": { "id": { "$schema": "http://json-schema.org/draft-04/schema#", "description": "Regexp pattern for UUID validation", "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}$" }, "holdingsRecordId": { "$schema": "http://json-schema.org/draft-04/schema#", "description": "Regexp pattern for UUID validation", "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}$" }, "status": { "description": "status", "type": "object", "properties": { "name": { "description": "Enum name of status", "type": "string" }, "date": { "description": "Date status", "type": "string", "format": "date-time" } } }, "materialTypeId": { "description": "material type id", "type": "string" }, "permanentLoanTypeId": { "description": "permanent loan type id", "type": "string" }, "instanceTitle": { "description": "instance title", "type": "string" }, "barcode": { "description": "item barcode", "type": "string" }, "pickupLocation": { "description": "pickup location", "type": "string" }, "lendingLibraryCode": { "description": "5 digit agency code which identifies the lending library", "type": "string" }, "metadata": { "title": "Metadata Schema", "description": "Metadata about creation and changes to records, provided by the server (client should not provide)", "type": "object", "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" ] } }, "additionalProperties": false, "required": [] }
- getcirculationitemsbyquery(**kwargs)
Return a list of items based on query
GET /circulation-item- Keyword Arguments
query (str) – A query expressed as a CQL string (default: cql.allRecords=1)
offset (int) – Skip over a number of elements by specifying an offset value for the query (default: 0, minimum: 0, maximum: 2147483647)
limit (int) – Limit the number of elements returned in the response (default: 1000, minimum: 1, maximum: 2147483647)
- Returns
See Schema below.
- Return type
dict
Schema
{ "allOf": [ { "$ref": "schemas/baseCollection.json" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/circulationItem" } } }, "required": [ "items" ] } ] }
- retrievecirculationitembyid(circulationItemId)
Retrieve circulation item
GET /circulation-item/{circulationItemId}- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestNotFound – Circulation Item not found
OkapiRequestFatalError – Internal server error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Circulation Item", "type": "object", "properties": { "id": { "$schema": "http://json-schema.org/draft-04/schema#", "description": "Regexp pattern for UUID validation", "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}$" }, "holdingsRecordId": { "$schema": "http://json-schema.org/draft-04/schema#", "description": "Regexp pattern for UUID validation", "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}$" }, "status": { "description": "status", "type": "object", "properties": { "name": { "description": "Enum name of status", "type": "string" }, "date": { "description": "Date status", "type": "string", "format": "date-time" } } }, "materialTypeId": { "description": "material type id", "type": "string" }, "permanentLoanTypeId": { "description": "permanent loan type id", "type": "string" }, "instanceTitle": { "description": "instance title", "type": "string" }, "barcode": { "description": "item barcode", "type": "string" }, "pickupLocation": { "description": "pickup location", "type": "string" }, "lendingLibraryCode": { "description": "5 digit agency code which identifies the lending library", "type": "string" }, "metadata": { "title": "Metadata Schema", "description": "Metadata about creation and changes to records, provided by the server (client should not provide)", "type": "object", "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" ] } }, "additionalProperties": false, "required": [] }
- updatecirculationitem(circulationItem, circulationItemId)
Change the circulation item
PUT /circulation-item/{circulationItemId}- Parameters
circulationItem (dict) – See Schema below.
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad request
OkapiRequestNotFound – Circulation Item not found
OkapiRequestFatalError – Internal server error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Circulation Item", "type": "object", "properties": { "id": { "$schema": "http://json-schema.org/draft-04/schema#", "description": "Regexp pattern for UUID validation", "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}$" }, "holdingsRecordId": { "$schema": "http://json-schema.org/draft-04/schema#", "description": "Regexp pattern for UUID validation", "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}$" }, "status": { "description": "status", "type": "object", "properties": { "name": { "description": "Enum name of status", "type": "string" }, "date": { "description": "Date status", "type": "string", "format": "date-time" } } }, "materialTypeId": { "description": "material type id", "type": "string" }, "permanentLoanTypeId": { "description": "permanent loan type id", "type": "string" }, "instanceTitle": { "description": "instance title", "type": "string" }, "barcode": { "description": "item barcode", "type": "string" }, "pickupLocation": { "description": "pickup location", "type": "string" }, "lendingLibraryCode": { "description": "5 digit agency code which identifies the lending library", "type": "string" }, "metadata": { "title": "Metadata Schema", "description": "Metadata about creation and changes to records, provided by the server (client should not provide)", "type": "object", "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" ] } }, "additionalProperties": false, "required": [] }