foliolib.folio.api.circulationStorage.CheckInStorage
- class foliolib.folio.api.circulationStorage.CheckInStorage(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApiCheck-in Storage API
Storage for check-ins
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
get_checkIn(checkInId)Retrieve checkIn item with given {checkInId}
get_checkIns(**kwargs)Retrieve a list of checkIn items.
set_checkIn(checkIn)Create a new checkIn item.
- get_checkIn(checkInId: str)
Retrieve checkIn item with given {checkInId}
GET /check-in-storage/check-ins/{checkInId}- Parameters
checkInId (str) –
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestUnauthorized – Authentication is required
OkapiRequestNotFound – Not Found
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Check-in operation", "type": "object", "properties": { "id": { "type": "string", "description": "Unique ID (generated UUID) of the check-in operation", "$ref": "raml-util/schemas/uuid.schema" }, "occurredDateTime": { "type": "string", "description": "Date and time when the check-in occurred", "format": "date-time" }, "itemId": { "type": "string", "description": "Id of item that has checked in", "$ref": "raml-util/schemas/uuid.schema" }, "itemStatusPriorToCheckIn": { "type": "string", "description": "Item status prior to check-in" }, "requestQueueSize": { "type": "integer", "description": "Request queue size for the item", "minimum": 0 }, "itemLocationId": { "type": "string", "description": "Location of the item in check-in time", "$ref": "raml-util/schemas/uuid.schema" }, "servicePointId": { "type": "string", "description": "Service point where the item was checked in", "$ref": "raml-util/schemas/uuid.schema" }, "performedByUserId": { "type": "string", "description": "Id of user that has performed check-in operation", "$ref": "raml-util/schemas/uuid.schema" } }, "additionalProperties": false, "required": [ "occurredDateTime", "itemId", "servicePointId", "performedByUserId" ] }
- get_checkIns(**kwargs)
Retrieve a list of checkIn items.
GET /check-in-storage/check-ins- Parameters
**kwargs (properties) – Keyword Arguments
- Keyword Arguments
offset (int) –
(default=0) Skip over a number of elements by specifying an offset value for the query
Example
0
limit (int) –
(default=10) Limit the number of elements returned in the response
Example
10
query (str) –
A query expressed as a CQL string (see [dev.folio.org/reference/glossary#cql](https://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
itemId=”cf23adf0-61ba-4887-bf82-956c4aae2260”
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Collection of check-ins", "type": "object", "properties": { "checkIns": { "description": "List of check-ins", "id": "checkIns", "type": "array", "items": { "type": "object", "$ref": "check-in.json" } }, "totalRecords": { "description": "Number of records", "type": "integer" } }, "additionalProperties": false, "required": [ "checkIns", "totalRecords" ] }
- set_checkIn(checkIn: dict)
Create a new checkIn item.
POST /check-in-storage/check-ins- Parameters
checkIn (dict) – See Schema below
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
OkapiRequestUnprocessableEntity – Unprocessable Entity
Headers
Location - URI to the created checkIn item
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Check-in operation", "type": "object", "properties": { "id": { "type": "string", "description": "Unique ID (generated UUID) of the check-in operation", "$ref": "raml-util/schemas/uuid.schema" }, "occurredDateTime": { "type": "string", "description": "Date and time when the check-in occurred", "format": "date-time" }, "itemId": { "type": "string", "description": "Id of item that has checked in", "$ref": "raml-util/schemas/uuid.schema" }, "itemStatusPriorToCheckIn": { "type": "string", "description": "Item status prior to check-in" }, "requestQueueSize": { "type": "integer", "description": "Request queue size for the item", "minimum": 0 }, "itemLocationId": { "type": "string", "description": "Location of the item in check-in time", "$ref": "raml-util/schemas/uuid.schema" }, "servicePointId": { "type": "string", "description": "Service point where the item was checked in", "$ref": "raml-util/schemas/uuid.schema" }, "performedByUserId": { "type": "string", "description": "Id of user that has performed check-in operation", "$ref": "raml-util/schemas/uuid.schema" } }, "additionalProperties": false, "required": [ "occurredDateTime", "itemId", "servicePointId", "performedByUserId" ] }