foliolib.folio.api.inventoryStorage.InventoryView

class foliolib.folio.api.inventoryStorage.InventoryView(tenant: str)

Bases: foliolib.folio.FolioApi

Inventory view

Inventory view endpoints

Base class of the Folio API

Parameters

tenant (str) – Tenant id

Methods

get_instances(**kwargs)

Get instances by id with their holdings and items

get_instances(**kwargs)

Get instances by id with their holdings and items

GET /inventory-view/instances

Parameters

**kwargs (properties) – Keyword Arguments

Keyword Arguments
  • totalRecords (str) –

    (default=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 (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.

    using CQL

    Example

    • (username==”ab*” or personal.firstName==”ab*” or personal.lastName==”ab*”) and active==”true” sortby personal.lastName personal.firstName barcode

    • title=”uproot

Returns

See Schema below

Return type

binary

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiRequestFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Instance with holdings and items",
  "type": "object",
  "properties": {
    "instanceId": {
      "description": "Instance id",
      "$ref": "uuid.json"
    },
    "isBoundWith": {
      "description": "Records the relationship between a part of a bound-with (a holdings-record) and the bound-with as a whole (the circulatable item)",
      "type": "boolean"
    },
    "instance": {
      "description": "Instance record",
      "$ref": "instance.json"
    },
    "holdingsRecords": {
      "type": "array",
      "description": "Holdings records for the instance",
      "items": {
        "$ref": "holdings-storage/holdingsRecord.json"
      }
    },
    "items": {
      "type": "array",
      "description": "Items for the instance",
      "items": {
        "$ref": "item.json"
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "instanceId",
    "instance"
  ]
}