Notification format
Decommission notice
Purpose
This page describes the data structure of sent notifications.
Webhook Classic - Request data
HTTPS method: POST
POST request body format
{ "title": "The title of the message", "body": "The body of the message", "contextData": {}}Request fields
The following table describes the fields that are used in a request body.
Primary fields | Description |
|---|---|
string | The title of the message. This field is received from the sending service and is sent unchanged. |
string | The body of the message. This field is received from the sending service and is sent unchanged. |
object | The object that contains additional data which is provided by a service that sent the notification. |
Examples
The message was sent by a Geofencing service to the Notifications API with the following payload.
{ "title": "Forbidden Area for Drone - 1bc87594-f3da-4031-8786-01a04d145665", "body": "'Drone' entered 'Forbidden Area' on 2021-01-20 at 14:23:21 (UTC).", "contextData": { "eventType": "TRANSITION", "alertId": "1bc87594-f3da-4031-8786-01a04d145665", "alertName": "Forbidden Area for Drone", "projectId": "7083d404-b6b2-4b7d-a876-e5f8aee6f842", "projectName": "Forbidden Areas for Drones", "fenceId": "aa7ace6b-cf04-40fa-8b8f-c98c37a27613", "fenceName": "Forbidden Area", "objectId": "5d631d54-793d-48f1-961f-17949ba6bf6d", "objectName": "Drone", "transitionType": "ENTER", "estimatedTransitionPositionLongitude": 18.2, "estimatedTransitionPositionLatitude": 51.9, "estimatedTransitionTime": "2021-01-20T14:23:21" }}The message will be sent to the receivers group without any changes in the data.
{ "title": "Forbidden Area for Drone - 1bc87594-f3da-4031-8786-01a04d145665", "body": "'Drone' entered 'Forbidden Area' on 2021-01-20 at 14:23:21 (UTC).", "contextData": { "eventType": "TRANSITION", "alertId": "1bc87594-f3da-4031-8786-01a04d145665", "alertName": "Forbidden Area for Drone", "projectId": "7083d404-b6b2-4b7d-a876-e5f8aee6f842", "projectName": "Forbidden Areas for Drones", "fenceId": "aa7ace6b-cf04-40fa-8b8f-c98c37a27613", "fenceName": "Forbidden Area", "objectId": "5d631d54-793d-48f1-961f-17949ba6bf6d", "objectName": "Drone", "transitionType": "ENTER", "estimatedTransitionPositionLongitude": 18.2, "estimatedTransitionPositionLatitude": 51.9, "estimatedTransitionTime": "2021-01-20T14:23:21" }}Webhook-Slack - Request data
HTTPS method: POST
POST request body format
{ "text": "*${TITLE}*\n${BODY}"}Request fields
The following table describes the fields that are used in a request body.
Primary fields | Description |
|---|---|
string | The message format sent to the Slack webhook. The |
Example
The message was sent by a Geofencing Service to the Notifications API with the following payload.
{ "title": "Forbidden Area for Drone - 1bc87594-f3da-4031-8786-01a04d145665", "body": "'Drone' entered 'Forbidden Area' on 2021-01-20 at 14:23:21 (UTC).", "contextData": { "eventType": "TRANSITION", "alertId": "1bc87594-f3da-4031-8786-01a04d145665", "alertName": "Forbidden Area for Drone", "projectId": "7083d404-b6b2-4b7d-a876-e5f8aee6f842", "projectName": "Forbidden Areas for Drones", "fenceId": "aa7ace6b-cf04-40fa-8b8f-c98c37a27613", "fenceName": "Forbidden Area", "objectId": "5d631d54-793d-48f1-961f-17949ba6bf6d", "objectName": "Drone", "transitionType": "ENTER", "estimatedTransitionPositionLongitude": 18.2, "estimatedTransitionPositionLatitude": 51.9, "estimatedTransitionTime": "2021-01-20T14:23:21" }}The received data will be formatted to the Slack pattern and sent to the receivers of the Slack group. The ${TITLE} will be replaced with the ‘Forbidden Area for Drone - 1bc87594-f3da-4031-8786-01a04d145665’ and ${BODY} with the ‘Drone’ entered ‘Forbidden Area’ on 2021-01-20 at 14:23:21 (UTC).
{ "text": "*Forbidden Area for Drone - 1bc87594-f3da-4031-8786-01a04d145665*\n'Drone' entered 'Forbidden Area' on 2021-01-20 at 14:23:21 (UTC)."}The preview of the message can be found at the Messages Builder .
Webhook-Teams - Request data
HTTPS method: POST
POST request body
{ "text": "${TITLE} ${BODY}"}Request fields
The following table describes the fields that are used in a request body.
Primary fields | Description |
|---|---|
string | The message format sent to the Slack webhook. The |
Example
The message was sent by a Geofencing Service to the Notifications API with the following payload.
{ "title": "Forbidden Area for Drone - 1bc87594-f3da-4031-8786-01a04d145665", "body": "'Drone' entered 'Forbidden Area' on 2021-01-20 at 14:23:21 (UTC).", "contextData": { "eventType": "TRANSITION", "alertId": "1bc87594-f3da-4031-8786-01a04d145665", "alertName": "Forbidden Area for Drone", "projectId": "7083d404-b6b2-4b7d-a876-e5f8aee6f842", "projectName": "Forbidden Areas for Drones", "fenceId": "aa7ace6b-cf04-40fa-8b8f-c98c37a27613", "fenceName": "Forbidden Area", "objectId": "5d631d54-793d-48f1-961f-17949ba6bf6d", "objectName": "Drone", "transitionType": "ENTER", "estimatedTransitionPositionLongitude": 18.2, "estimatedTransitionPositionLatitude": 51.9, "estimatedTransitionTime": "2021-01-20T14:23:21" }}The received data will be formatted to the Teams pattern and sent to the receivers of the Teams group. The ${TITLE} will be replaced with the ‘Forbidden Area for Drone - 1bc87594-f3da-4031-8786-01a04d145665’ and ${BODY} with the ‘Drone’ entered ‘Forbidden Area’ on 2021-01-20 at 14:23:21 (UTC).
{ "text": "Forbidden Area for Drone - 1bc87594-f3da-4031-8786-01a04d145665 'Drone' entered 'Forbidden Area' on 2021-01-20 at 14:23:21 (UTC)."}E-mail - Data format
E-mail format
Subject field in the e-mail.
${TITLE}
The body of the e-mail.
Hi!We noticed that ${BODY}Best Regards,> TomTom Notifications / svc_lns_notifications@tomtom.com / www.tomtom.comRequest fields
The following table describes the fields that are used in a request body.
Primary fields | Description |
|---|---|
string | The subject format sent in the e-mail body. The |
string | The body format sent in the e-mail body. The |
Example
Send a message from the Geofencing service to the Notifications API with the following payload
{ "title": "Forbidden Area for Drone - 1bc87594-f3da-4031-8786-01a04d145665", "body": "'Drone' entered 'Forbidden Area' on 2021-01-20 at 14:23:21 (UTC).", "contextData": { "eventType": "TRANSITION", "alertId": "1bc87594-f3da-4031-8786-01a04d145665", "alertName": "Forbidden Area for Drone", "projectId": "7083d404-b6b2-4b7d-a876-e5f8aee6f842", "projectName": "Forbidden Areas for Drones", "fenceId": "aa7ace6b-cf04-40fa-8b8f-c98c37a27613", "fenceName": "Forbidden Area", "objectId": "5d631d54-793d-48f1-961f-17949ba6bf6d", "objectName": "Drone", "transitionType": "ENTER", "estimatedTransitionPositionLongitude": 18.2, "estimatedTransitionPositionLatitude": 51.9, "estimatedTransitionTime": "2021-01-20T14:23:21" }}The received data will be formatted to the E-mail pattern and sent to the receivers of the E-mails group. The ${TITLE} will be replaced with the ‘Forbidden Area for ‘Drone’ - 1bc87594-f3da-4031-8786-01a04d145665’ and ${BODY} with the ‘Drone entered ‘Forbidden Area’ on 2021-01-20 at 14:23:21 (UTC)’.
Subject field in the e-mail
Forbidden Area for Drone - 1bc87594-f3da-4031-8786-01a04d145665The body of the e-mail
Hi!We noticed that 'Drone' entered 'Forbidden Area' on 2021-01-20 at 14:23:21 (UTC).Best Regards,> TomTom Notifications / svc_lns_notifications@tomtom.com / www.tomtom.com