# Provider API v0.6.5

22 groups · 54 operations · 43 paths · 379 schemas
Source: https://plas.redia.dk/en/provider/v0.6.5/

The interface a library system exposes so that library products can read and write patrons, loans, reservations and holdings.

Generated from `provider_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](https://plas.redia.dk/en/search/v0.6.5/) · [Content API](https://plas.redia.dk/en/content/v0.6.5/)

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:

1. **The base URL.** The specification has no `servers` block, 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.
2. **A token.** `POST /authentication/oauth2/token` with `client_id`,
   `client_secret` and `grant_type=client_credentials` returns a `Bearer` token,
   which every other call carries.
3. **The version.** Send `version` as a query parameter on each call. If the
   provider does not support it you get error code `600` — 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](/en/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

- `version` (In `query`, [`Version`](https://plas.redia.dk/en/provider/v0.6.5/schemas/#Version), optional, used by 51 of 54) — The 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_language` (In `query`, `string`, optional, used by 8 of 54) — The 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

- `HttpCode400` ([`Errors`](https://plas.redia.dk/en/provider/v0.6.5/schemas/#Errors), used by 53 of 54) — The list of errors.
- `HttpCode401Bearer` (`No response body.`, used by 51 of 54) — Bearer token invalid, missing, or expired.
- `HttpCode404` (`No response body.`, used by 37 of 54) — Resource not found.
- `HttpCode401UnauthorizedOAuthLogin` (`No response body.`, used by 1 of 54) — Unauthorized login.

## All groups

- [Version](https://plas.redia.dk/en/provider/v0.6.5/version/) — 1 operation
- [Authentication](https://plas.redia.dk/en/provider/v0.6.5/authentication/) — 2 operations
- [Configuration](https://plas.redia.dk/en/provider/v0.6.5/configuration/) — 4 operations
- [Patron Authentication](https://plas.redia.dk/en/provider/v0.6.5/patron-authentication/) — 4 operations
- [Patron Registration](https://plas.redia.dk/en/provider/v0.6.5/patron-registration/) — 3 operations
- [Patron Configuration](https://plas.redia.dk/en/provider/v0.6.5/patron-configuration/) — 1 operation
- [Patron](https://plas.redia.dk/en/provider/v0.6.5/patron/) — 6 operations
- [Patron Reservation](https://plas.redia.dk/en/provider/v0.6.5/patron-reservation/) — 4 operations
- [Patron Loan](https://plas.redia.dk/en/provider/v0.6.5/patron-loan/) — 2 operations
- [Patron Fee](https://plas.redia.dk/en/provider/v0.6.5/patron-fee/) — 1 operation
- [Payment](https://plas.redia.dk/en/provider/v0.6.5/payment/) — 2 operations
- [Patron Loan History](https://plas.redia.dk/en/provider/v0.6.5/patron-loan-history/) — 3 operations
- [Patron List](https://plas.redia.dk/en/provider/v0.6.5/patron-list/) — 8 operations
- [Patron Delete](https://plas.redia.dk/en/provider/v0.6.5/patron-delete/) — 1 operation
- [Checkout & Checkin](https://plas.redia.dk/en/provider/v0.6.5/checkout-and-checkin/) — 2 operations
- [Location](https://plas.redia.dk/en/provider/v0.6.5/location/) — 1 operation
- [Holding](https://plas.redia.dk/en/provider/v0.6.5/holding/) — 1 operation
- [Work](https://plas.redia.dk/en/provider/v0.6.5/work/) — 2 operations
- [Publication](https://plas.redia.dk/en/provider/v0.6.5/publication/) — 1 operation
- [Suggestion](https://plas.redia.dk/en/provider/v0.6.5/suggestion/) — 1 operation
- [Agent](https://plas.redia.dk/en/provider/v0.6.5/agent/) — 2 operations
- [Content Event](https://plas.redia.dk/en/provider/v0.6.5/content-event/) — 2 operations
- [Schema index](https://plas.redia.dk/en/provider/v0.6.5/schemas/) — 379 schemas
