foliolib.folio.api.inventoryStorage.ServicePoint

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

Bases: foliolib.folio.FolioApi

Service Points API

This documents the API calls that can be made to query and manage service points in the system

Parameters
  • tenant (str) – Tenant id

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

Methods

delete_servicePoint(servicepointId)

Delete servicePoint item with given {servicePointId}

delete_servicePoints()

DELETE /service-points

get_servicePoint(servicepointId)

Retrieve servicePoint item with given {servicePointId}

get_servicePoints(**kwargs)

Return a list of service points

modify_servicePoint(servicepointId, servicePoint)

Update a service point

set_servicePoint(servicePoint)

Create a new service point

delete_servicePoint(servicepointId: str)

Delete servicePoint item with given {servicePointId}

DELETE /service-points/{servicepointId}

Parameters

servicepointId (str) –

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

delete_servicePoints()

DELETE /service-points

get_servicePoint(servicepointId: str)

Retrieve servicePoint item with given {servicePointId}

GET /service-points/{servicepointId}

Parameters

servicepointId (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 service point",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id of service-point object"
    },
    "name": {
      "type": "string",
      "description": "service-point name, a required field"
    },
    "code": {
      "type": "string",
      "description": "service-point code, a required field"
    },
    "discoveryDisplayName": {
      "type": "string",
      "description": "display name, a required field"
    },
    "description": {
      "type": "string",
      "description": "description of the service-point"
    },
    "shelvingLagTime": {
      "type": "integer",
      "description": "shelving lag time"
    },
    "pickupLocation": {
      "type": "boolean",
      "description": "indicates whether or not the service point is a pickup location"
    },
    "holdShelfExpiryPeriod": {
      "type": "object",
      "$ref": "time-period.json",
      "description": "expiration period for items on the hold shelf at the service point"
    },
    "holdShelfClosedLibraryDateManagement": {
      "type": "string",
      "description": "enum for closedLibraryDateManagement associated with hold shelf",
      "enum": [
        "Keep_the_current_due_date",
        "Move_to_the_end_of_the_previous_open_day",
        "Move_to_the_end_of_the_next_open_day",
        "Keep_the_current_due_date_time",
        "Move_to_end_of_current_service_point_hours",
        "Move_to_beginning_of_next_open_service_point_hours"
      ],
      "default": "Keep_the_current_due_date"
    },
    "staffSlips": {
      "type": "array",
      "description": "List of staff slips for this service point",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
            "description": "The ID of the staff slip"
          },
          "printByDefault": {
            "type": "boolean",
            "description": "Whether or not to print the staff slip by default"
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "printByDefault"
        ]
      }
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "code",
    "discoveryDisplayName"
  ]
}
get_servicePoints(**kwargs)

Return a list of service points

GET /service-points

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 service points",
  "type": "object",
  "properties": {
    "servicepoints": {
      "description": "List of service points",
      "id": "servicepoint",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "servicepoint.json"
      }
    },
    "totalRecords": {
      "description": "Estimated or exact total number of records",
      "type": "integer"
    }
  },
  "required": [
    "servicepoints",
    "totalRecords"
  ]
}
modify_servicePoint(servicepointId: str, servicePoint: dict)

Update a service point

PUT /service-points/{servicepointId}

Parameters
  • servicepointId (str) –

  • servicePoint (dict) – See Schema below

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiRequestConflict – Conflict

  • OkapiFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A service point",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id of service-point object"
    },
    "name": {
      "type": "string",
      "description": "service-point name, a required field"
    },
    "code": {
      "type": "string",
      "description": "service-point code, a required field"
    },
    "discoveryDisplayName": {
      "type": "string",
      "description": "display name, a required field"
    },
    "description": {
      "type": "string",
      "description": "description of the service-point"
    },
    "shelvingLagTime": {
      "type": "integer",
      "description": "shelving lag time"
    },
    "pickupLocation": {
      "type": "boolean",
      "description": "indicates whether or not the service point is a pickup location"
    },
    "holdShelfExpiryPeriod": {
      "type": "object",
      "$ref": "time-period.json",
      "description": "expiration period for items on the hold shelf at the service point"
    },
    "holdShelfClosedLibraryDateManagement": {
      "type": "string",
      "description": "enum for closedLibraryDateManagement associated with hold shelf",
      "enum": [
        "Keep_the_current_due_date",
        "Move_to_the_end_of_the_previous_open_day",
        "Move_to_the_end_of_the_next_open_day",
        "Keep_the_current_due_date_time",
        "Move_to_end_of_current_service_point_hours",
        "Move_to_beginning_of_next_open_service_point_hours"
      ],
      "default": "Keep_the_current_due_date"
    },
    "staffSlips": {
      "type": "array",
      "description": "List of staff slips for this service point",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
            "description": "The ID of the staff slip"
          },
          "printByDefault": {
            "type": "boolean",
            "description": "Whether or not to print the staff slip by default"
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "printByDefault"
        ]
      }
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "code",
    "discoveryDisplayName"
  ]
}
set_servicePoint(servicePoint: dict)

Create a new service point

POST /service-points

Parameters

servicePoint (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Headers

  • Location - URI to the created servicePoint item

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A service point",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id of service-point object"
    },
    "name": {
      "type": "string",
      "description": "service-point name, a required field"
    },
    "code": {
      "type": "string",
      "description": "service-point code, a required field"
    },
    "discoveryDisplayName": {
      "type": "string",
      "description": "display name, a required field"
    },
    "description": {
      "type": "string",
      "description": "description of the service-point"
    },
    "shelvingLagTime": {
      "type": "integer",
      "description": "shelving lag time"
    },
    "pickupLocation": {
      "type": "boolean",
      "description": "indicates whether or not the service point is a pickup location"
    },
    "holdShelfExpiryPeriod": {
      "type": "object",
      "$ref": "time-period.json",
      "description": "expiration period for items on the hold shelf at the service point"
    },
    "holdShelfClosedLibraryDateManagement": {
      "type": "string",
      "description": "enum for closedLibraryDateManagement associated with hold shelf",
      "enum": [
        "Keep_the_current_due_date",
        "Move_to_the_end_of_the_previous_open_day",
        "Move_to_the_end_of_the_next_open_day",
        "Keep_the_current_due_date_time",
        "Move_to_end_of_current_service_point_hours",
        "Move_to_beginning_of_next_open_service_point_hours"
      ],
      "default": "Keep_the_current_due_date"
    },
    "staffSlips": {
      "type": "array",
      "description": "List of staff slips for this service point",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
            "description": "The ID of the staff slip"
          },
          "printByDefault": {
            "type": "boolean",
            "description": "Whether or not to print the staff slip by default"
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "printByDefault"
        ]
      }
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "code",
    "discoveryDisplayName"
  ]
}