silentPushNotification Webhook

A silent push notification webhook is used to notify Publishers to dispatch a silent push notification to the user’s device, if there's been no heartbeat update for a configurable time interval. The following cases can be handled using silent push notifications:

  • To gather heartbeat information when the user is not taking any trips, and the application is in killed or suspended mode.

  • To gather heartbeat data when the user has changed critical permissions that are required to relaunch the application and collect heartbeat, for example, location permission or location service.

The Sequence of Events Before Heartbeat Is Recorded

The following diagram illustrates the sequence of events before heartbeat is recorded:

Silent Push Notification Webhook

The silent push notification webhook is an opt-in program where the publisher can configure the webhook endpoint and the time interval for sending a silent push notification if we don’t receive a heartbeat in the specified time interval.

The Webhook URL must be an HTTPS URL. Notifications are sent as a POST request to the Webhook URL with a data block containing a JSON string.

Zendrive will send the same API Key which is used in all the IQL API endpoints for authorization. Application publishers can use this API Key to verify that the webhook is coming from Zendrive.

POST URL: Publishers to set up after setting up at their end.

Headers

Name
Type
Description

Authorization*

APIKEY<apikey>

Content_Type*

String

application/json

Request Body

Name
Type
Description

info.publisher_app_name*

String

The unique publisher application Id

info.driver_id*

String

The unique identifier of the user.

time*

String

The timestamp of the last received heartbeat.

Sample Request Body

{
  "info": {
    "publisher_app_name": "zendrive_dogfood",
    "driver_id": "[email protected]"
  },
  "time": "2022-10-10 11:54:53.545"
}