foliolib.folio.api.organizationsStorage.PhoneNumber
- class foliolib.folio.api.organizationsStorage.PhoneNumber(tenant: str)
Bases:
foliolib.folio.FolioApiDeprecated. Phone Numbers
- CRUD APIs used to manage phone numbers.
These APIs are not currently in use and may at some point be removed or resurrected
Base class of the Folio API
- Parameters
tenant (str) – Tenant id
Methods
delete_phoneNumber(phoneNumbersId)Delete phoneNumber item with given {phoneNumberId}
get_phoneNumber(phoneNumbersId)Retrieve phoneNumber item with given {phoneNumberId}
get_phoneNumbers(**kwargs)Get list of phone_numbers
modify_phoneNumber(phoneNumbersId, phoneNumber)Update phoneNumber item with given {phoneNumberId}
set_phoneNumber(phoneNumber)Create a new phoneNumber item.
- delete_phoneNumber(phoneNumbersId: str)
Delete phoneNumber item with given {phoneNumberId}
DELETE /organizations-storage/phone-numbers/{phoneNumbersId}- Parameters
phoneNumbersId (str) –
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiRequestFatalError – Server Error
- get_phoneNumber(phoneNumbersId: str)
Retrieve phoneNumber item with given {phoneNumberId}
GET /organizations-storage/phone-numbers/{phoneNumbersId}- Parameters
phoneNumbersId (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": "A phone number record", "type": "object", "properties": { "id": { "description": "UUID", "$ref": "../../common/schemas/uuid.json" }, "phoneNumber": { "description": "The entire sequence of digits for this phone number", "type": "string" }, "categories": { "id": "categories", "description": "The list of categories for this organization phone", "type": "array", "items": { "type": "string" } }, "type": { "description": "The type of this phone number", "type": "string", "enum": [ "Office", "Mobile", "Fax", "Other" ] }, "isPrimary": { "description": "Used to set this phone number as primary for the contact", "type": "boolean" }, "language": { "description": "The language for this organization phone", "type": "string" }, "metadata": { "type": "object", "$ref": "../../../raml-util/schemas/metadata.schema", "readonly": true } }, "additionalProperties": false, "required": [ "phoneNumber" ] }
- get_phoneNumbers(**kwargs)
Get list of phone_numbers
GET /organizations-storage/phone-numbers- 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: for example code
Example
(username==”ab*” or personal.firstName==”ab*” or personal.lastName==”ab*”) and active==”true” sortby personal.lastName personal.firstName barcode
[“code”, “MEDGRANT”, “=”]
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": "Collection of phone numbers", "type": "object", "properties": { "phoneNumbers": { "description": "The list of phone numbers in this collection", "type": "array", "id": "phoneNumbers", "items": { "type": "object", "$ref": "phone_number.json" } }, "totalRecords": { "description": "The number of phone numbers returned in this collection", "type": "integer" } }, "additionalProperties": false, "required": [ "phoneNumbers", "totalRecords" ] }
- modify_phoneNumber(phoneNumbersId: str, phoneNumber: dict)
Update phoneNumber item with given {phoneNumberId}
PUT /organizations-storage/phone-numbers/{phoneNumbersId}- Parameters
phoneNumbersId (str) –
phoneNumber (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": "A phone number record", "type": "object", "properties": { "id": { "description": "UUID", "$ref": "../../common/schemas/uuid.json" }, "phoneNumber": { "description": "The entire sequence of digits for this phone number", "type": "string" }, "categories": { "id": "categories", "description": "The list of categories for this organization phone", "type": "array", "items": { "type": "string" } }, "type": { "description": "The type of this phone number", "type": "string", "enum": [ "Office", "Mobile", "Fax", "Other" ] }, "isPrimary": { "description": "Used to set this phone number as primary for the contact", "type": "boolean" }, "language": { "description": "The language for this organization phone", "type": "string" }, "metadata": { "type": "object", "$ref": "../../../raml-util/schemas/metadata.schema", "readonly": true } }, "additionalProperties": false, "required": [ "phoneNumber" ] }
- set_phoneNumber(phoneNumber: dict)
Create a new phoneNumber item.
POST /organizations-storage/phone-numbers- Parameters
phoneNumber (dict) – See Schema below
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiRequestFatalError – Server Error
Headers
Location - URI to the created phoneNumber item
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "A phone number record", "type": "object", "properties": { "id": { "description": "UUID", "$ref": "../../common/schemas/uuid.json" }, "phoneNumber": { "description": "The entire sequence of digits for this phone number", "type": "string" }, "categories": { "id": "categories", "description": "The list of categories for this organization phone", "type": "array", "items": { "type": "string" } }, "type": { "description": "The type of this phone number", "type": "string", "enum": [ "Office", "Mobile", "Fax", "Other" ] }, "isPrimary": { "description": "Used to set this phone number as primary for the contact", "type": "boolean" }, "language": { "description": "The language for this organization phone", "type": "string" }, "metadata": { "type": "object", "$ref": "../../../raml-util/schemas/metadata.schema", "readonly": true } }, "additionalProperties": false, "required": [ "phoneNumber" ] }