WebCheckout API v2.0 Documentation

Sessions, Authentication, and Authorization

Users of the API are represented by one or more sessions. A session is created as soon as the user first connects to the API. Each session may or not be authenticated; once authenticated, it will represent a single user. Sessions will remain authenticated until the user explicitly logs out or the session times out.

Session Identification

In WebCheckout historically sessions have been maintained using browser cookies, so in practice all windows and tabs in the same browser share a single session. In order to allow for multiple session per browser we have added the "sessionid" argument. In the absense of this argument, the REST server will attempt to authenticate the user using a browser cookie.

Authentication

Any request, apart from an attempt to authenticate, submitted to the REST API prior to authenticating will recieve a message with the status unauthenticated.

Authentication is performed by posting the following in the HTTP request to /rest/session/start:

Providing the Authorization header with the value "Bearer Requested" notifies the api to generate a new bearer token that carries the same authorization and privileges as the account that your username and password belong to.

As of API v2.0, only Bearer Token API authentication is available for authentication

POST /rest/session/start HTTP/1.1

      {
        "headers": {
          "Authorization": "Bearer Requested"
        },
        "postBody": {
          "userid": "windowworker",
          "password": "windowwindow"
        }
      }

HTTP 200

      {
        "apiVersion": "2.0",
        "uri": "/rest/session/start",
        "session": {
          "id": "S-78373",
          "agent": {
            "_class": "person",
            "oid": 1393,
            "name": "Window",
            "avatar": null,
            "lastName": null,
            "otherName": "",
            "firstName": "Window",
            "userid": "windowworker"
          },
          "checkoutCenter": null,
          "organization": null,
          "focusAllocation": null,
          "editingAllocations": null,
          "transientDocuments": null,
          "resetTimeout": false,
          "resetApproved": false
        },
        "status": "ok",
        "notifications": null,
        "alert": null,
        "payload": {
          "capabilities": null,
          "roles": {
            "circulatingPatron": null,
            "noncirculatingPatron": null,
            "operator": [
              {
                "_class": "checkoutCenter",
                "oid": 1,
                "name": "WebCheckout",
                "organization": {
                  "_class": "organization",
                  "oid": 1,
                  "name": "WebCheckout"
                },
                "description": null
              }
            ],
            "employee": [
              {
                "_class": "organization",
                "oid": 1,
                "name": "WebCheckout"
              }
            ],
            "staff": null,
            "inventory": null,
            "manager": null,
            "importer": null,
            "facilitiesManager": null,
            "projectsManager": null,
            "admin": null
          },
          "focusAllocation": null,
          "editingAllocations": null,
          "timezone": "America/Chicago",
          "locale": "en_US",
          "logoutUri": null,
          "timeout": 900,
          "expiration": 899,
          "twentyFourHourTime": false,
          "publicBaseUri": "foo",
          "messages": null
        },
        "sessionToken": "eyJ0eXBlIjogInNlc3Npb24iLCAidmFsdWUiOiAiZGI0YjZmNGEtMGI5Yy00M2QzLTllY2EtMjM5MzkwNzdjNTFlIn0=",
        "sessionid": "db4b6f4a-0b9c-43d3-9eca-23939077c51e"
      }

If the API does not recognize the provided credentials the consumer is notified.

Roles and Session Scope

In many cases, the proper functioning of the API requires the concept of a "Session Organization" or a "Session Checkout Center", collectively refered to as a session scope. Only a few operations are available to the user before they have declared a session scope. The session scope may be changed at any time, however work in progress in the previous scope may be lost when the scope is changed.

Failure to set the session scope before most API calls results in a unique error condition.

POST /rest/resource/search HTTP/1.1

      {
        "headers": {
          "Authorization": "Bearer eyJ0eXBlIjogInNlc3Npb24iLCAidmFsdWUiOiAiN2YxM2EyMTQtNDQxMi00MmZiLWEwOWQtMmFmMGUwOTU1YzVkIn0="
        },
        "postBody": {}
      }

HTTP 200

      {
        "apiVersion": "2.0",
        "uri": "/rest/resource/search",
        "session": {
          "id": "S-78443",
          "agent": {
            "_class": "person",
            "oid": 1393,
            "name": "Window",
            "avatar": null,
            "lastName": null,
            "otherName": "",
            "firstName": "Window",
            "userid": "windowworker"
          },
          "checkoutCenter": {
            "_class": "checkoutCenter",
            "oid": 1,
            "name": "WebCheckout",
            "organization": {
              "_class": "organization",
              "oid": 1,
              "name": "WebCheckout"
            },
            "description": null
          },
          "organization": {
            "_class": "organization",
            "oid": 1,
            "name": "WebCheckout"
          },
          "focusAllocation": null,
          "editingAllocations": null,
          "transientDocuments": null,
          "resetTimeout": false,
          "resetApproved": false
        },
        "status": "ok",
        "notifications": null,
        "alert": null,
        "payload": {
          "count": 1,
          "summary": null,
          "result": [
            {
              "_class": "resource",
              "oid": 2380,
              "name": "MyAPIResource",
              "circulating": true,
              "statusString": "Available",
              "barcode": null
            }
          ]
        },
        "sessionToken": "eyJ0eXBlIjogInNlc3Npb24iLCAidmFsdWUiOiAiN2YxM2EyMTQtNDQxMi00MmZiLWEwOWQtMmFmMGUwOTU1YzVkIn0=",
        "sessionid": "7f13a214-4412-42fb-a09d-2af0e0955c5d"
      }

A user may have multiple Roles in WebCheckout. Roles are tied to different scopes. For example, one may be an operator at a specific Checkout Center, or a manager at an organization.

There are currently five defined roles:

The user can request the list of valid session scopes by role.

POST /rest/session/sessionRoles HTTP/1.1

      {
        "headers": {
          "Authorization": "Bearer eyJ0eXBlIjogInNlc3Npb24iLCAidmFsdWUiOiAiN2YxM2EyMTQtNDQxMi00MmZiLWEwOWQtMmFmMGUwOTU1YzVkIn0="
        },
        "postBody": {}
      }

HTTP 200

      {
        "apiVersion": "2.0",
        "uri": "/rest/session/sessionRoles",
        "session": {
          "id": "S-78443",
          "agent": {
            "_class": "person",
            "oid": 1393,
            "name": "Window",
            "avatar": null,
            "lastName": null,
            "otherName": "",
            "firstName": "Window",
            "userid": "windowworker"
          },
          "checkoutCenter": {
            "_class": "checkoutCenter",
            "oid": 1,
            "name": "WebCheckout",
            "organization": {
              "_class": "organization",
              "oid": 1,
              "name": "WebCheckout"
            },
            "description": null
          },
          "organization": {
            "_class": "organization",
            "oid": 1,
            "name": "WebCheckout"
          },
          "focusAllocation": null,
          "editingAllocations": null,
          "transientDocuments": null,
          "resetTimeout": false,
          "resetApproved": false
        },
        "status": "ok",
        "notifications": null,
        "alert": null,
        "payload": {
          "circulatingPatron": null,
          "noncirculatingPatron": null,
          "operator": [
            {
              "_class": "checkoutCenter",
              "oid": 1,
              "name": "WebCheckout",
              "organization": {
                "_class": "organization",
                "oid": 1,
                "name": "WebCheckout"
              },
              "description": null
            }
          ],
          "employee": [
            {
              "_class": "organization",
              "oid": 1,
              "name": "WebCheckout"
            }
          ],
          "staff": null,
          "inventory": null,
          "manager": null,
          "importer": null,
          "facilitiesManager": null,
          "projectsManager": null,
          "admin": null
        },
        "sessionToken": "eyJ0eXBlIjogInNlc3Npb24iLCAidmFsdWUiOiAiN2YxM2EyMTQtNDQxMi00MmZiLWEwOWQtMmFmMGUwOTU1YzVkIn0=",
        "sessionid": "7f13a214-4412-42fb-a09d-2af0e0955c5d"
      }

The user may then set their session scope to an organization...

POST /rest/session/setSessionScope HTTP/1.1

      {
        "headers": {
          "Authorization": "Bearer eyJ0eXBlIjogInNlc3Npb24iLCAidmFsdWUiOiAiN2YxM2EyMTQtNDQxMi00MmZiLWEwOWQtMmFmMGUwOTU1YzVkIn0="
        },
        "postBody": {
          "organization": {
            "_class": "organization",
            "oid": 1
          }
        }
      }

HTTP 200

      {
        "apiVersion": "2.0",
        "uri": "/rest/session/setSessionScope",
        "session": {
          "id": "S-78443",
          "agent": {
            "_class": "person",
            "oid": 1393,
            "name": "Window",
            "avatar": null,
            "lastName": null,
            "otherName": "",
            "firstName": "Window",
            "userid": "windowworker"
          },
          "checkoutCenter": {
            "_class": "checkoutCenter",
            "oid": 1,
            "name": "WebCheckout",
            "organization": {
              "_class": "organization",
              "oid": 1,
              "name": "WebCheckout"
            },
            "description": null
          },
          "organization": {
            "_class": "organization",
            "oid": 1,
            "name": "WebCheckout"
          },
          "focusAllocation": null,
          "editingAllocations": null,
          "transientDocuments": null,
          "resetTimeout": false,
          "resetApproved": false
        },
        "status": "ok",
        "notifications": null,
        "alert": null,
        "payload": {
          "capabilities": [
            {
              "_class": "systemCapability",
              "oid": 1,
              "name": "Perform Circulation Actions",
              "key": "CIRCULATE"
            },
            {
              "_class": "systemCapability",
              "oid": 66,
              "name": "Override Resource with Open Tickets",
              "key": "OVERRIDE-RESOURCE-HAS-OPEN-TICKETS"
            },
            {
              "_class": "systemCapability",
              "oid": 2,
              "name": "Edit Allocations",
              "key": "EDIT-RESERVATIONS"
            },
            {
              "_class": "systemCapability",
              "oid": 6,
              "name": "Manage Resource Condition",
              "key": "ADD-CONDITION-NOTES"
            },
            {
              "_class": "systemCapability",
              "oid": 68,
              "name": "Assign Tasks",
              "key": "ASSIGN-TASKS"
            }
          ],
          "roles": {
            "circulatingPatron": null,
            "noncirculatingPatron": null,
            "operator": [
              {
                "_class": "checkoutCenter",
                "oid": 1,
                "name": "WebCheckout",
                "organization": {
                  "_class": "organization",
                  "oid": 1,
                  "name": "WebCheckout"
                },
                "description": null
              }
            ],
            "employee": [
              {
                "_class": "organization",
                "oid": 1,
                "name": "WebCheckout"
              }
            ],
            "staff": null,
            "inventory": null,
            "manager": null,
            "importer": null,
            "facilitiesManager": null,
            "projectsManager": null,
            "admin": null
          },
          "focusAllocation": null,
          "editingAllocations": null,
          "timezone": "America/Chicago",
          "locale": "en_US",
          "logoutUri": null,
          "timeout": 10800,
          "expiration": 10799,
          "twentyFourHourTime": false,
          "publicBaseUri": "foo",
          "messages": null
        },
        "sessionToken": "eyJ0eXBlIjogInNlc3Npb24iLCAidmFsdWUiOiAiN2YxM2EyMTQtNDQxMi00MmZiLWEwOWQtMmFmMGUwOTU1YzVkIn0=",
        "sessionid": "7f13a214-4412-42fb-a09d-2af0e0955c5d"
      }

... or to a checkout center

POST /rest/session/setSessionScope HTTP/1.1

      {
        "headers": {
          "Authorization": "Bearer eyJ0eXBlIjogInNlc3Npb24iLCAidmFsdWUiOiAiN2YxM2EyMTQtNDQxMi00MmZiLWEwOWQtMmFmMGUwOTU1YzVkIn0="
        },
        "postBody": {
          "checkoutCenter": {
            "_class": "checkout-center",
            "oid": 1
          }
        }
      }

HTTP 200

      {
        "apiVersion": "2.0",
        "uri": "/rest/session/setSessionScope",
        "session": {
          "id": "S-78443",
          "agent": {
            "_class": "person",
            "oid": 1393,
            "name": "Window",
            "avatar": null,
            "lastName": null,
            "otherName": "",
            "firstName": "Window",
            "userid": "windowworker"
          },
          "checkoutCenter": {
            "_class": "checkoutCenter",
            "oid": 1,
            "name": "WebCheckout",
            "organization": {
              "_class": "organization",
              "oid": 1,
              "name": "WebCheckout"
            },
            "description": null
          },
          "organization": {
            "_class": "organization",
            "oid": 1,
            "name": "WebCheckout"
          },
          "focusAllocation": null,
          "editingAllocations": null,
          "transientDocuments": null,
          "resetTimeout": false,
          "resetApproved": false
        },
        "status": "ok",
        "notifications": null,
        "alert": null,
        "payload": {
          "capabilities": [
            {
              "_class": "systemCapability",
              "oid": 1,
              "name": "Perform Circulation Actions",
              "key": "CIRCULATE"
            },
            {
              "_class": "systemCapability",
              "oid": 66,
              "name": "Override Resource with Open Tickets",
              "key": "OVERRIDE-RESOURCE-HAS-OPEN-TICKETS"
            },
            {
              "_class": "systemCapability",
              "oid": 2,
              "name": "Edit Allocations",
              "key": "EDIT-RESERVATIONS"
            },
            {
              "_class": "systemCapability",
              "oid": 6,
              "name": "Manage Resource Condition",
              "key": "ADD-CONDITION-NOTES"
            },
            {
              "_class": "systemCapability",
              "oid": 68,
              "name": "Assign Tasks",
              "key": "ASSIGN-TASKS"
            }
          ],
          "roles": {
            "circulatingPatron": null,
            "noncirculatingPatron": null,
            "operator": [
              {
                "_class": "checkoutCenter",
                "oid": 1,
                "name": "WebCheckout",
                "organization": {
                  "_class": "organization",
                  "oid": 1,
                  "name": "WebCheckout"
                },
                "description": null
              }
            ],
            "employee": [
              {
                "_class": "organization",
                "oid": 1,
                "name": "WebCheckout"
              }
            ],
            "staff": null,
            "inventory": null,
            "manager": null,
            "importer": null,
            "facilitiesManager": null,
            "projectsManager": null,
            "admin": null
          },
          "focusAllocation": null,
          "editingAllocations": null,
          "timezone": "America/Chicago",
          "locale": "en_US",
          "logoutUri": null,
          "timeout": 10800,
          "expiration": 10799,
          "twentyFourHourTime": false,
          "publicBaseUri": "foo",
          "messages": null
        },
        "sessionToken": "eyJ0eXBlIjogInNlc3Npb24iLCAidmFsdWUiOiAiN2YxM2EyMTQtNDQxMi00MmZiLWEwOWQtMmFmMGUwOTU1YzVkIn0=",
        "sessionid": "7f13a214-4412-42fb-a09d-2af0e0955c5d"
      }

Note that when setting the scope to an organization, the session checkout center is null. When setting the scope to a checkout center the session organization is the organization of the checkout center

Session Information

Information about the current session, including the session timezone, locale, and relevant information about the session agent.

Note that currentSession is an example of a POST operation with an empty payload assuming authentication is being performed using browser codes.

POST /rest/session/currentSession HTTP/1.1

      {
        "headers": {
          "Authorization": "Bearer eyJ0eXBlIjogInNlc3Npb24iLCAidmFsdWUiOiAiN2YxM2EyMTQtNDQxMi00MmZiLWEwOWQtMmFmMGUwOTU1YzVkIn0="
        },
        "postBody": {}
      }

HTTP 200

      {
        "apiVersion": "2.0",
        "uri": "/rest/session/currentSession",
        "session": {
          "id": "S-78443",
          "agent": {
            "_class": "person",
            "oid": 1393,
            "name": "Window",
            "avatar": null,
            "lastName": null,
            "otherName": "",
            "firstName": "Window",
            "userid": "windowworker"
          },
          "checkoutCenter": {
            "_class": "checkoutCenter",
            "oid": 1,
            "name": "WebCheckout",
            "organization": {
              "_class": "organization",
              "oid": 1,
              "name": "WebCheckout"
            },
            "description": null
          },
          "organization": {
            "_class": "organization",
            "oid": 1,
            "name": "WebCheckout"
          },
          "focusAllocation": null,
          "editingAllocations": null,
          "transientDocuments": null,
          "resetTimeout": false,
          "resetApproved": false
        },
        "status": "ok",
        "notifications": null,
        "alert": null,
        "payload": {
          "capabilities": null,
          "roles": {
            "circulatingPatron": null,
            "noncirculatingPatron": null,
            "operator": [
              {
                "_class": "checkoutCenter",
                "oid": 1,
                "name": "WebCheckout",
                "organization": {
                  "_class": "organization",
                  "oid": 1,
                  "name": "WebCheckout"
                },
                "description": null
              }
            ],
            "employee": [
              {
                "_class": "organization",
                "oid": 1,
                "name": "WebCheckout"
              }
            ],
            "staff": null,
            "inventory": null,
            "manager": null,
            "importer": null,
            "facilitiesManager": null,
            "projectsManager": null,
            "admin": null
          },
          "focusAllocation": null,
          "editingAllocations": null,
          "timezone": "America/Chicago",
          "locale": "en_US",
          "logoutUri": null,
          "timeout": 10800,
          "expiration": 10799,
          "twentyFourHourTime": false,
          "publicBaseUri": "foo",
          "messages": null
        },
        "sessionToken": "eyJ0eXBlIjogInNlc3Npb24iLCAidmFsdWUiOiAiN2YxM2EyMTQtNDQxMi00MmZiLWEwOWQtMmFmMGUwOTU1YzVkIn0=",
        "sessionid": "7f13a214-4412-42fb-a09d-2af0e0955c5d"
      }
Timeouts

Timeout values are configured at the application level. There are two options with the following defaults:

  1. Default Timeout: 5 minutes
  2. Operator Timeout: 3 Hours

All API sessions time out after a certain period of inactivity based on the authenticated user and the sessions scope.

The current timout and remaining inactiviy time can be retrieved by calling the session/timeLeft command. Most calls to the REST API will reset the session timeout with the expection of start, info, currentSession, timeLeft, and currentTime commands in the session namespace.

If the API user wishes to prevent the updating of the timeout the noKeepAlive argument may be set to "true" for the request.

Authorizations

Every operation through the rest API apart from authentication requires the session have certain authorizations. Some operations may be performed beyond the authorization of the current session by way of "Pinning." In this mechanism the pin of a user with greater authorization is provided along with a command to authorize the action.

Authorizations are defined on commands and properties as a list, with each authorization applied in turn. The first authorization that "matches" is applied and all subsequent tests are skipped.

For security reasons this whole mechanism may change substanitally in the future.

Authorization Definitions

Authorizations to perform commands or to read or write properties come in one of three types; defaults, authorization tests, and system authorizations (sysauths.)

Default Authorizations

An authorization may be defined as "defaultAllow". This means that any propperly authenticated user of the application is authorized for this action. If, after all authorizations have been exhaustesd without a match, the authorization is denyed by default.

Authorization Tests

Authorization tests are determined based on the authenticated users relationship to the data being requested or manipulated. For example, an authenticated user has access to more information about their own person record than they do the person records of others. They are also able to manipulate allocations where they are the patron

Authorization tests come in two forms "ALLOW" and "DENY". If an "ALLOW" test matches the action is concidered authorized; if a "DENY" test matches the action immediatly is rejected.

An authorization test is represented in the JSON listing the name of the test, the arguments to which the test is applied, and a bti of documentation about the test.

	{
            "test": "ownReservation", 
            "testArguments": ["allocation"], 
            "testDocumentation": "True if the given allocation is a reservation (editable or no) and the session agent is the patron", 
            "type": "allow"
        }
System Authorizations

System authorizations, or sysauths, are granted to specific users based on their affiliation with organizations and apply to entities and actions under the control of that organization. A complete list of granted sysauths can be found in the details of the session returned by the session/start, session/setSessionScope, and session/currentSession commands.

A typical sysauth definition lists the auths required and the entity (argument) to which the auths are applied.

	{
	    "auths": ["CIRCULATE"], 
	    "entity": "allocation", 
	    "type": "sysauth"
	}

sysauthNoPin identifies a sysauth which will not require Ident Pinning (see below).

        {
            "auths": ["CIRCULATE"], 
            "entity": "allocation", 
            "type": "sysauthNoPin"
        }

Some commands take a list of arguments which all have to be authorized. In these cases the entity value will be a list of an identifier used for each item, and the list argument that the auths will be applied to

        {
            "auths": ["CIRCULATE"], 
            "entity": [
                "item", 
                "items"
            ], 
            "type": "sysauthAll"
        }

In some cases the list of required authorizations will be generated at run time based on the supplied arguments. In this case the definition will list the command used to generate the list of sysauths, and some documentation about how that command functions.

	{
            "args": ["allocation"], 
            "command": "requiredCancelAuths", 
            "documentation": "Returns #!circulate #!edit-reservations and #!manage-pir-reservations if this allocation requires approval, #!circulate and #!edit-reservations otherwise", 
            "entity": "allocation", 
            "type": "sysauth"
        }

Please note that for properties, authorizations list the entity as "self", meaning the entity whos property is being read or written

        {
            "auths": [
                "OPERATOR"
            ], 
            "entity": "self", 
            "type": "sysauth"
        }
Authorization Failure

When an unauthorized action is performed, the API responds that the agent of the current session does not have the authorization to perform that operation.

POST /rest/person/update HTTP/1.1

      {
        "headers": {
          "Authorization": "Bearer eyJ0eXBlIjogInNlc3Npb24iLCAidmFsdWUiOiAiN2YxM2EyMTQtNDQxMi00MmZiLWEwOWQtMmFmMGUwOTU1YzVkIn0="
        },
        "postBody": {
          "oid": 1,
          "values": {
            "barcode": "12345"
          }
        }
      }

HTTP 200

      {
        "apiVersion": "2.0",
        "uri": "/rest/person/update",
        "session": {
          "id": "S-78443",
          "agent": {
            "_class": "person",
            "oid": 1393,
            "name": "Window",
            "avatar": null,
            "lastName": null,
            "otherName": "",
            "firstName": "Window",
            "userid": "windowworker"
          },
          "checkoutCenter": {
            "_class": "checkoutCenter",
            "oid": 1,
            "name": "WebCheckout",
            "organization": {
              "_class": "organization",
              "oid": 1,
              "name": "WebCheckout"
            },
            "description": null
          },
          "organization": {
            "_class": "organization",
            "oid": 1,
            "name": "WebCheckout"
          },
          "focusAllocation": null,
          "editingAllocations": null,
          "transientDocuments": null,
          "resetTimeout": false,
          "resetApproved": false
        },
        "status": "authorizationRequired",
        "notifications": null,
        "alert": null,
        "payload": "You are not authorized to manage people",
        "sessionToken": "eyJ0eXBlIjogInNlc3Npb24iLCAidmFsdWUiOiAiN2YxM2EyMTQtNDQxMi00MmZiLWEwOWQtMmFmMGUwOTU1YzVkIn0=",
        "sessionid": "7f13a214-4412-42fb-a09d-2af0e0955c5d"
      }
Pinning

The above request with the included pin argument will perform the operation with the permissions of the user with the given pin.

Pin Failure

If an incorrect pin, or a pin for a user that lacks the required authorization is provided, the API notifies the client of a authorization failure.

POST /rest/person/update HTTP/1.1

      {
        "headers": {
          "Authorization": "Bearer eyJ0eXBlIjogInNlc3Npb24iLCAidmFsdWUiOiAiN2YxM2EyMTQtNDQxMi00MmZiLWEwOWQtMmFmMGUwOTU1YzVkIn0="
        },
        "postBody": {
          "oid": 1,
          "values": {
            "barcode": "12345"
          },
          "pin": "badPin"
        }
      }

HTTP 200

      {
        "apiVersion": "2.0",
        "uri": "/rest/person/update",
        "session": {
          "id": "S-78443",
          "agent": {
            "_class": "person",
            "oid": 1393,
            "name": "Window",
            "avatar": null,
            "lastName": null,
            "otherName": "",
            "firstName": "Window",
            "userid": "windowworker"
          },
          "checkoutCenter": {
            "_class": "checkoutCenter",
            "oid": 1,
            "name": "WebCheckout",
            "organization": {
              "_class": "organization",
              "oid": 1,
              "name": "WebCheckout"
            },
            "description": null
          },
          "organization": {
            "_class": "organization",
            "oid": 1,
            "name": "WebCheckout"
          },
          "focusAllocation": null,
          "editingAllocations": null,
          "transientDocuments": null,
          "resetTimeout": false,
          "resetApproved": false
        },
        "status": "authorizationFailed",
        "notifications": null,
        "alert": null,
        "payload": "Invalid PIN",
        "sessionToken": "eyJ0eXBlIjogInNlc3Npb24iLCAidmFsdWUiOiAiN2YxM2EyMTQtNDQxMi00MmZiLWEwOWQtMmFmMGUwOTU1YzVkIn0=",
        "sessionid": "7f13a214-4412-42fb-a09d-2af0e0955c5d"
      }
Ident Pinning

When one or more system authorizations is checked for a session, unless that session has the "BYPASS-PIN" authorization, the API will require that the user enter their pin to reconfirm the users identity.

POST /rest/resource/update HTTP/1.1

      {
        "headers": {
          "Authorization": "Bearer eyJ0eXBlIjogInNlc3Npb24iLCAidmFsdWUiOiAiN2YxM2EyMTQtNDQxMi00MmZiLWEwOWQtMmFmMGUwOTU1YzVkIn0="
        }
      }

HTTP 500

      {
        "apiVersion": "2.0",
        "uri": "/rest/resource/update",
        "session": {
          "id": "S-78443",
          "agent": {
            "_class": "person",
            "oid": 1393,
            "name": "Window",
            "avatar": null,
            "lastName": null,
            "otherName": "",
            "firstName": "Window",
            "userid": "windowworker"
          },
          "checkoutCenter": {
            "_class": "checkoutCenter",
            "oid": 1,
            "name": "WebCheckout",
            "organization": {
              "_class": "organization",
              "oid": 1,
              "name": "WebCheckout"
            },
            "description": null
          },
          "organization": {
            "_class": "organization",
            "oid": 1,
            "name": "WebCheckout"
          },
          "focusAllocation": null,
          "editingAllocations": null,
          "transientDocuments": null,
          "resetTimeout": false,
          "resetApproved": false
        },
        "status": "error",
        "notifications": null,
        "alert": null,
        "payload": {
          "message": "There is no applicable method for the generic function\n  #\nwhen called with arguments\n  (#\n   # NIL\n   #).\nSee also:\n  The ANSI Standard, Section 7.6.6",
          "class": "SB-PCL:NO-APPLICABLE-METHOD-ERROR"
        },
        "sessionToken": "eyJ0eXBlIjogInNlc3Npb24iLCAidmFsdWUiOiAiN2YxM2EyMTQtNDQxMi00MmZiLWEwOWQtMmFmMGUwOTU1YzVkIn0=",
        "sessionid": "7f13a214-4412-42fb-a09d-2af0e0955c5d"
      }

Providing the pin of the session agent will complete the operation.

POST /rest/resource/update HTTP/1.1

      {
        "headers": {
          "Authorization": "Bearer eyJ0eXBlIjogInNlc3Npb24iLCAidmFsdWUiOiAiN2YxM2EyMTQtNDQxMi00MmZiLWEwOWQtMmFmMGUwOTU1YzVkIn0="
        }
      }

HTTP 500

      {
        "apiVersion": "2.0",
        "uri": "/rest/resource/update",
        "session": {
          "id": "S-78443",
          "agent": {
            "_class": "person",
            "oid": 1393,
            "name": "Window",
            "avatar": null,
            "lastName": null,
            "otherName": "",
            "firstName": "Window",
            "userid": "windowworker"
          },
          "checkoutCenter": {
            "_class": "checkoutCenter",
            "oid": 1,
            "name": "WebCheckout",
            "organization": {
              "_class": "organization",
              "oid": 1,
              "name": "WebCheckout"
            },
            "description": null
          },
          "organization": {
            "_class": "organization",
            "oid": 1,
            "name": "WebCheckout"
          },
          "focusAllocation": null,
          "editingAllocations": null,
          "transientDocuments": null,
          "resetTimeout": false,
          "resetApproved": false
        },
        "status": "error",
        "notifications": null,
        "alert": null,
        "payload": {
          "message": "There is no applicable method for the generic function\n  #\nwhen called with arguments\n  (#\n   # NIL\n   #).\nSee also:\n  The ANSI Standard, Section 7.6.6",
          "class": "SB-PCL:NO-APPLICABLE-METHOD-ERROR"
        },
        "sessionToken": "eyJ0eXBlIjogInNlc3Npb24iLCAidmFsdWUiOiAiN2YxM2EyMTQtNDQxMi00MmZiLWEwOWQtMmFmMGUwOTU1YzVkIn0=",
        "sessionid": "7f13a214-4412-42fb-a09d-2af0e0955c5d"
      }

An incorrect identity pin results in the following.

POST /rest/resource/update HTTP/1.1

      {
        "headers": {
          "Authorization": "Bearer eyJ0eXBlIjogInNlc3Npb24iLCAidmFsdWUiOiAiN2YxM2EyMTQtNDQxMi00MmZiLWEwOWQtMmFmMGUwOTU1YzVkIn0="
        },
        "postBody": {
          "oid": 4262,
          "values": {
            "conditionNote": "Scratched"
          },
          "pin": "notMyPin"
        }
      }

HTTP 200

      {
        "apiVersion": "2.0",
        "uri": "/rest/resource/update",
        "session": {
          "id": "S-78443",
          "agent": {
            "_class": "person",
            "oid": 1393,
            "name": "Window",
            "avatar": null,
            "lastName": null,
            "otherName": "",
            "firstName": "Window",
            "userid": "windowworker"
          },
          "checkoutCenter": {
            "_class": "checkoutCenter",
            "oid": 1,
            "name": "WebCheckout",
            "organization": {
              "_class": "organization",
              "oid": 1,
              "name": "WebCheckout"
            },
            "description": null
          },
          "organization": {
            "_class": "organization",
            "oid": 1,
            "name": "WebCheckout"
          },
          "focusAllocation": null,
          "editingAllocations": null,
          "transientDocuments": null,
          "resetTimeout": false,
          "resetApproved": false
        },
        "status": "authorizationFailed",
        "notifications": null,
        "alert": null,
        "payload": "Invalid PIN",
        "sessionToken": "eyJ0eXBlIjogInNlc3Npb24iLCAidmFsdWUiOiAiN2YxM2EyMTQtNDQxMi00MmZiLWEwOWQtMmFmMGUwOTU1YzVkIn0=",
        "sessionid": "7f13a214-4412-42fb-a09d-2af0e0955c5d"
      }
System Authorizations

Following is a current list of all system authorizations

"ADD-CONDITION-NOTES"

Change condition notes

"ALTER-SYSTEM"

Alter system configuration

"BACKUP-DATABASE"

Backup database

"BYPASS-PIN"

Bypass PIN entry

"CAN-IMPORT"

Import data

"CHANGE-RESOURCE-LOCATION"

Change resource Checkout Center. Note: historically the term "location" was synonymous with "Checkout Center".

"CIRCULATE"

Perform checkouts and reservations

"EDIT-RESERVATIONS"

Modify existing reservations

"EMAIL-PATRONS"

Send email to patrons

"MANAGE-AUTHS"

Manage resource type authorizations

"MANAGE-BIBLIO"

Manage bibliographic records

"MANAGE-CATALOG"

Manage holdings

"MANAGE-DEPTS"

Manage departments

"MANAGE-EMPLOYEES"

Manage operators

"MANAGE-FINES"

Manage invoices and holds

"MANAGE-FREELANCERS"

Manage freelancers

"MANAGE-CHECKOUT-CENTERS"

Manage checkout centers and stations.

"MANAGE-ORGANIZATION"

Manage organization

"MANAGE-PEOPLE"

Manage people

"MANAGE-PERSONNEL-SCHEDULING"

Manage personnel scheduling

"MANAGE-PIR-ACCESS"

Manage Patron Portal access

"MANAGE-PIR-RESERVATIONS"

Manage Patron Portal reservations

"MANAGE-RESOURCES"

Manage resources

"MANAGE-ROLES"

Manage roles

"MANAGE-RTYPES"

Manage resource types

"MANAGE-TICKETS"

Manage tickets

"MIN-RESERVATION-LEAD-TIME"

Override the minimum reservation lead time (time after creating a reservation before it may be scheduled for pickup)

"ONLINE-OFFLINE"

Take resources on/off line

"OPERATOR"

View operation level information

"OVERRIDE-ALLOCATION-LOCK"

Override allocation locks; may edit an allocation that is currently being edited by another person.

"OVERRIDE-AUTHORIZATION"

Override authorization restrictions

"OVERRIDE-CHECKOUT-TO-SELF"

Override restriction on making checkouts or reservations to oneself

"OVERRIDE-FINE"

Override a patron's fine to allow checkouts

"OVERRIDE-FORBIDDEN-PICKUP-RETURN"

Override pickups or returns forbidden for a given day

"OVERRIDE-FREELANCER-UNFILLED-ROLES"

Override unfilled roles for events

"OVERRIDE-HOLD"

Override a patron's hold to allow checkouts

"OVERRIDE-INACTIVE-PATRON"

Override a patron's inactive status

"OVERRIDE-LATE-RESOURCES"

Override a patron's late returns to allow checkouts

"OVERRIDE-LOCATION-HOURS"

Operate outside of checkout center hours. Note: historically the term "location" was synonymous with "Checkout Center".

"OVERRIDE-MAX-CHECKOUT"

Override limit on length of checkout or reservation

"OVERRIDE-MAX-RENEWALS"

Override limit on number of renewals for a checkout

"OVERRIDE-MAX-RESOURCES"

Override limit on number of resources in a checkout or reservation

"OVERRIDE-MAX-SIMULTANEOUS-CIRCULATION-EVENTS"

Override the maximum simultaneous circulation events limit

"OVERRIDE-MAX-UNSERIALIZED-QTY"

Override quantity of unserialized resources

"OVERRIDE-OPEN-CLOSE-INTERVALS"

Override minimum intervals between open or closing times and pickup or return times

"OVERRIDE-PATRON-MAX-RESERVATIONS"

Override maximum simultaneous allocations per patron

"OVERRIDE-RESERVATION-ADVANCE"

Override limit on advance time for reservations

"OVERRIDE-RESERVE-PAST"

Create reservations that start in the past

"OVERRIDE-RESOURCE-TYPE-LIMIT-PER-PATRON"

Override resource type limit per patron

"OVERRIDE-RESTRICTED-ORG"

Override non-membership in restricted organizations

"OVERRIDE-TURNAROUND"

Override turnaround time when checking out recently returned resources

"OVERRIDE-USAGE-LIMITS"

Override usage limits for resources

"PERFORM-INVENTORY"

Perform inventory

"SCHEDULE-FREELANCERS"

Schedule freelancers