foliolib.folio.api.inventoryStorage.ItemDamagedStatuses

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

Bases: foliolib.folio.FolioApi

Item dameged statuses API

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

Parameters
  • tenant (str) – Tenant id

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

Methods

delete_itemDamagedStatus(itemDamagedStatusesId)

Delete itemDamagedStatus item with given {itemDamagedStatusId}

get_itemDamagedStatus(itemDamagedStatusesId)

Retrieve itemDamagedStatus item with given {itemDamagedStatusId}

get_itemDamagedStatuses(**kwargs)

Return a list of item damaged status

modify_itemDamagedStatus(...)

Update itemDamagedStatus item with given {itemDamagedStatusId}

set_itemDamagedStatus(itemDamagedStatus)

Create a new item damaged status

delete_itemDamagedStatus(itemDamagedStatusesId: str)

Delete itemDamagedStatus item with given {itemDamagedStatusId}

DELETE /item-damaged-statuses/{itemDamagedStatusesId}

Parameters

itemDamagedStatusesId (str) –

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

get_itemDamagedStatus(itemDamagedStatusesId: str)

Retrieve itemDamagedStatus item with given {itemDamagedStatusId}

GET /item-damaged-statuses/{itemDamagedStatusesId}

Parameters

itemDamagedStatusesId (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": "An item damage status",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "unique ID of the item damage status; a UUID"
    },
    "name": {
      "type": "string",
      "description": "name of the item damage status"
    },
    "source": {
      "type": "string",
      "description": "label indicating where the item damage status 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_itemDamagedStatuses(**kwargs)

Return a list of item damaged status

GET /item-damaged-statuses

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

  • 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 item damage statuses",
  "type": "object",
  "properties": {
    "itemDamageStatuses": {
      "description": "List of item damage statuses",
      "id": "itemDamageStatus",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "itemdamagedstatus.json"
      }
    },
    "totalRecords": {
      "description": "Estimated or exact total number of records",
      "type": "integer"
    }
  },
  "required": [
    "itemDamageStatuses",
    "totalRecords"
  ]
}
modify_itemDamagedStatus(itemDamagedStatusesId: str, itemDamagedStatus: dict)

Update itemDamagedStatus item with given {itemDamagedStatusId}

PUT /item-damaged-statuses/{itemDamagedStatusesId}

Parameters
  • itemDamagedStatusesId (str) –

  • itemDamagedStatus (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": "An item damage status",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "unique ID of the item damage status; a UUID"
    },
    "name": {
      "type": "string",
      "description": "name of the item damage status"
    },
    "source": {
      "type": "string",
      "description": "label indicating where the item damage status 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_itemDamagedStatus(itemDamagedStatus: dict)

Create a new item damaged status

POST /item-damaged-statuses

Parameters

itemDamagedStatus (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Headers

  • Location - URI to the created itemDamagedStatus item

Schema

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