Webhooks

Last updated 10 days ago

HyperTrack generates live location of your devices. These locations are sent as location change and status change events.

Location change

Here is the format of the data JSON that is sent for a location change event.

PROPERTY

TYPE

DESCRIPTION

location

GeoJSON

Location in GeoJSON format

speed (coming soon)

Float

Speed of horizontal motion, in meters/sec

bearing (coming soon)

Float

Horizontal direction, represented as degrees east of north

altitude (coming soon)

Float

Altitude of device, in meters

Sample event

{
"id": "5e07df7e-cf01-4571-b516-e76e366efb90",
"device_id": "17e2a12d-d8de-43d1-9566-849135fdb577",
"type": "location.change",
"recorded_at": "2018-07-20T04:09:33.945000+00:00",
"data": {
"location": {
"coordinates": [
77.6342144,
12.929061
],
"type": "point"
},
"speed": 30.5732,
"bearing": 92.2334,
"altitude":182.9882
}
}

Status change

This product feature is still under development and is not available in production. Please reach out to us on Slack if you want an early access.

HyperTrack combines the live location, activity and health of your devices, and sends them as status change events. Here is the format of the data JSON that is sent for a status change event.

PROPERTY

TYPE

DESCRIPTION

activity

string

Current activity. Could be: stop, walk, run, cycle, driveor no_data if the current activity is unknown

location

GeoJSON

Location in GeoJSON format

no_data_reason

string

Reason why the current activity or location is unknown. Could be one of the following:

  1. tracking_paused

  2. sdk_killed

  3. gps_lost

  4. location_disabled

  5. location_permission_denied

  6. activity_permission_denied

  7. airplane_mode_on

  8. device_switched_off

Sample event

//When there is data
{
"id": "5e07df7e-cf01-4571-b516-e76e366efb90",
"device_id": "17e2a12d-d8de-43d1-9566-849135fdb577",
"type": "status.change",
"recorded_at": "2018-07-20T04:09:33.945000+00:00",
"data": {
"activity": "walk",
"location": {
"coordinates": [
77.6342144,
12.929061
],
"type": "point"
},
"no_data_reason":""
}
}
//When there is no data
{
"id": "5e07df7e-cf01-4571-b516-e76e366efb90",
"device_id": "17e2a12d-d8de-43d1-9566-849135fdb577",
"type": "status.change",
"recorded_at": "2018-07-20T04:09:33.945000+00:00",
"data": {
"activity": "no_data",
"no_data_reason":"location_disabled"
}
}