foliolib.folio.api.rtac.RtacBatch
- class foliolib.folio.api.rtac.RtacBatch(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApiReal Time Availability Checker Integration
This module allows 3rd party discovery services to check for FOLIO inventory availability
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
set_rtacBatch(rtacBatch)Retrieve holding information from inventory in a batch
- set_rtacBatch(rtacBatch: dict)
Retrieve holding information from inventory in a batch
POST /rtac-batch- Parameters
rtacBatch (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestError – Bad Request
OkapiRequestForbidden – Forbidden
OkapiRequestNotFound – Not Found
OkapiFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Define format of request data with instances ids", "type": "object", "properties": { "instanceIds": { "description": "Inventory instances identifiers", "type": "array", "items": { "$ref": "uuid.json" } }, "fullPeriodicals": { "description": "if set to true, then item-level information is added to all periodicals without holdings-level information", "type": "boolean", "default": false } }, "additionalProperties": false, "required": [ "instanceIds" ] }
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "description": "Batch holdings response", "properties": { "holdings": { "description": "Real Time Availability Check (RTAC) holding details", "type": "array", "id": "holdingsList", "items": { "type": "object", "$ref": "rtac-holdings.json" } }, "errors": { "description": "Errors", "type": "array", "items": { "$ref": "raml-util/schemas/error.schema" }, "minimum": 0 } }, "additionalItems": false, "additionalProperties": false }