foliolib.folio.api.users.Patronpin

class foliolib.folio.api.users.Patronpin(tenant: str)

Bases: foliolib.folio.FolioApi

patron-pins API

This documents the API calls that can be made to set and verify patron pins

Base class of the Folio API

Parameters

tenant (str) – Tenant id

Methods

delete_patronPins(patronPin)

Remove the PIN for a user

set_patronPin(patronPin)

Set the PIN for a user

set_verify(verify)

Verify the pin posted

delete_patronPins(patronPin: dict)

Remove the PIN for a user

DELETE /patron-pin

Parameters

patronPin (dict) – See Schema below

Raises
  • OkapiRequestUnprocessableEntity – Unprocessable Entity

  • OkapiRequestFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Patron PIN Schema",
  "description": "A Patron ID and optional Corresponding PIN",
  "type": "object",
  "properties": {
    "id": {
      "description": "ID of user",
      "type": "string"
    },
    "pin": {
      "description": "PIN of user",
      "type": "string"
    }
  }
}
set_patronPin(patronPin: dict)

Set the PIN for a user

POST /patron-pin

Parameters

patronPin (dict) – See Schema below

Raises

OkapiRequestFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Patron PIN Schema",
  "description": "A Patron ID and optional Corresponding PIN",
  "type": "object",
  "properties": {
    "id": {
      "description": "ID of user",
      "type": "string"
    },
    "pin": {
      "description": "PIN of user",
      "type": "string"
    }
  }
}
set_verify(verify: dict)

Verify the pin posted

POST /patron-pin/verify

Parameters

verify (dict) – See Schema below

Raises
  • OkapiRequestUnprocessableEntity – Unprocessable Entity

  • OkapiRequestFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Patron PIN Schema",
  "description": "A Patron ID and optional Corresponding PIN",
  "type": "object",
  "properties": {
    "id": {
      "description": "ID of user",
      "type": "string"
    },
    "pin": {
      "description": "PIN of user",
      "type": "string"
    }
  }
}