# Notifications

1 of 3 supported
Source: https://plasapi.com/features/patron/notifications/

Let patrons know when a reservation is ready, a loan is due or a fee falls due, with events the library system sends to your backend.

## 2.9.1 Receive notifications — Supported

Tell the patron when something happens to their loans, reservations or fees.

### What you can build

Reminders before a loan is due and a message as soon as a reservation is ready to pick up, delivered as push notifications or in your own inbox. The library system decides when an event happens; your service decides how the patron sees it.

### Typical flow

1. Your backend registers a URL and a secret with `RegisterEventReceiver`.
2. The patron chooses the `vendor` delivery method for the notification types they want (2.11.4). The client sets it with `UpdatePatronNotificationSettings`.
3. When an event happens, the library system sends it to your URL, described by `ReceiverEvents` in the Vendor API.
4. Your backend answers `204` and turns the event into a notification for the patron.

### What the API provides

- Six notification types are also events: `reservation_ready_for_pickup`, `ready_reservation_expires_soon`, `reservation_expires_soon`, `reservation_reminder`, `loan_due_date_is_approaching` and `fee_due_date_is_approaching`.
- These six events are only sent when the patron has chosen `vendor` for that type and your backend has registered a receiver.
- Each vendor should have its own instance of the `vendor` delivery method per patron, and should only see and update its own.
- The `secret` must be at least 16 characters, should be randomly generated, and should be used by your backend to validate the provider. Registering an empty `url` removes the receiver.
- Each event has `type`, `eventId` and `data`. Besides the notification types, the receiver can get `consent_changed`, `patron_deleted`, `item_checkout` and `item_checkin`.

### Calls in the API

In this order

1. [POST /configuration/event/register/receiver](https://plasapi.com/provider/v0.6.7/configuration/#RegisterEventReceiver) — Register an event receiver
2. [PATCH /patron/{patronId}/notification-settings](https://plasapi.com/provider/v0.6.7/patron/#UpdatePatronNotificationSettings) — Update one or more patron notification settings
3. [POST /events/receiver](https://plasapi.com/vendor/v0.6.7/event/#ReceiverEvents) — Receives events from an LMS

## 2.9.2 View notifications — Not yet

Show the patron the notifications they have received.

> Not in PLAS yet. This feature is not supported today. The description shows what it does, so you can see how it fits with the rest.

## 2.9.3 Remove notification — Not yet

Let the patron remove a notification.

> Not in PLAS yet. This feature is not supported today. The description shows what it does, so you can see how it fits with the rest.
