Provider API v0.6.5
The interface a library system exposes so that library products can read and write patrons, loans, reservations and holdings.
22 groups · 54 operations · 43 paths · 379 schemas
Generated fromprovider_v0_6_5.yaml · OpenAPI 3.0.0 - Implemented by
- The library system — Bibliofil, Cicero, Koha or another
- Called by
- Library products — apps, self-service kiosks, websites
- Profiles of Provider API
- Search API · Content API
The Provider API is the main surface of PLAS. Once a library system implements it, any product that speaks PLAS can work with that library without knowing the system underneath — and a product built against one library works at the next.
It covers what a library does every day: the patron and her consents, loans and
renewals, reservations, fees and payment, holdings and locations, checkout and
checkin, search across works and publications, and the events the library
publishes. Each part has its own group in the menu.
How to integrate
Three things have to be in place, listed in the order you meet them:
- The base URL. The specification has no
serversblock, so the address belongs to the provider and is agreed with them. Do not assume it is the same from library to library, even with the same provider. - A token.
POST /authentication/oauth2/tokenwithclient_id,client_secretandgrant_type=client_credentialsreturns aBearertoken, which every other call carries. - The version. Send
versionas a query parameter on each call. If the provider does not support it you get error code600— an error you can act on, rather than a response that merely looks right.
The one call that needs neither a token nor an agreement is GET /version.
Start there: if it answers, the base URL is right. The whole path, with
examples, is in Get started.
How it relates to the other APIs
The Search API and the Content API are profiles of this surface: every one
of their operations is here too, with the same operationId, method and path.
They exist so a system can implement one area on its own — search, or events —
without implementing the whole Provider API. If you implement Provider, you
already have both.
The Vendor Consumer API is the opposite direction: the surface your own product exposes, so the library system can send something to you.
Shared across operations
These definitions are referenced by many operations. They are documented once here; an operation lists only what is specific to it, plus the codes it can return.
Authentication
BearerAuth · oauth2 · Flow: clientCredentials · Token URL: /authentication/oauth2/token
Parameters
-
versionThe version of Open Library the vendor expects to receive, if this version isn't supported by the provider an error code 600 (Unsupported Open Library API version) is returned. -
ui_languageThe UI language the provider will return the content in. All ui language codes should be on this list https://www.loc.gov/marc/languages/
Error responses
-
HttpCode400The list of errors. -
HttpCode401BearerBearer token invalid, missing, or expired. -
HttpCode404Resource not found. -
HttpCode401UnauthorizedOAuthLoginUnauthorized login.