.. _notification.notification:

Notifications
=============

The example of a notification follows:

.. code-block:: json

    {
        "data": {
            "estimate_open": false,
            "type": "co2_open",
        },
        "device_id": "0xa900811026800001",
        "event": "env-notification-pre",
        "gateway_id": "1816820318180747",
        "raise": false,
        "raise_catch": true,
        "readable": "2019-02-20 03:00:00",
        "timestamp": 1550628000
    }

* **data** - the key ``type`` is mandatory, other keys (key ``estimate_open`` in this case) are optional according to a value of the key ``type``,

  * **type** - a notification type,

* **device_id** - a unique identification of a device,
* **event** - a name of an end point to which a notification is sent,
* **gateway_id** - a unique identification of a gateway,
* **raise** - if a notification contains valid data,
* **raise_catch** - if an exception was thrown during the processing,
* **readable** - date and time when a notification was created,
* **timestamp** - timestamp when a notification was created.
