Sorry, you need to enable JavaScript to visit this website.

Notification format

 

Service version: 1
Last edit: 2021.02.02

On this page

Purpose

This page describes the data structure of sent notifications.

Webhook Classic

Request data

HTTP(S) method: POST

POST request body (JSON)

{
  "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
Field Description
title
string
The title of the message.
This field is received from the sending service and is sent unchanged.
body
string
The body of the message.
This field is received from the sending service and is sent unchanged.
contextData
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.20,
        "estimatedTransitionPositionLatitude": 51.90,
        "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.20,
        "estimatedTransitionPositionLatitude": 51.90,
        "estimatedTransitionTime": "2021-01-20T14:23:21"
    }
}

Webhook-Slack

Request data

HTTPS method: POST

POST request body (JSON)

{
    "text": "*${TITLE}*\n${BODY}"
}

Request fields

The following table describes the fields that are used in a request body.

Primary fields
Field Description
text
string
The message format sent to the Slack webhook.
The ${TITLE} placeholder will be replaced with the title and ${BODY} with the message from the classic webhook.

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.20,
        "estimatedTransitionPositionLatitude": 51.90,
        "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 HERE

Webhook-Teams

Request data

HTTPS method: POST

POST request body (JSON)

{
    "text": "<b>${TITLE}</b></br>${BODY}"
}

Request fields

The following table describes the fields that are used in a request body.

Primary fields
Field Description
text
string
The message format sent to the Slack webhook.
The ${TITLE} placeholder will be replaced with the title and ${BODY} with the message from the classic webhook.

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.20,
        "estimatedTransitionPositionLatitude": 51.90,
        "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": "<b>Forbidden Area for Drone - 1bc87594-f3da-4031-8786-01a04d145665</b></br>'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.com

Request fields

The following table describes the fields that are used in a request body.

Primary fields
Field Description
${TITLE}
string
The subject format sent in the e-mail body.
The ${TITLE} placeholder will be replaced with the title from the classic webhook.
${BODY}
string
The body format sent in the e-mail body.
The ${BODY} placeholder will be replaced with the body from the classic webhook.

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.20,
        "estimatedTransitionPositionLatitude": 51.90,
        "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-01a04d145665

The 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

▲ Return to top