foliolib.folio.api.inventoryStorage.ItemNoteType

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

Bases: foliolib.folio.FolioApi

Item note types API

This documents the API calls that can be made to query and manage item note types of the system

Base class of the Folio API

Parameters

tenant (str) – Tenant id

Methods

delete_itemNoteType(itemNoteTypesId)

Delete itemNoteType item with given {itemNoteTypeId}

get_itemNoteType(itemNoteTypesId)

Retrieve itemNoteType item with given {itemNoteTypeId}

get_itemNoteTypes(**kwargs)

Return a list of item note types

modify_itemNoteType(itemNoteTypesId, ...)

Update itemNoteType item with given {itemNoteTypeId}

set_itemNoteType(itemNoteType)

Create a new item note type

delete_itemNoteType(itemNoteTypesId: str)

Delete itemNoteType item with given {itemNoteTypeId}

DELETE /item-note-types/{itemNoteTypesId}

Parameters

itemNoteTypesId (str) –

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiRequestFatalError – Server Error

get_itemNoteType(itemNoteTypesId: str)

Retrieve itemNoteType item with given {itemNoteTypeId}

GET /item-note-types/{itemNoteTypesId}

Parameters

itemNoteTypesId (str) –

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "An item note type",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "unique ID of the item note type; a UUID"
    },
    "name": {
      "type": "string",
      "description": "name of the item note type"
    },
    "source": {
      "type": "string",
      "description": "label indicating where the item note type entry originates from, i.e. 'folio' or 'local'"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "source"
  ]
}
get_itemNoteTypes(**kwargs)

Return a list of item note types

GET /item-note-types

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

    • name=aaa

  • 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

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiRequestFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A collection of item note types",
  "type": "object",
  "properties": {
    "itemNoteTypes": {
      "description": "List of item note types",
      "id": "itemNoteType",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "itemnotetype.json"
      }
    },
    "totalRecords": {
      "description": "Estimated or exact total number of records",
      "type": "integer"
    }
  },
  "required": [
    "itemNoteTypes",
    "totalRecords"
  ]
}
modify_itemNoteType(itemNoteTypesId: str, itemNoteType: dict)

Update itemNoteType item with given {itemNoteTypeId}

PUT /item-note-types/{itemNoteTypesId}

Parameters
  • itemNoteTypesId (str) –

  • itemNoteType (dict) – See Schema below

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiRequestConflict – Conflict

  • OkapiRequestFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "An item note type",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "unique ID of the item note type; a UUID"
    },
    "name": {
      "type": "string",
      "description": "name of the item note type"
    },
    "source": {
      "type": "string",
      "description": "label indicating where the item note type entry originates from, i.e. 'folio' or 'local'"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "source"
  ]
}
set_itemNoteType(itemNoteType: dict)

Create a new item note type

POST /item-note-types

Parameters

itemNoteType (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiRequestFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Headers

  • Location - URI to the created itemNoteType item

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "An item note type",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "unique ID of the item note type; a UUID"
    },
    "name": {
      "type": "string",
      "description": "name of the item note type"
    },
    "source": {
      "type": "string",
      "description": "label indicating where the item note type entry originates from, i.e. 'folio' or 'local'"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "source"
  ]
}