foliolib.folio.api.inventoryStorage.BoundWithPart

class foliolib.folio.api.inventoryStorage.BoundWithPart(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)

Bases: foliolib.folio.FolioApi

Bound-With API

API calls for querying and managing individual parts or all parts of bound-withs

Parameters
  • tenant (str) – Tenant id

  • okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.

Methods

delete_boundWithPart(boundWithPartsId)

Delete boundWithPart item with given {boundWithPartId}

get_boundWithPart(boundWithPartsId)

Retrieve boundWithPart item with given {boundWithPartId}

get_boundWithParts(**kwargs)

Return a list of parts of bound-withs

modify_boundWith(boundWith)

Manage the collective set of parts (holdings references) of a bound-with item

modify_boundWithPart(boundWithPartsId, ...)

Update boundWithPart item with given {boundWithPartId}

set_boundWithPart(boundWithPart)

Add a new part to a bound-with item

delete_boundWithPart(boundWithPartsId: str)

Delete boundWithPart item with given {boundWithPartId}

DELETE /inventory-storage/bound-with-parts/{boundWithPartsId}

Parameters

boundWithPartsId (str) –

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

get_boundWithPart(boundWithPartsId: str)

Retrieve boundWithPart item with given {boundWithPartId}

GET /inventory-storage/bound-with-parts/{boundWithPartsId}

Parameters

boundWithPartsId (str) –

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "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": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "unique ID of the recorded bound-with relation; a UUID",
      "$ref": "uuid.json"
    },
    "holdingsRecordId": {
      "type": "string",
      "description": "the ID of the holdings record representing a part of a bound-with; a UUID"
    },
    "itemId": {
      "type": "string",
      "description": "the ID of the item representing the bind; a UUID"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "holdingsRecordId",
    "itemId"
  ]
}
get_boundWithParts(**kwargs)

Return a list of parts of bound-withs

GET /inventory-storage/bound-with-parts

Parameters

**kwargs (properties) – Keyword Arguments

Keyword Arguments
  • 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.

    with valid searchable fields

    Example

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

    • itemId=aaa

  • 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

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": "A collection of parts (holdings-records) of one or more bound-with items",
  "type": "object",
  "properties": {
    "boundWithParts": {
      "description": "List of bound-with records",
      "id": "boundWithPart",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "bound-with-part.json"
      }
    },
    "totalRecords": {
      "description": "Estimated or exact total number of records",
      "type": "integer"
    }
  },
  "required": [
    "boundWithParts",
    "totalRecords"
  ]
}
modify_boundWith(boundWith: dict)

Manage the collective set of parts (holdings references) of a bound-with item

PUT /inventory-storage/bound-withs

Parameters

boundWith (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Composite entity that records the ID of a bound-with item as well as all the holdings that make up the bound-with.",
  "type": "object",
  "properties": {
    "itemId": {
      "type": "string",
      "description": "Unique ID (UUID) of the item representing the collection of titles.",
      "$ref": "uuid.json"
    },
    "boundWithContents": {
      "type": "array",
      "description": "Collection of references to the holdings records that make up the bound-with.",
      "items": {
        "type": "object",
        "properties": {
          "holdingsRecordId": {
            "type": "string",
            "description": "The ID (UUID) of a holdings record included in this bound-with"
          }
        }
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "itemId",
    "boundWithContents"
  ]
}
modify_boundWithPart(boundWithPartsId: str, boundWithPart: dict)

Update boundWithPart item with given {boundWithPartId}

PUT /inventory-storage/bound-with-parts/{boundWithPartsId}

Parameters
  • boundWithPartsId (str) –

  • boundWithPart (dict) – See Schema below

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiRequestConflict – Conflict

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "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": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "unique ID of the recorded bound-with relation; a UUID",
      "$ref": "uuid.json"
    },
    "holdingsRecordId": {
      "type": "string",
      "description": "the ID of the holdings record representing a part of a bound-with; a UUID"
    },
    "itemId": {
      "type": "string",
      "description": "the ID of the item representing the bind; a UUID"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "holdingsRecordId",
    "itemId"
  ]
}
set_boundWithPart(boundWithPart: dict)

Add a new part to a bound-with item

POST /inventory-storage/bound-with-parts

Parameters

boundWithPart (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Headers

  • Location - URI to the created boundWithPart item

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "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": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "unique ID of the recorded bound-with relation; a UUID",
      "$ref": "uuid.json"
    },
    "holdingsRecordId": {
      "type": "string",
      "description": "the ID of the holdings record representing a part of a bound-with; a UUID"
    },
    "itemId": {
      "type": "string",
      "description": "the ID of the item representing the bind; a UUID"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "holdingsRecordId",
    "itemId"
  ]
}