Vendor API v0.6.5
The other direction. Where the Provider API is what the library system exposes, this is what the library product exposes back.
3 groups · 3 operations · 3 paths · 152 schemas
Generated fromvendor_v0_6_5.yaml · OpenAPI 3.0.0 - Implemented by
- The library product — the vendor's own service
- Called by
- The library system, when something has happened or needs completing
The other three APIs describe what you can GET from the library system. This one describes what the system can SEND to you — which is why you implement it rather than call it.
Two things use it. The library system sends events when something has happened, so your product does not have to keep asking; and it calls a callback when a patron has signed in at the library and needs to be returned to your product as authenticated.
How to integrate
- Expose the endpoint.
POST /events/receiverhas to accept and answer. The address is yours; it is agreed with the provider, exactly as the Provider API’s base URL is agreed the other way round. - Verify the sender. The call carries a shared secret in the
X-OLA-SECRETheader (EventReceiverSecretAuthin the specification). If it does not match, answer401— it is the only thing separating the library system from anyone else who can reach your address. - Accept the version.
versionis sent as a query parameter on two of the three operations. If you do not support it, answer with error code600— the same contract as the other direction, with you as the recipient.
How it relates to the other APIs
The Vendor Consumer API is an entry point alongside the Provider API, not a
subset of it: only GET /version exists in both. The two are the directions of
the same collaboration, and a product that both reads and receives implements
this one and calls Provider.
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
EventReceiverSecretAuth · apiKey
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.
Error responses
-
HttpCode400The list of errors. -
HttpCode401SecretSecret is invalid.