Notification format
Purpose
This page describes the data structure of sent notifications.
Webhook Classic - Request data
HTTPS method: POST
POST request body format
1{2 "title": "The title of the message",3 "body": "The body of the message",4 "contextData": {}5}
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.
1{2 "title": "Forbidden Area for Drone - 1bc87594-f3da-4031-8786-01a04d145665",3 "body": "'Drone' entered 'Forbidden Area' on 2021-01-20 at 14:23:21 (UTC).",4 "contextData": {5 "eventType": "TRANSITION",6 "alertId": "1bc87594-f3da-4031-8786-01a04d145665",7 "alertName": "Forbidden Area for Drone",8 "projectId": "7083d404-b6b2-4b7d-a876-e5f8aee6f842",9 "projectName": "Forbidden Areas for Drones",10 "fenceId": "aa7ace6b-cf04-40fa-8b8f-c98c37a27613",11 "fenceName": "Forbidden Area",12 "objectId": "5d631d54-793d-48f1-961f-17949ba6bf6d",13 "objectName": "Drone",14 "transitionType": "ENTER",15 "estimatedTransitionPositionLongitude": 18.2,16 "estimatedTransitionPositionLatitude": 51.9,17 "estimatedTransitionTime": "2021-01-20T14:23:21"18 }19}
The message will be sent to the receivers group without any changes in the data.
1{2 "title": "Forbidden Area for Drone - 1bc87594-f3da-4031-8786-01a04d145665",3 "body": "'Drone' entered 'Forbidden Area' on 2021-01-20 at 14:23:21 (UTC).",4 "contextData": {5 "eventType": "TRANSITION",6 "alertId": "1bc87594-f3da-4031-8786-01a04d145665",7 "alertName": "Forbidden Area for Drone",8 "projectId": "7083d404-b6b2-4b7d-a876-e5f8aee6f842",9 "projectName": "Forbidden Areas for Drones",10 "fenceId": "aa7ace6b-cf04-40fa-8b8f-c98c37a27613",11 "fenceName": "Forbidden Area",12 "objectId": "5d631d54-793d-48f1-961f-17949ba6bf6d",13 "objectName": "Drone",14 "transitionType": "ENTER",15 "estimatedTransitionPositionLongitude": 18.2,16 "estimatedTransitionPositionLatitude": 51.9,17 "estimatedTransitionTime": "2021-01-20T14:23:21"18 }19}
Webhook-Slack - Request data
HTTPS method: POST
POST
request body format
1{2 "text": "*${TITLE}*\n${BODY}"3}
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.
1{2 "title": "Forbidden Area for Drone - 1bc87594-f3da-4031-8786-01a04d145665",3 "body": "'Drone' entered 'Forbidden Area' on 2021-01-20 at 14:23:21 (UTC).",4 "contextData": {5 "eventType": "TRANSITION",6 "alertId": "1bc87594-f3da-4031-8786-01a04d145665",7 "alertName": "Forbidden Area for Drone",8 "projectId": "7083d404-b6b2-4b7d-a876-e5f8aee6f842",9 "projectName": "Forbidden Areas for Drones",10 "fenceId": "aa7ace6b-cf04-40fa-8b8f-c98c37a27613",11 "fenceName": "Forbidden Area",12 "objectId": "5d631d54-793d-48f1-961f-17949ba6bf6d",13 "objectName": "Drone",14 "transitionType": "ENTER",15 "estimatedTransitionPositionLongitude": 18.2,16 "estimatedTransitionPositionLatitude": 51.9,17 "estimatedTransitionTime": "2021-01-20T14:23:21"18 }19}
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).
1{2 "text": "*Forbidden Area for Drone - 1bc87594-f3da-4031-8786-01a04d145665*\n'Drone' entered 'Forbidden Area' on 2021-01-20 at 14:23:21 (UTC)."3}
The preview of the message can be found at the Messages Builder.
Webhook-Teams - Request data
HTTPS method: POST
POST request body
1{2 "text": "${TITLE}3 ${BODY}"4}
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.
1{2 "title": "Forbidden Area for Drone - 1bc87594-f3da-4031-8786-01a04d145665",3 "body": "'Drone' entered 'Forbidden Area' on 2021-01-20 at 14:23:21 (UTC).",4 "contextData": {5 "eventType": "TRANSITION",6 "alertId": "1bc87594-f3da-4031-8786-01a04d145665",7 "alertName": "Forbidden Area for Drone",8 "projectId": "7083d404-b6b2-4b7d-a876-e5f8aee6f842",9 "projectName": "Forbidden Areas for Drones",10 "fenceId": "aa7ace6b-cf04-40fa-8b8f-c98c37a27613",11 "fenceName": "Forbidden Area",12 "objectId": "5d631d54-793d-48f1-961f-17949ba6bf6d",13 "objectName": "Drone",14 "transitionType": "ENTER",15 "estimatedTransitionPositionLongitude": 18.2,16 "estimatedTransitionPositionLatitude": 51.9,17 "estimatedTransitionTime": "2021-01-20T14:23:21"18 }19}
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).
1{2 "text": "Forbidden Area for Drone - 1bc87594-f3da-4031-8786-01a04d1456653 'Drone' entered 'Forbidden Area' on 2021-01-20 at 14:23:21 (UTC)."4}
E-mail - Data format
E-mail format
Subject field in the e-mail.
${TITLE}
The body of the e-mail.
1Hi!2We noticed that ${BODY}3Best Regards,4> TomTom Notifications / svc_lns_notifications@tomtom.com / www.tomtom.com
Request 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
1{2 "title": "Forbidden Area for Drone - 1bc87594-f3da-4031-8786-01a04d145665",3 "body": "'Drone' entered 'Forbidden Area' on 2021-01-20 at 14:23:21 (UTC).",4 "contextData": {5 "eventType": "TRANSITION",6 "alertId": "1bc87594-f3da-4031-8786-01a04d145665",7 "alertName": "Forbidden Area for Drone",8 "projectId": "7083d404-b6b2-4b7d-a876-e5f8aee6f842",9 "projectName": "Forbidden Areas for Drones",10 "fenceId": "aa7ace6b-cf04-40fa-8b8f-c98c37a27613",11 "fenceName": "Forbidden Area",12 "objectId": "5d631d54-793d-48f1-961f-17949ba6bf6d",13 "objectName": "Drone",14 "transitionType": "ENTER",15 "estimatedTransitionPositionLongitude": 18.2,16 "estimatedTransitionPositionLatitude": 51.9,17 "estimatedTransitionTime": "2021-01-20T14:23:21"18 }19}
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-01a04d145665
The body of the e-mail
1Hi!2We noticed that 'Drone' entered 'Forbidden Area' on 2021-01-20 at 14:23:21 (UTC).3Best Regards,4> TomTom Notifications / svc_lns_notifications@tomtom.com / www.tomtom.com