Testing notifications

CE API provides an endpoint that can be used by app developers so that they can test how the app behaves when a specific notification is triggered.

For the notification to be triggered the following conditions as described in the introduction on notifications section need to be met:

  1. Insight has been setup (during customer onboarding) to support the provided notification
  2. The eligible channels for this notification (specified again during customer onboarding) have been enabled for the end-user. Instructions in Setting up notifications
  3. Any of the topics related to this notification (specified during customer onboarding) is not muted. Can be tested via checking the channel status in Setting up notifications section
  4. In case of push notifications, the application to send push notifications has been properly setup in the Insight platform

Then the Test call to send notifications. can be used to trigger a notification of the provided code for the user for which the token in the authentication is relevant for:

POST /v2/notification/dispatch
Authorization: Bearer <access_token>

The body of the request can contain either the code of the notification only like in the example below:

{
    "code": "M039"
}

or the attributes relevant to the notification as well, like:

{
    "code": "NATP2.0",
    "attributes": [ 
        {
            "name": "appliance_type",
            "value": "washingMachine"
        }
    ]
}

🚧

The notifications that will be triggered will be dispatched in all eligible channels and devices if user consent has been given


What’s Next