foliolib.folio.api.inventoryStorage.HoldingsStorage

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

Bases: foliolib.folio.FolioApi

Holdings Records Storage API

Storage for holdings in the inventory

Parameters
  • tenant (str) – Tenant id

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

Methods

delete_holding(holdingsRecordId)

Delete holding item with given {holdingId}

delete_holdings()

DELETE /holdings-storage/holdings

get_holding(holdingsRecordId)

Retrieve holding item with given {holdingId}

get_holdings(**kwargs)

Retrieve a list of holding items.

modify_holding(holdingsRecordId, holding)

Update holding item with given {holdingId}

set_holding(holding)

Create a new holding item.

delete_holding(holdingsRecordId: str)

Delete holding item with given {holdingId}

DELETE /holdings-storage/holdings/{holdingsRecordId}

Parameters

holdingsRecordId (str) –

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

delete_holdings()

DELETE /holdings-storage/holdings

get_holding(holdingsRecordId: str)

Retrieve holding item with given {holdingId}

GET /holdings-storage/holdings/{holdingsRecordId}

Parameters

holdingsRecordId (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": "A holdings record",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "the unique ID of the holdings record; UUID",
      "$ref": "uuid.json"
    },
    "_version": {
      "type": "integer",
      "description": "Record version for optimistic locking"
    },
    "hrid": {
      "type": "string",
      "description": "the human readable ID, also called eye readable ID. A system-assigned sequential ID which maps to the Instance ID"
    },
    "holdingsTypeId": {
      "type": "string",
      "description": "unique ID for the type of this holdings record, a UUID",
      "$ref": "uuid.json"
    },
    "formerIds": {
      "type": "array",
      "description": "Previous ID(s) assigned to the holdings record",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "instanceId": {
      "description": "Inventory instances identifier",
      "type": "string",
      "$ref": "uuid.json"
    },
    "permanentLocationId": {
      "type": "string",
      "description": "The permanent shelving location in which an item resides.",
      "$ref": "uuid.json"
    },
    "permanentLocation": {
      "description": "The permanent shelving location in which an item resides",
      "type": "object",
      "folio:$ref": "location.json",
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "locations",
      "folio:linkFromField": "permanentLocationId",
      "folio:linkToField": "id",
      "folio:includedElement": "locations.0"
    },
    "temporaryLocationId": {
      "type": "string",
      "description": "Temporary location is the temporary location, shelving location, or holding which is a physical place where items are stored, or an Online location.",
      "$ref": "uuid.json"
    },
    "effectiveLocationId": {
      "type": "string",
      "description": "Effective location is calculated by the system based on the values in the permanent and temporary locationId fields.",
      "$ref": "uuid.json"
    },
    "electronicAccess": {
      "description": "List of electronic access items",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "uri": {
            "type": "string",
            "description": "uniform resource identifier (URI) is a string of characters designed for unambiguous identification of resources"
          },
          "linkText": {
            "type": "string",
            "description": "the value of the MARC tag field 856 2nd indicator, where the values are: no information provided, resource, version of resource, related resource, no display constant generated"
          },
          "materialsSpecification": {
            "type": "string",
            "description": "materials specified is used to specify to what portion or aspect of the resource the electronic location and access information applies (e.g. a portion or subset of the item is electronic, or a related electronic resource is being linked to the record)"
          },
          "publicNote": {
            "type": "string",
            "description": "URL public note to be displayed in the discovery"
          },
          "relationshipId": {
            "type": "string",
            "description": "relationship between the electronic resource at the location identified and the item described in the record as a whole"
          }
        },
        "additionalProperties": false,
        "required": [
          "uri"
        ]
      }
    },
    "callNumberTypeId": {
      "type": "string",
      "description": "unique ID for the type of call number on a holdings record, a UUID",
      "$ref": "uuid.json"
    },
    "callNumberPrefix": {
      "type": "string",
      "description": "Prefix of the call number on the holding level."
    },
    "callNumber": {
      "type": "string",
      "description": "Call Number is an identifier assigned to an item, usually printed on a label attached to the item."
    },
    "callNumberSuffix": {
      "type": "string",
      "description": "Suffix of the call number on the holding level."
    },
    "shelvingTitle": {
      "type": "string",
      "description": "Indicates the shelving form of title."
    },
    "acquisitionFormat": {
      "type": "string",
      "description": "Format of holdings record acquisition"
    },
    "acquisitionMethod": {
      "type": "string",
      "description": "Method of holdings record acquisition"
    },
    "receiptStatus": {
      "type": "string",
      "description": "Receipt status (e.g. pending, awaiting receipt, partially received, fully received, receipt not required, and cancelled)"
    },
    "administrativeNotes": {
      "type": "array",
      "description": "Administrative notes",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "notes": {
      "type": "array",
      "description": "Notes about action, copy, binding etc.",
      "items": {
        "type": "object",
        "properties": {
          "holdingsNoteTypeId": {
            "type": "string",
            "description": "ID of the type of note",
            "$ref": "uuid.json"
          },
          "holdingsNoteType": {
            "type": "object",
            "description": "expanded note-type object corresponding to holdingsNoteTypeId",
            "javaType": "org.folio.rest.jaxrs.model.HoldingsNoteTypeVirtual",
            "folio:$ref": "holdingsnotetype.json",
            "readonly": true,
            "folio:isVirtual": true,
            "folio:linkBase": "holdings-note-types",
            "folio:linkFromField": "holdingsNoteTypeId",
            "folio:linkToField": "id",
            "folio:includedElement": "holdingsNoteTypes.0"
          },
          "note": {
            "type": "string",
            "description": "Text content of the note"
          },
          "staffOnly": {
            "type": "boolean",
            "description": "If true, determines that the note should not be visible for others than staff",
            "default": false
          }
        }
      }
    },
    "illPolicyId": {
      "type": "string",
      "description": "unique ID for an ILL policy, a UUID",
      "$ref": "uuid.json"
    },
    "illPolicy": {
      "type": "object",
      "description": "expanded ILL Policy object corresponding to illPolicyId",
      "javaType": "org.folio.rest.jaxrs.model.IllPolicyVirtual",
      "folio:$ref": "illpolicy.json",
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "ill-policies",
      "folio:linkFromField": "illPolicyId",
      "folio:linkToField": "id",
      "folio:includedElement": "illPolicies.0"
    },
    "retentionPolicy": {
      "type": "string",
      "description": "Records information regarding how long we have agreed to keep something."
    },
    "digitizationPolicy": {
      "description": "Records information regarding digitization aspects.",
      "type": "string"
    },
    "holdingsStatements": {
      "description": "Notes about action, copy, binding etc.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "statement": {
            "type": "string",
            "description": "Specifices the exact content to which the library has access, typically for continuing publications."
          },
          "note": {
            "type": "string",
            "description": "Note attached to a holdings statement"
          },
          "staffNote": {
            "type": "string",
            "description": "Private note attached to a holdings statment"
          }
        }
      }
    },
    "holdingsStatementsForIndexes": {
      "description": "Holdings record indexes statements",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "statement": {
            "type": "string",
            "description": "Textual description of the holdings of indexes"
          },
          "note": {
            "type": "string",
            "description": "Note attached to a holdings statement"
          },
          "staffNote": {
            "type": "string",
            "description": "Private note attached to a holdings statment"
          }
        }
      }
    },
    "holdingsStatementsForSupplements": {
      "description": "Holdings record supplements statements",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "statement": {
            "type": "string",
            "description": "textual description of the holdings of supplementary material"
          },
          "note": {
            "type": "string",
            "description": "note attached to a holdings statement"
          },
          "staffNote": {
            "type": "string",
            "description": "Private note attached to a holdings statment"
          }
        }
      }
    },
    "copyNumber": {
      "type": "string",
      "description": "Item/Piece ID (usually barcode) for systems that do not use item records. Ability to designate the copy number if institution chooses to use copy numbers."
    },
    "numberOfItems": {
      "type": "string",
      "description": "Text (Number)"
    },
    "receivingHistory": {
      "description": "Receiving history of holdings record",
      "type": "object",
      "properties": {
        "displayType": {
          "type": "string",
          "description": "Display hint. 1: Display fields separately. 2: Display fields concatenated"
        },
        "entries": {
          "type": "array",
          "description": "Entries of receiving history",
          "items": {
            "type": "object",
            "properties": {
              "publicDisplay": {
                "type": "boolean",
                "description": "Defines if the receivingHistory should be visible to the public."
              },
              "enumeration": {
                "type": "string",
                "description": "This is the volume/issue number (e.g. v.71:no.6-2)"
              },
              "chronology": {
                "type": "string",
                "description": "Repeated element from Receiving history - Enumeration AND Receiving history - Chronology"
              }
            }
          }
        }
      }
    },
    "discoverySuppress": {
      "type": "boolean",
      "description": "records the fact that the record should not be displayed in a discovery system"
    },
    "statisticalCodeIds": {
      "type": "array",
      "description": "List of statistical code IDs",
      "items": {
        "type": "string",
        "$ref": "uuid.json"
      },
      "uniqueItems": true
    },
    "holdingsItems": {
      "description": "Items related to holdings record. This is a virtual field, accessible only when using mod-graphql.",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "item.json"
      },
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "inventory/items",
      "folio:linkFromField": "id",
      "folio:linkToField": "holdingsRecordId",
      "folio:includedElement": "items"
    },
    "bareHoldingsItems": {
      "description": "Items of bareHoldings. This is a virtual field, accessible only when using mod-graphql.",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "item.json"
      },
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "item-storage/items",
      "folio:linkFromField": "id",
      "folio:linkToField": "holdingsRecordId",
      "folio:includedElement": "items"
    },
    "holdingsInstance": {
      "description": "Instance of holding record. This is a virtual field, accessible only when using mod-graphql.",
      "type": "object",
      "folio:$ref": "instance.json",
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "inventory/instances",
      "folio:linkFromField": "instanceId",
      "folio:linkToField": "id",
      "folio:includedElement": "instances.0"
    },
    "tags": {
      "description": "arbitrary tags associated with this holding",
      "id": "tags",
      "type": "object",
      "$ref": "raml-util/schemas/tags.schema"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    },
    "sourceId": {
      "description": "(A reference to) the source of a holdings record",
      "type": "string",
      "$ref": "uuid.json"
    }
  },
  "additionalProperties": false,
  "required": [
    "instanceId",
    "permanentLocationId"
  ]
}
get_holdings(**kwargs)

Retrieve a list of holding items.

GET /holdings-storage/holdings

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 instance ID (using CQL)

    Example

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

    • instanceId=”2b94c631-fca9-4892-a730-03ee529ffe2a”

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 holdings records",
  "type": "object",
  "properties": {
    "holdingsRecords": {
      "description": "List of holdings records",
      "id": "holdingsRecord",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "holdingsrecord.json"
      }
    },
    "totalRecords": {
      "description": "Estimated or exact total number of records",
      "type": "integer"
    },
    "resultInfo": {
      "$ref": "raml-util/schemas/resultInfo.schema",
      "readonly": true
    }
  },
  "required": [
    "holdingsRecords",
    "totalRecords"
  ]
}
modify_holding(holdingsRecordId: str, holding: dict)

Update holding item with given {holdingId}

PUT /holdings-storage/holdings/{holdingsRecordId}

Parameters
  • holdingsRecordId (str) –

  • holding (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": "A holdings record",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "the unique ID of the holdings record; UUID",
      "$ref": "uuid.json"
    },
    "_version": {
      "type": "integer",
      "description": "Record version for optimistic locking"
    },
    "hrid": {
      "type": "string",
      "description": "the human readable ID, also called eye readable ID. A system-assigned sequential ID which maps to the Instance ID"
    },
    "holdingsTypeId": {
      "type": "string",
      "description": "unique ID for the type of this holdings record, a UUID",
      "$ref": "uuid.json"
    },
    "formerIds": {
      "type": "array",
      "description": "Previous ID(s) assigned to the holdings record",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "instanceId": {
      "description": "Inventory instances identifier",
      "type": "string",
      "$ref": "uuid.json"
    },
    "permanentLocationId": {
      "type": "string",
      "description": "The permanent shelving location in which an item resides.",
      "$ref": "uuid.json"
    },
    "permanentLocation": {
      "description": "The permanent shelving location in which an item resides",
      "type": "object",
      "folio:$ref": "location.json",
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "locations",
      "folio:linkFromField": "permanentLocationId",
      "folio:linkToField": "id",
      "folio:includedElement": "locations.0"
    },
    "temporaryLocationId": {
      "type": "string",
      "description": "Temporary location is the temporary location, shelving location, or holding which is a physical place where items are stored, or an Online location.",
      "$ref": "uuid.json"
    },
    "effectiveLocationId": {
      "type": "string",
      "description": "Effective location is calculated by the system based on the values in the permanent and temporary locationId fields.",
      "$ref": "uuid.json"
    },
    "electronicAccess": {
      "description": "List of electronic access items",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "uri": {
            "type": "string",
            "description": "uniform resource identifier (URI) is a string of characters designed for unambiguous identification of resources"
          },
          "linkText": {
            "type": "string",
            "description": "the value of the MARC tag field 856 2nd indicator, where the values are: no information provided, resource, version of resource, related resource, no display constant generated"
          },
          "materialsSpecification": {
            "type": "string",
            "description": "materials specified is used to specify to what portion or aspect of the resource the electronic location and access information applies (e.g. a portion or subset of the item is electronic, or a related electronic resource is being linked to the record)"
          },
          "publicNote": {
            "type": "string",
            "description": "URL public note to be displayed in the discovery"
          },
          "relationshipId": {
            "type": "string",
            "description": "relationship between the electronic resource at the location identified and the item described in the record as a whole"
          }
        },
        "additionalProperties": false,
        "required": [
          "uri"
        ]
      }
    },
    "callNumberTypeId": {
      "type": "string",
      "description": "unique ID for the type of call number on a holdings record, a UUID",
      "$ref": "uuid.json"
    },
    "callNumberPrefix": {
      "type": "string",
      "description": "Prefix of the call number on the holding level."
    },
    "callNumber": {
      "type": "string",
      "description": "Call Number is an identifier assigned to an item, usually printed on a label attached to the item."
    },
    "callNumberSuffix": {
      "type": "string",
      "description": "Suffix of the call number on the holding level."
    },
    "shelvingTitle": {
      "type": "string",
      "description": "Indicates the shelving form of title."
    },
    "acquisitionFormat": {
      "type": "string",
      "description": "Format of holdings record acquisition"
    },
    "acquisitionMethod": {
      "type": "string",
      "description": "Method of holdings record acquisition"
    },
    "receiptStatus": {
      "type": "string",
      "description": "Receipt status (e.g. pending, awaiting receipt, partially received, fully received, receipt not required, and cancelled)"
    },
    "administrativeNotes": {
      "type": "array",
      "description": "Administrative notes",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "notes": {
      "type": "array",
      "description": "Notes about action, copy, binding etc.",
      "items": {
        "type": "object",
        "properties": {
          "holdingsNoteTypeId": {
            "type": "string",
            "description": "ID of the type of note",
            "$ref": "uuid.json"
          },
          "holdingsNoteType": {
            "type": "object",
            "description": "expanded note-type object corresponding to holdingsNoteTypeId",
            "javaType": "org.folio.rest.jaxrs.model.HoldingsNoteTypeVirtual",
            "folio:$ref": "holdingsnotetype.json",
            "readonly": true,
            "folio:isVirtual": true,
            "folio:linkBase": "holdings-note-types",
            "folio:linkFromField": "holdingsNoteTypeId",
            "folio:linkToField": "id",
            "folio:includedElement": "holdingsNoteTypes.0"
          },
          "note": {
            "type": "string",
            "description": "Text content of the note"
          },
          "staffOnly": {
            "type": "boolean",
            "description": "If true, determines that the note should not be visible for others than staff",
            "default": false
          }
        }
      }
    },
    "illPolicyId": {
      "type": "string",
      "description": "unique ID for an ILL policy, a UUID",
      "$ref": "uuid.json"
    },
    "illPolicy": {
      "type": "object",
      "description": "expanded ILL Policy object corresponding to illPolicyId",
      "javaType": "org.folio.rest.jaxrs.model.IllPolicyVirtual",
      "folio:$ref": "illpolicy.json",
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "ill-policies",
      "folio:linkFromField": "illPolicyId",
      "folio:linkToField": "id",
      "folio:includedElement": "illPolicies.0"
    },
    "retentionPolicy": {
      "type": "string",
      "description": "Records information regarding how long we have agreed to keep something."
    },
    "digitizationPolicy": {
      "description": "Records information regarding digitization aspects.",
      "type": "string"
    },
    "holdingsStatements": {
      "description": "Notes about action, copy, binding etc.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "statement": {
            "type": "string",
            "description": "Specifices the exact content to which the library has access, typically for continuing publications."
          },
          "note": {
            "type": "string",
            "description": "Note attached to a holdings statement"
          },
          "staffNote": {
            "type": "string",
            "description": "Private note attached to a holdings statment"
          }
        }
      }
    },
    "holdingsStatementsForIndexes": {
      "description": "Holdings record indexes statements",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "statement": {
            "type": "string",
            "description": "Textual description of the holdings of indexes"
          },
          "note": {
            "type": "string",
            "description": "Note attached to a holdings statement"
          },
          "staffNote": {
            "type": "string",
            "description": "Private note attached to a holdings statment"
          }
        }
      }
    },
    "holdingsStatementsForSupplements": {
      "description": "Holdings record supplements statements",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "statement": {
            "type": "string",
            "description": "textual description of the holdings of supplementary material"
          },
          "note": {
            "type": "string",
            "description": "note attached to a holdings statement"
          },
          "staffNote": {
            "type": "string",
            "description": "Private note attached to a holdings statment"
          }
        }
      }
    },
    "copyNumber": {
      "type": "string",
      "description": "Item/Piece ID (usually barcode) for systems that do not use item records. Ability to designate the copy number if institution chooses to use copy numbers."
    },
    "numberOfItems": {
      "type": "string",
      "description": "Text (Number)"
    },
    "receivingHistory": {
      "description": "Receiving history of holdings record",
      "type": "object",
      "properties": {
        "displayType": {
          "type": "string",
          "description": "Display hint. 1: Display fields separately. 2: Display fields concatenated"
        },
        "entries": {
          "type": "array",
          "description": "Entries of receiving history",
          "items": {
            "type": "object",
            "properties": {
              "publicDisplay": {
                "type": "boolean",
                "description": "Defines if the receivingHistory should be visible to the public."
              },
              "enumeration": {
                "type": "string",
                "description": "This is the volume/issue number (e.g. v.71:no.6-2)"
              },
              "chronology": {
                "type": "string",
                "description": "Repeated element from Receiving history - Enumeration AND Receiving history - Chronology"
              }
            }
          }
        }
      }
    },
    "discoverySuppress": {
      "type": "boolean",
      "description": "records the fact that the record should not be displayed in a discovery system"
    },
    "statisticalCodeIds": {
      "type": "array",
      "description": "List of statistical code IDs",
      "items": {
        "type": "string",
        "$ref": "uuid.json"
      },
      "uniqueItems": true
    },
    "holdingsItems": {
      "description": "Items related to holdings record. This is a virtual field, accessible only when using mod-graphql.",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "item.json"
      },
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "inventory/items",
      "folio:linkFromField": "id",
      "folio:linkToField": "holdingsRecordId",
      "folio:includedElement": "items"
    },
    "bareHoldingsItems": {
      "description": "Items of bareHoldings. This is a virtual field, accessible only when using mod-graphql.",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "item.json"
      },
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "item-storage/items",
      "folio:linkFromField": "id",
      "folio:linkToField": "holdingsRecordId",
      "folio:includedElement": "items"
    },
    "holdingsInstance": {
      "description": "Instance of holding record. This is a virtual field, accessible only when using mod-graphql.",
      "type": "object",
      "folio:$ref": "instance.json",
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "inventory/instances",
      "folio:linkFromField": "instanceId",
      "folio:linkToField": "id",
      "folio:includedElement": "instances.0"
    },
    "tags": {
      "description": "arbitrary tags associated with this holding",
      "id": "tags",
      "type": "object",
      "$ref": "raml-util/schemas/tags.schema"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    },
    "sourceId": {
      "description": "(A reference to) the source of a holdings record",
      "type": "string",
      "$ref": "uuid.json"
    }
  },
  "additionalProperties": false,
  "required": [
    "instanceId",
    "permanentLocationId"
  ]
}
set_holding(holding: dict)

Create a new holding item.

POST /holdings-storage/holdings

Parameters

holding (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Headers

  • Location - URI to the created holding item

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A holdings record",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "the unique ID of the holdings record; UUID",
      "$ref": "uuid.json"
    },
    "_version": {
      "type": "integer",
      "description": "Record version for optimistic locking"
    },
    "hrid": {
      "type": "string",
      "description": "the human readable ID, also called eye readable ID. A system-assigned sequential ID which maps to the Instance ID"
    },
    "holdingsTypeId": {
      "type": "string",
      "description": "unique ID for the type of this holdings record, a UUID",
      "$ref": "uuid.json"
    },
    "formerIds": {
      "type": "array",
      "description": "Previous ID(s) assigned to the holdings record",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "instanceId": {
      "description": "Inventory instances identifier",
      "type": "string",
      "$ref": "uuid.json"
    },
    "permanentLocationId": {
      "type": "string",
      "description": "The permanent shelving location in which an item resides.",
      "$ref": "uuid.json"
    },
    "permanentLocation": {
      "description": "The permanent shelving location in which an item resides",
      "type": "object",
      "folio:$ref": "location.json",
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "locations",
      "folio:linkFromField": "permanentLocationId",
      "folio:linkToField": "id",
      "folio:includedElement": "locations.0"
    },
    "temporaryLocationId": {
      "type": "string",
      "description": "Temporary location is the temporary location, shelving location, or holding which is a physical place where items are stored, or an Online location.",
      "$ref": "uuid.json"
    },
    "effectiveLocationId": {
      "type": "string",
      "description": "Effective location is calculated by the system based on the values in the permanent and temporary locationId fields.",
      "$ref": "uuid.json"
    },
    "electronicAccess": {
      "description": "List of electronic access items",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "uri": {
            "type": "string",
            "description": "uniform resource identifier (URI) is a string of characters designed for unambiguous identification of resources"
          },
          "linkText": {
            "type": "string",
            "description": "the value of the MARC tag field 856 2nd indicator, where the values are: no information provided, resource, version of resource, related resource, no display constant generated"
          },
          "materialsSpecification": {
            "type": "string",
            "description": "materials specified is used to specify to what portion or aspect of the resource the electronic location and access information applies (e.g. a portion or subset of the item is electronic, or a related electronic resource is being linked to the record)"
          },
          "publicNote": {
            "type": "string",
            "description": "URL public note to be displayed in the discovery"
          },
          "relationshipId": {
            "type": "string",
            "description": "relationship between the electronic resource at the location identified and the item described in the record as a whole"
          }
        },
        "additionalProperties": false,
        "required": [
          "uri"
        ]
      }
    },
    "callNumberTypeId": {
      "type": "string",
      "description": "unique ID for the type of call number on a holdings record, a UUID",
      "$ref": "uuid.json"
    },
    "callNumberPrefix": {
      "type": "string",
      "description": "Prefix of the call number on the holding level."
    },
    "callNumber": {
      "type": "string",
      "description": "Call Number is an identifier assigned to an item, usually printed on a label attached to the item."
    },
    "callNumberSuffix": {
      "type": "string",
      "description": "Suffix of the call number on the holding level."
    },
    "shelvingTitle": {
      "type": "string",
      "description": "Indicates the shelving form of title."
    },
    "acquisitionFormat": {
      "type": "string",
      "description": "Format of holdings record acquisition"
    },
    "acquisitionMethod": {
      "type": "string",
      "description": "Method of holdings record acquisition"
    },
    "receiptStatus": {
      "type": "string",
      "description": "Receipt status (e.g. pending, awaiting receipt, partially received, fully received, receipt not required, and cancelled)"
    },
    "administrativeNotes": {
      "type": "array",
      "description": "Administrative notes",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "notes": {
      "type": "array",
      "description": "Notes about action, copy, binding etc.",
      "items": {
        "type": "object",
        "properties": {
          "holdingsNoteTypeId": {
            "type": "string",
            "description": "ID of the type of note",
            "$ref": "uuid.json"
          },
          "holdingsNoteType": {
            "type": "object",
            "description": "expanded note-type object corresponding to holdingsNoteTypeId",
            "javaType": "org.folio.rest.jaxrs.model.HoldingsNoteTypeVirtual",
            "folio:$ref": "holdingsnotetype.json",
            "readonly": true,
            "folio:isVirtual": true,
            "folio:linkBase": "holdings-note-types",
            "folio:linkFromField": "holdingsNoteTypeId",
            "folio:linkToField": "id",
            "folio:includedElement": "holdingsNoteTypes.0"
          },
          "note": {
            "type": "string",
            "description": "Text content of the note"
          },
          "staffOnly": {
            "type": "boolean",
            "description": "If true, determines that the note should not be visible for others than staff",
            "default": false
          }
        }
      }
    },
    "illPolicyId": {
      "type": "string",
      "description": "unique ID for an ILL policy, a UUID",
      "$ref": "uuid.json"
    },
    "illPolicy": {
      "type": "object",
      "description": "expanded ILL Policy object corresponding to illPolicyId",
      "javaType": "org.folio.rest.jaxrs.model.IllPolicyVirtual",
      "folio:$ref": "illpolicy.json",
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "ill-policies",
      "folio:linkFromField": "illPolicyId",
      "folio:linkToField": "id",
      "folio:includedElement": "illPolicies.0"
    },
    "retentionPolicy": {
      "type": "string",
      "description": "Records information regarding how long we have agreed to keep something."
    },
    "digitizationPolicy": {
      "description": "Records information regarding digitization aspects.",
      "type": "string"
    },
    "holdingsStatements": {
      "description": "Notes about action, copy, binding etc.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "statement": {
            "type": "string",
            "description": "Specifices the exact content to which the library has access, typically for continuing publications."
          },
          "note": {
            "type": "string",
            "description": "Note attached to a holdings statement"
          },
          "staffNote": {
            "type": "string",
            "description": "Private note attached to a holdings statment"
          }
        }
      }
    },
    "holdingsStatementsForIndexes": {
      "description": "Holdings record indexes statements",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "statement": {
            "type": "string",
            "description": "Textual description of the holdings of indexes"
          },
          "note": {
            "type": "string",
            "description": "Note attached to a holdings statement"
          },
          "staffNote": {
            "type": "string",
            "description": "Private note attached to a holdings statment"
          }
        }
      }
    },
    "holdingsStatementsForSupplements": {
      "description": "Holdings record supplements statements",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "statement": {
            "type": "string",
            "description": "textual description of the holdings of supplementary material"
          },
          "note": {
            "type": "string",
            "description": "note attached to a holdings statement"
          },
          "staffNote": {
            "type": "string",
            "description": "Private note attached to a holdings statment"
          }
        }
      }
    },
    "copyNumber": {
      "type": "string",
      "description": "Item/Piece ID (usually barcode) for systems that do not use item records. Ability to designate the copy number if institution chooses to use copy numbers."
    },
    "numberOfItems": {
      "type": "string",
      "description": "Text (Number)"
    },
    "receivingHistory": {
      "description": "Receiving history of holdings record",
      "type": "object",
      "properties": {
        "displayType": {
          "type": "string",
          "description": "Display hint. 1: Display fields separately. 2: Display fields concatenated"
        },
        "entries": {
          "type": "array",
          "description": "Entries of receiving history",
          "items": {
            "type": "object",
            "properties": {
              "publicDisplay": {
                "type": "boolean",
                "description": "Defines if the receivingHistory should be visible to the public."
              },
              "enumeration": {
                "type": "string",
                "description": "This is the volume/issue number (e.g. v.71:no.6-2)"
              },
              "chronology": {
                "type": "string",
                "description": "Repeated element from Receiving history - Enumeration AND Receiving history - Chronology"
              }
            }
          }
        }
      }
    },
    "discoverySuppress": {
      "type": "boolean",
      "description": "records the fact that the record should not be displayed in a discovery system"
    },
    "statisticalCodeIds": {
      "type": "array",
      "description": "List of statistical code IDs",
      "items": {
        "type": "string",
        "$ref": "uuid.json"
      },
      "uniqueItems": true
    },
    "holdingsItems": {
      "description": "Items related to holdings record. This is a virtual field, accessible only when using mod-graphql.",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "item.json"
      },
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "inventory/items",
      "folio:linkFromField": "id",
      "folio:linkToField": "holdingsRecordId",
      "folio:includedElement": "items"
    },
    "bareHoldingsItems": {
      "description": "Items of bareHoldings. This is a virtual field, accessible only when using mod-graphql.",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "item.json"
      },
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "item-storage/items",
      "folio:linkFromField": "id",
      "folio:linkToField": "holdingsRecordId",
      "folio:includedElement": "items"
    },
    "holdingsInstance": {
      "description": "Instance of holding record. This is a virtual field, accessible only when using mod-graphql.",
      "type": "object",
      "folio:$ref": "instance.json",
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "inventory/instances",
      "folio:linkFromField": "instanceId",
      "folio:linkToField": "id",
      "folio:includedElement": "instances.0"
    },
    "tags": {
      "description": "arbitrary tags associated with this holding",
      "id": "tags",
      "type": "object",
      "$ref": "raml-util/schemas/tags.schema"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    },
    "sourceId": {
      "description": "(A reference to) the source of a holdings record",
      "type": "string",
      "$ref": "uuid.json"
    }
  },
  "additionalProperties": false,
  "required": [
    "instanceId",
    "permanentLocationId"
  ]
}