foliolib.folio.api.inventoryStorage.ModeOfIssuance
- class foliolib.folio.api.inventoryStorage.ModeOfIssuance(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApiStatistical code reference API
This documents the API calls that can be made to query and manage issuance modes of the system
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
delete_modeOfIssuance(modeOfIssuanceId)Delete modeOfIssuance item with given {modeOfIssuanceId}
DELETE /modes-of-issuanceget_modeOfIssuance(modeOfIssuanceId)Retrieve modeOfIssuance item with given {modeOfIssuanceId}
get_modesOfIssuance(**kwargs)Return a list of issuance modes
modify_modeOfIssuance(modeOfIssuanceId, ...)Update modeOfIssuance item with given {modeOfIssuanceId}
set_modeOfIssuance(modeOfIssuance)Create a new mode of issuance
- delete_modeOfIssuance(modeOfIssuanceId: str)
Delete modeOfIssuance item with given {modeOfIssuanceId}
DELETE /modes-of-issuance/{modeOfIssuanceId}- Parameters
modeOfIssuanceId (str) –
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiFatalError – Server Error
- delete_modesOfIssuance()
DELETE /modes-of-issuance
- get_modeOfIssuance(modeOfIssuanceId: str)
Retrieve modeOfIssuance item with given {modeOfIssuanceId}
GET /modes-of-issuance/{modeOfIssuanceId}- Parameters
modeOfIssuanceId (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 mode of issuance to be assigned to an Instance", "type": "object", "properties": { "id": { "type": "string" }, "name": { "description": "label for the mode of issuance", "type": "string" }, "source": { "type": "string", "description": "label indicating where the mode of issuance entry originates from, i.e. 'rdamodeissue' or 'local'" }, "metadata": { "type": "object", "$ref": "raml-util/schemas/metadata.schema", "readonly": true } }, "required": [ "name" ] }
- get_modesOfIssuance(**kwargs)
Return a list of issuance modes
GET /modes-of-issuance- 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 modes of issuance (controlled vocabulary)", "type": "object", "properties": { "issuanceModes": { "description": "List of modes of issuance", "id": "modeOfIssuance", "type": "array", "items": { "type": "object", "$ref": "modeofissuance.json" } }, "totalRecords": { "description": "Estimated or exact total number of records", "type": "integer" } }, "required": [ "issuanceModes", "totalRecords" ] }
- modify_modeOfIssuance(modeOfIssuanceId: str, modeOfIssuance: dict)
Update modeOfIssuance item with given {modeOfIssuanceId}
PUT /modes-of-issuance/{modeOfIssuanceId}- Parameters
modeOfIssuanceId (str) –
modeOfIssuance (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 mode of issuance to be assigned to an Instance", "type": "object", "properties": { "id": { "type": "string" }, "name": { "description": "label for the mode of issuance", "type": "string" }, "source": { "type": "string", "description": "label indicating where the mode of issuance entry originates from, i.e. 'rdamodeissue' or 'local'" }, "metadata": { "type": "object", "$ref": "raml-util/schemas/metadata.schema", "readonly": true } }, "required": [ "name" ] }
- set_modeOfIssuance(modeOfIssuance: dict)
Create a new mode of issuance
POST /modes-of-issuance- Parameters
modeOfIssuance (dict) – See Schema below
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Headers
Location - URI to the created modeOfIssuance item
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "A mode of issuance to be assigned to an Instance", "type": "object", "properties": { "id": { "type": "string" }, "name": { "description": "label for the mode of issuance", "type": "string" }, "source": { "type": "string", "description": "label indicating where the mode of issuance entry originates from, i.e. 'rdamodeissue' or 'local'" }, "metadata": { "type": "object", "$ref": "raml-util/schemas/metadata.schema", "readonly": true } }, "required": [ "name" ] }