# setupNotifications

Command (Notifications).

Configures notifications to be received

Chooses which events BeNav reports back. Notifications are the return channel of RNC: commands go
one way, and everything that happens inside BeNav (progress, arrivals, the driver stopping guidance,
an alert firing) comes back this way.

Most notifications are off until asked for, so a client application receives only what it
subscribes to rather than filtering a stream it did not want. Some carry their own settings, such as
how often progress may be reported.

**Worth knowing**

- The setting is not persisted across a restart of BeNav: subscribe once per session.
- A name BeNav does not recognise is rejected rather than ignored, so a typo is visible
  immediately instead of producing silence later.

The five guidance notifications below are **disabled** by default - use this command to enable them independently. [`onAppStatusChanged`](https://docs.benomad.com/benav-rnc/notifications/on-app-status-changed.md) is **enabled** by default and can be switched off with the same command. `onTraffic`, `onPoiClicked` and the CircuitNav notifications are always on and cannot be configured.

```json
{
  "id": "1",
  "jsonrpc": "2.0",
  "method": "setupNotifications",
  "params": {
    "notifications": [
      {
        "name": "onNavigationProgressChanged",
        "params": {
          "enabled": true,
          "minPeriod": 60,
          "waypointsInfo": true
        }
      },
      {
        "name": "onViaPointReached",
        "params": {
            "enabled": true
        }
      }
    ]
  }
}
```

- `notifications:` Array of notifications.

Accepted `name` values are exactly: [`onNavigationProgressChanged`](https://docs.benomad.com/benav-rnc/notifications/on-navigation-progress-changed.md), [`onViaPointReached`](https://docs.benomad.com/benav-rnc/notifications/on-via-point-reached.md), [`onDestinationReached`](https://docs.benomad.com/benav-rnc/notifications/on-destination-reached.md), [`onGuidanceStopped`](https://docs.benomad.com/benav-rnc/notifications/on-guidance-stopped.md), [`onVehicleProfileAlert`](https://docs.benomad.com/benav-rnc/notifications/on-vehicle-profile-alert.md), [`onVehicleStatusChanged`](https://docs.benomad.com/benav-rnc/notifications/on-vehicle-status-changed.md) and [`onAppStatusChanged`](https://docs.benomad.com/benav-rnc/notifications/on-app-status-changed.md). Any other name is rejected with `-32700 parse.error`.

> **Note:** *Each notification configuration is specified in its dedicated section below.*

## Response

```json
{
  "id": "1",
  "jsonrpc": "2.0",
  "result": {}
}
```
