Back to top

Trackimo API V2

An API for the Trackimo service.

Device API

Use this API when working with a single Trackimo device since it provides simple and fast access to most of the available APIs (such as location, settings, etc.) with a minimum of HTTP requests.

Device Collection

Return a list of all devices associated with the account

List all devices
GET/devices{?limit,page}

Example URI

GET https://app.trackimo.com/v2/devices?limit=&page=
URI Parameters
HideShow
limit
number (optional) Default: 20 

Maximum number of locations to retrieve

page
number (optional) Default: 1 

Specify page number (1-based) for paginated content (pagination information provided in the Link header)

Request
HideShow
Headers
Authorization: Bearer <oauth_access_token>
Response  200
HideShow
Headers
Content-Type: application/json
Link: <pagination-information>
Body
[
  {
    "deviceName": "Bobby",
    "deviceId": 1019489
  },
  {
    "deviceName": "Truck",
    "deviceId": 1019495
  },
  {
    "deviceName": "Grandpa",
    "deviceId": 1019448
  }
]
Response  401
HideShow
Headers
Content-Type: application/json
Response  400
HideShow
Headers
Content-Type: application/json

Device Details

View details of a single device
GET/devices/{device_id}

Example URI

GET https://app.trackimo.com/v2/devices/device_id
URI Parameters
HideShow
device_id
int (required) Example: 1019243

ID of the Device

Request
HideShow
Headers
Authorization: Bearer <oauth_access_token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 1019448,
  "name": "Grandpa",
  "imsi": "999888777666555",
  "msisdn": "0",
  "type": "universal",
  "user_id": 3324
}
Response  401
HideShow
Headers
Content-Type: application/json
Response  404
HideShow
Headers
Content-Type: application/json

Device Location

View last device location
GET/devices/{device_id}/location

Example URI

GET https://app.trackimo.com/v2/devices/device_id/location
URI Parameters
HideShow
device_id
int (required) Example: 1019243

ID of the Device

Request
HideShow
Headers
Authorization: Bearer <oauth_access_token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "location_id": 166726,
  "time": 1424076492,
  "age": 2519423,
  "lat": 32.070377,
  "lng": 34.795498,
  "speed": 5,
  "speed_unit": "kmh",
  "battery": 100,
  "type": "gps",
  "is_triangulated": false
}
Response  401
HideShow
Headers
Content-Type: application/json
Response  404
HideShow
Headers
Content-Type: application/json

Device Name

Get name
GET/devices/{device_id}/name

Example URI

GET https://app.trackimo.com/v2/devices/device_id/name
URI Parameters
HideShow
device_id
int (required) Example: 1019243

ID of the Device

Request
HideShow
Headers
Authorization: Bearer <oauth_access_token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Bobby"
}
Response  401
HideShow
Headers
Content-Type: application/json
Response  404
HideShow
Headers
Content-Type: application/json

Update name
PUT/devices/{device_id}/name

Example URI

PUT https://app.trackimo.com/v2/devices/device_id/name
URI Parameters
HideShow
device_id
int (required) Example: 1019243

ID of the Device

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <oauth_access_token>
Body
{
  "name": "Uncle Tom Tracker"
}
Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    }
  },
  "required": [
    "name"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Response  400
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: application/json
Response  404
HideShow
Headers
Content-Type: application/json

Device History

View device location history
GET/devices/{device_id}/history{?from,to,limit,page}

Example URI

GET https://app.trackimo.com/v2/devices/device_id/history?from=1426681920&to=1426681920&limit=&page=
URI Parameters
HideShow
device_id
int (required) Example: 1019243

ID of the Device

from
number (optional) Default: Current date minus 24 hours Example: 1426681920

Bottom limit of history range in the form of a unix timestamp

to
number (optional) Default: Current date Example: 1426681920

Top limit of history range in the form of a unix timestamp

limit
number (optional) Default: 20 

Maximum number of locations to retrieve

page
number (optional) Default: 1 

Specify page number (1-based) for paginated content (pagination information provided in the Link header)

Request
HideShow
Headers
Authorization: Bearer <oauth_access_token>
Response  200
HideShow
Headers
Content-Type: application/json
Link: <pagination-information>
Body
[
  {
    "time": 1426094743,
    "lat": 32.074824818948,
    "lng": 34.783038782062,
    "speed": 0,
    "battery": 66,
    "type": "gps",
    "is_triangulated": false
  },
  {
    "time": 1426095038,
    "lat": 32.075490006863,
    "lng": 34.783832715978,
    "speed": 1,
    "battery": 66,
    "type": "gps",
    "is_triangulated": false
  },
  {
    "time": 1426095218,
    "lat": 32.076069364079,
    "lng": 34.785313295443,
    "speed": 4,
    "battery": 66,
    "type": "gps",
    "is_triangulated": false
  },
  {
    "time": 1426095338,
    "lat": 32.077249536186,
    "lng": 34.785163091729,
    "speed": 2,
    "battery": 66,
    "type": "gps",
    "is_triangulated": false
  },
  {
    "time": 1426095518,
    "lat": 32.077549943632,
    "lng": 34.788553404126,
    "speed": 4,
    "battery": 66,
    "type": "gps",
    "is_triangulated": false
  }
]
Response  400
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: application/json
Response  404
HideShow
Headers
Content-Type: application/json

Device Settings

Current settings
GET/devices/{device_id}/settings

Returns a settings objects with all the available settings properties

Example URI

GET https://app.trackimo.com/v2/devices/device_id/settings
URI Parameters
HideShow
device_id
int (required) Example: 1019243

ID of the Device

Request
HideShow
Headers
Authorization: Bearer <oauth_access_token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "tracking_mode": {
    "sample_rate": 300,
    "samples_per_report": 1
  },
  "speed_limit": true,
  "speed_limit_value": 16,
  "low_battery": true,
  "moving_start": true,
  "right_key": true,
  "right_key_message": "Right key pressed",
  "left_key": true,
  "left_key_message": "Left key pressed",
  "sos_key": true
}
Response  401
HideShow
Headers
Content-Type: application/json
Response  404
HideShow
Headers
Content-Type: application/json

Update settings
PUT/devices/{device_id}/settings

This allows updating of multiple settings properties with one API call.

Example URI

PUT https://app.trackimo.com/v2/devices/device_id/settings
URI Parameters
HideShow
device_id
int (required) Example: 1019243

ID of the Device

Request
HideShow

All the properties are optional so only send the properties you would like to update.

Headers
Content-Type: application/json
Authorization: Bearer <oauth_access_token>
Body
{
  "speed_limit": {
    "enable": true,
    "value": 60,
    "unit": "kmh"
  },
  "tracking_mode": {
    "sample_rate": 60,
    "samples_per_report": 1
  },
  "low_battery": true,
  "moving_start": true,
  "sos_key": true
}
Schema
{
  "type": "object",
  "properties": {
    "tracking_mode": {
      "type": "object",
      "properties": {
        "sample_rate": {
          "type": "integer",
          "description": "The rate (in seconds) at which the device will sample its location"
        },
        "samples_per_report": {
          "type": "integer",
          "description": "The number of samples the device will collect before submitting a location report"
        }
      }
    },
    "speed_limit": {
      "type": "object",
      "properties": {
        "enable": {
          "type": "boolean"
        },
        "value": {
          "type": "integer"
        },
        "unit": {
          "type": "string"
        }
      },
      "required": [
        "enable",
        "value",
        "unit"
      ]
    },
    "speed_limit_value": {
      "type": "integer"
    },
    "low_battery": {
      "type": "boolean"
    },
    "moving_start": {
      "type": "boolean"
    },
    "right_key": {
      "type": "boolean"
    },
    "right_key_message": {
      "type": "string",
      "description": "Pass null for default message"
    },
    "left_key": {
      "type": "boolean"
    },
    "left_key_message": {
      "type": "string",
      "description": "Pass null for default message"
    },
    "sos_key": {
      "type": "boolean"
    }
  }
}
Response  200
HideShow

The body of the response will mirror back the settings that have been updated

Headers
Content-Type: application/json
Body
{
  "tracking_mode": {
    "sample_rate": 60,
    "samples_per_report": 1
  },
  "low_battery": true,
  "moving_start": true,
  "sos_key": true
}
Response  400
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: application/json
Response  404
HideShow
Headers
Content-Type: application/json

Device Geofences

List geofences
GET/devices/{device_id}/geofences{?limit,page}

Returns a list of all the geofences associated with the specificed device

Example URI

GET https://app.trackimo.com/v2/devices/device_id/geofences?limit=&page=
URI Parameters
HideShow
device_id
int (required) Example: 1019243

ID of the Device

limit
number (optional) Default: 20 

Maximum number of geofences to retrieve

page
number (optional) Default: 1 

Specify page number (1-based) for paginated content (pagination information provided in the Link header)

Request
HideShow
Headers
Authorization: Bearer <oauth_access_token>
Response  200
HideShow
Headers
Content-Type: application/json
Link: <pagination-information>
Body
[
  {
    "id": 5342341,
    "name": "Home",
    "type": "polygon",
    "vertices": [
      {
        "lat": 48.860667,
        "lng": 2.339473
      },
      {
        "lat": 48.860102,
        "lng": 2.339473
      },
      {
        "lat": 48.860102,
        "lng": 2.337622
      },
      {
        "lat": 48.860667,
        "lng": 2.337622
      }
    ],
    "trigger": "OUTSIDE_TO_INSIDE"
  },
  {
    "id": 5342342,
    "name": "Dog Park",
    "type": "circle",
    "center": {
      "lat": 37.864974,
      "lng": -119.53842
    },
    "radius": 500,
    "trigger": "INSIDE_TO_OUTSIDE"
  },
  {
    "id": 5342343,
    "name": "Playground",
    "type": "polygon",
    "vertices": [
      {
        "lat": 33.814249,
        "lng": -117.915814
      },
      {
        "lat": 33.810041,
        "lng": -117.915814
      },
      {
        "lat": 33.810041,
        "lng": -117.923083
      },
      {
        "lat": 33.814249,
        "lng": -117.923083
      }
    ],
    "trigger": "BOTH"
  }
]
Response  400
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: application/json
Response  404
HideShow
Headers
Content-Type: application/json

Create geofences
POST/devices/{device_id}/geofences{?limit,page}

Creates new geofences for the selected device

Example URI

POST https://app.trackimo.com/v2/devices/device_id/geofences?limit=&page=
URI Parameters
HideShow
device_id
int (required) Example: 1019243

ID of the Device

limit
number (optional) Default: 20 

Maximum number of geofences to retrieve

page
number (optional) Default: 1 

Specify page number (1-based) for paginated content (pagination information provided in the Link header)

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <oauth_access_token>
Body
[
  {
    "name": "Office",
    "type": "polygon",
    "vertices": [
      {
        "lat": 33.814249,
        "lng": -117.915814
      },
      {
        "lat": 33.810041,
        "lng": -117.915814
      },
      {
        "lat": 33.810041,
        "lng": -117.923083
      },
      {
        "lat": 33.814249,
        "lng": -117.923083
      }
    ],
    "trigger": "INSIDE_TO_OUTSIDE"
  },
  {
    "name": "Dog Park",
    "type": "circle",
    "center": {
      "lat": 37.864974,
      "lng": -119.53842
    },
    "radius": 500,
    "trigger": "INSIDE_TO_OUTSIDE"
  }
]
Schema
{
  "type": "array",
  "items": [
    {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "description": "Can be either 'polygon' or 'circle'"
        },
        "vertices": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "properties": {
                "lat": {
                  "type": "number"
                },
                "lng": {
                  "type": "number"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "lat": {
                  "type": "number"
                },
                "lng": {
                  "type": "number"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "lat": {
                  "type": "number"
                },
                "lng": {
                  "type": "number"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "lat": {
                  "type": "number"
                },
                "lng": {
                  "type": "number"
                }
              }
            }
          ],
          "description": "Required if type is 'polygon'"
        },
        "center": {
          "type": "object",
          "properties": {
            "lat": {
              "type": "number"
            },
            "lng": {
              "type": "number"
            }
          },
          "description": "Required if type is 'circle'"
        },
        "radius": {
          "type": "integer",
          "description": "In meters (m). Required if type is 'circle'"
        },
        "trigger": {
          "type": "string",
          "description": "Available triggers are OUTSIDE_TO_INSIDE, INSIDE_TO_OUTSIDE, and BOTH_WAYS"
        }
      },
      "required": [
        "name",
        "type",
        "trigger"
      ]
    }
  ]
}
Response  201
HideShow

IDs array of the newly created geofence(s)

Headers
Content-Type: application/json
Body
[
  5342349
]
Response  400
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: application/json
Response  404
HideShow
Headers
Content-Type: application/json

Update geofences
PUT/devices/{device_id}/geofences{?limit,page}

Updates an existing geofence. The only required field is the “id”. Only send the properties you would like to update

Example URI

PUT https://app.trackimo.com/v2/devices/device_id/geofences?limit=&page=
URI Parameters
HideShow
device_id
int (required) Example: 1019243

ID of the Device

limit
number (optional) Default: 20 

Maximum number of geofences to retrieve

page
number (optional) Default: 1 

Specify page number (1-based) for paginated content (pagination information provided in the Link header)

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <oauth_access_token>
Body
[
  {
    "id": 5342349,
    "name": "Office",
    "trigger": "BOTH"
  }
]
Schema
{
  "type": "array",
  "items": [
    {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "description": "Can be either 'polygon' or 'circle'"
        },
        "vertices": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "properties": {
                "lat": {
                  "type": "number"
                },
                "lng": {
                  "type": "number"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "lat": {
                  "type": "number"
                },
                "lng": {
                  "type": "number"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "lat": {
                  "type": "number"
                },
                "lng": {
                  "type": "number"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "lat": {
                  "type": "number"
                },
                "lng": {
                  "type": "number"
                }
              }
            }
          ],
          "description": "Required if type is 'polygon'"
        },
        "center": {
          "type": "object",
          "properties": {
            "lat": {
              "type": "number"
            },
            "lng": {
              "type": "number"
            }
          },
          "description": "Required if type is 'circle'"
        },
        "radius": {
          "type": "integer",
          "description": "In meters (m). Required if type is 'circle'"
        },
        "trigger": {
          "type": "string",
          "description": "Available triggers are OUTSIDE_TO_INSIDE, INSIDE_TO_OUTSIDE, and BOTH_WAYS"
        }
      },
      "required": [
        "id"
      ]
    }
  ]
}
Response  200
HideShow

IDs array of the updated geofence(s)

Headers
Content-Type: application/json
Body
[
  5342349
]
Response  400
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: application/json
Response  404
HideShow
Headers
Content-Type: application/json

Delete geofences
DELETE/devices/{device_id}/geofences{?limit,page}

Delete existing geofences.

Example URI

DELETE https://app.trackimo.com/v2/devices/device_id/geofences?limit=&page=
URI Parameters
HideShow
device_id
int (required) Example: 1019243

ID of the Device

limit
number (optional) Default: 20 

Maximum number of geofences to retrieve

page
number (optional) Default: 1 

Specify page number (1-based) for paginated content (pagination information provided in the Link header)

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <oauth_access_token>
Body
[
  5342341,
  5342342
]
Schema
{
  "type": "array",
  "items": [],
  "description": "Array of IDs"
}
Response  200
HideShow

Array of deleted geofences IDs

Headers
Content-Type: application/json
Body
[
  5342341,
  5342342
]
Response  400
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: application/json
Response  404
HideShow
Headers
Content-Type: application/json

Device Notifications

View a list of device notifications
GET/devices/{device_id}/notifications{?read_status,limit,page}

Example URI

GET https://app.trackimo.com/v2/devices/device_id/notifications?read_status=&limit=&page=
URI Parameters
HideShow
device_id
int (required) Example: 1019243

ID of the Device

read_status
string (optional) Default: all 

Filter notifications by read status. Available values are ‘read’, ‘unread’, and ‘all’

limit
number (optional) Default: 20 

Maximum number of notifications to retrieve

page
number (optional) Default: 1 

Specify page number (1-based) for paginated content (pagination information provided in the Link header)

Request
HideShow
Headers
Authorization: Bearer <oauth_access_token>
Response  200
HideShow
Headers
Content-Type: application/json
Link: <pagination-information>
Body
[
    {
        "id": 8374,
        "device_id": "1019448",
        "device_name": "Grandpa",
        "type": "SOS_ALERT",
        "message": "SOS button pressed",
        "priority": "HIGH",
        "read": false,
        "age": 346,
        "created": 1426706361
    },
    {
        "id": 8375,
        "device_id": "1019495",
        "device_name": "Truck",
        "type": "SPEED_LIMIT_ALERT",
        "message": "Speed limit alarm",
        "priority": "LOW",
        "read": true,
        "age": 246,
        "created": 1426706461,
    }
]
Response  400
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: application/json
Response  404
HideShow
Headers
Content-Type: application/json

Shared Device Notifications

Get Shared List
GET/devices/{device_id}/notifications/{notification_type}/share

Returns the list of contacts (emails/phone numbers) the specified type of notification is shared with.

Example URI

GET https://app.trackimo.com/v2/devices/device_id/notifications/notification_type/share
URI Parameters
HideShow
device_id
int (required) Example: 1019243

ID of the Device

notification_type
number (required) Example: SOS_ALERT

The notification type to share

Request
HideShow
Headers
Authorization: Bearer <oauth_access_token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  "john.doe@example.com",
  "jane.doe@example.com",
  "14049998888"
]
Response  400
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: application/json
Response  404
HideShow
Headers
Content-Type: application/json

Add Contact
PUT/devices/{device_id}/notifications/{notification_type}/share

Add emails/phone numbers to the list of contacts the specified type of notification is shared with.

Example URI

PUT https://app.trackimo.com/v2/devices/device_id/notifications/notification_type/share
URI Parameters
HideShow
device_id
int (required) Example: 1019243

ID of the Device

notification_type
number (required) Example: SOS_ALERT

The notification type to share

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <oauth_access_token>
Body
[
  "batman@example.com",
  "wile.e.coyote@example.com"
]
Response  201
HideShow

Current list of contacts (emails/phone numbers) the specified type of notification is shared with.

Headers
Content-Type: application/json
Body
[
  "john.doe@example.com",
  "jane.doe@example.com",
  "14049998888",
  "batman@example.com",
  "wile.e.coyote@example.com"
]
Response  400
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: application/json
Response  404
HideShow
Headers
Content-Type: application/json

Remove Contact
DELETE/devices/{device_id}/notifications/{notification_type}/share

Remove emails/phone numbers from the list of contacts the specified type of notification is shared with

Example URI

DELETE https://app.trackimo.com/v2/devices/device_id/notifications/notification_type/share
URI Parameters
HideShow
device_id
int (required) Example: 1019243

ID of the Device

notification_type
number (required) Example: SOS_ALERT

The notification type to share

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <oauth_access_token>
Body
[
  "john.doe@example.com"
]
Response  200
HideShow

Current list of contacts (emails/phone numbers) the specified type of notification is shared with.

Headers
Content-Type: application/json
Body
[
  "jane.doe@example.com",
  "14049998888",
  "batman@example.com",
  "wile.e.coyote@example.com"
]
Response  400
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: application/json
Response  404
HideShow
Headers
Content-Type: application/json

Location API

For handling batches of devices and locations

Locations Collection

List all locations
GET/locations{?limit,page}

List the last location for all devices associated with the current account

Example URI

GET https://app.trackimo.com/v2/locations?limit=&page=
URI Parameters
HideShow
limit
number (optional) Default: 20 

Maximum number of locations to retrieve

page
number (optional) Default: 1 

Specify page number (1-based) for paginated content (pagination information provided in the Link header)

Request
HideShow
Headers
Authorization: Bearer <oauth_access_token>
Response  200
HideShow
Headers
Content-Type: application/json
Link: <pagination-information>
Body
[
  {
    "location_id": 12343545,
    "device_id": 1019448,
    "time": 1426094743,
    "lat": 32.074824818948,
    "lng": 34.783038782062,
    "speed": 0,
    "battery": 66,
    "type": "gps",
    "is_triangulated": false
  },
  {
    "location_id": 12343565,
    "device_id": 1019448,
    "time": 1426095038,
    "lat": 32.075490006863,
    "lng": 34.783832715978,
    "speed": 1,
    "battery": 66,
    "type": "gps",
    "is_triangulated": false
  },
  {
    "location_id": 12343585,
    "device_id": 1019495,
    "time": 1426095218,
    "lat": 32.076069364079,
    "lng": 34.785313295443,
    "speed": 4,
    "battery": 66,
    "type": "gps",
    "is_triangulated": false
  },
  {
    "location_id": 12343595,
    "device_id": 1019495,
    "time": 1426095338,
    "lat": 32.077249536186,
    "lng": 34.785163091729,
    "speed": 2,
    "battery": 66,
    "type": "gps",
    "is_triangulated": false
  },
  {
    "location_id": 12343645,
    "device_id": 1019489,
    "time": 1426095518,
    "lat": 32.077549943632,
    "lng": 34.788553404126,
    "speed": 4,
    "battery": 66,
    "type": "gps",
    "is_triangulated": false
  }
]
Response  400
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: application/json

Locations Filtered Collection

A filtered list of locations
POST/locations/filter

Example URI

POST https://app.trackimo.com/v2/locations/filter
Request
HideShow

Parameters are all optional. For example, if you don’t want to filter by device ID, simply omit the “device_ids” field.

Headers
Content-Type: application/json
Authorization: Bearer <oauth_access_token>
Body
{
  "device_ids": [
    1019495,
    1019489
  ],
  "geofence": {
    "northeast": {
      "lat": 32.078823,
      "lng": 34.789374
    },
    "southwest": {
      "lat": 32.071486,
      "lng": 34.77989
    },
    "exclude": false
  }
}
Schema
{
  "type": "object",
  "properties": {
    "device_ids": {
      "type": "array",
      "description": "An array of device IDs to filter by. Leave empty for all devices",
      "items": []
    },
    "geofence": {
      "type": "object",
      "description": "Filter locations by a geographical bounding box (geo-fence)",
      "properties": {
        "northeast": {
          "type": "object",
          "description": "The north-east corner of the bounding box",
          "properties": {
            "lat": {
              "type": "number"
            },
            "lng": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "southwest": {
          "type": "object",
          "description": "The south-west corner of the bounding box",
          "properties": {
            "lat": {
              "type": "number"
            },
            "lng": {
              "type": "number"
            }
          }
        },
        "exclude": {
          "type": "boolean",
          "description": "When set to true, all locations within this geo-fence will be excluded from the results"
        }
      },
      "required": [
        "northeast",
        "southwest"
      ]
    },
    "date_range": {
      "type": "object",
      "properties": {
        "from": {
          "type": "integer"
        },
        "to": {
          "type": "integer"
        }
      },
      "required": [
        "from",
        "to"
      ]
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "location_id": 12343545,
    "device_id": 1019495,
    "time": 1426095218,
    "lat": 32.076069364079,
    "lng": 34.785313295443,
    "speed": 4,
    "battery": 66,
    "type": "gps",
    "is_triangulated": false
  },
  {
    "location_id": 12343555,
    "device_id": 1019495,
    "time": 1426095338,
    "lat": 32.077249536186,
    "lng": 34.785163091729,
    "speed": 2,
    "battery": 66,
    "type": "gps",
    "is_triangulated": false
  },
  {
    "location_id": 12343565,
    "device_id": 1019489,
    "time": 1426095518,
    "lat": 32.077549943632,
    "lng": 34.788553404126,
    "speed": 4,
    "battery": 66,
    "type": "gps",
    "is_triangulated": false
  }
]
Response  401
HideShow
Headers
Content-Type: application/json
Response  400
HideShow
Headers
Content-Type: application/json

Settings API

Settings Collection

Update settings for mutliple devices
PUT/settings

Example URI

PUT https://app.trackimo.com/v2/settings
Request
HideShow

PLEASE NOTE: If you do not define a device ID filter (‘device_ids’) the settings will be applied to all devices in the account.

Headers
Content-Type: application/json
Authorization: Bearer <oauth_access_token>
Body
{
  "device_ids": [
    "1019495",
    "1019489"
  ],
  "settings": {
    "speed_limit": {
      "enable": true,
      "value": 60,
      "unit": "kmh"
    },
    "tracking_mode": {
      "sample_rate": 300,
      "samples_per_report": 2
    },
    "low_battery": true,
    "moving_start": true,
    "sos_key": true
  }
}
Schema
{
  "type": "object",
  "properties": {
    "device_ids": {
      "type": "array",
      "description": "An array of device IDs to filter by. Leave empty for all devices",
      "items": []
    },
    "settings": {
      "type": "object",
      "properties": {
        "speed_limit": {
          "type": "object",
          "properties": {
            "enable": {
              "type": "boolean"
            },
            "value": {
              "type": "integer"
            },
            "unit": {
              "type": "string"
            }
          }
        },
        "tracking_mode": {
          "type": "object",
          "properties": {
            "sample_rate": {
              "type": "integer",
              "description": "The rate (in seconds) at which the device will sample its location"
            },
            "samples_per_report": {
              "type": "integer",
              "description": "The number of samples the device will collect before submitting a location report"
            }
          }
        },
        "low_battery": {
          "type": "boolean"
        },
        "moving_start": {
          "type": "boolean"
        },
        "sos_key": {
          "type": "boolean"
        }
      }
    }
  },
  "required": [
    "settings"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Response  400
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: application/json

Notifications API

Notifications Collection

View notifications
GET/notifications{?read_status,limit,page}

View a list of all notifications from all devices associated with the account.

Example URI

GET https://app.trackimo.com/v2/notifications?read_status=&limit=&page=
URI Parameters
HideShow
read_status
string (optional) Default: all 

Filter notifications by read status. Available values are ‘read’, ‘unread’, and ‘all’

limit
number (optional) Default: 20 

Maximum number of locations to retrieve

page
number (optional) Default: 1 

Specify page number (1-based) for paginated content (pagination information provided in the Link header)

Request
HideShow
Headers
Authorization: Bearer <oauth_access_token>
Response  200
HideShow
Headers
Content-Type: application/json
Link: <pagination-information>
Body
[
    {
        "id": 8374,
        "device_id": "1019448",
        "device_name": "Grandpa",
        "type": "SOS_ALERT",
        "message": "SOS button pressed",
        "priority": "HIGH",
        "read": false,
        "age": 346,
        "created": 1426706361
    },
    {
        "id": 8375,
        "device_id": "1019495",
        "device_name": "Truck",
        "type": "SPEED_LIMIT_ALERT",
        "message": "Speed limit alarm",
        "priority": "LOW",
        "read": true,
        "age": 246,
        "created": 1426706461,
    }
]
Response  400
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: application/json

Delete notifications
DELETE/notifications{?read_status,limit,page}

Deletes all notifications from all devices associated with the account.

Example URI

DELETE https://app.trackimo.com/v2/notifications?read_status=&limit=&page=
URI Parameters
HideShow
read_status
string (optional) Default: all 

Filter notifications by read status. Available values are ‘read’, ‘unread’, and ‘all’

limit
number (optional) Default: 20 

Maximum number of locations to retrieve

page
number (optional) Default: 1 

Specify page number (1-based) for paginated content (pagination information provided in the Link header)

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <oauth_access_token>
Response  200
HideShow

Returns the number of notifications deleted

Headers
Content-Type: application/json
Body
{
  "deleted": 2
}
Response  401
HideShow
Headers
Content-Type: application/json

Notification

Update notification
PUT/notifications/{notification_id}

Update a single notification

Example URI

PUT https://app.trackimo.com/v2/notifications/notification_id
URI Parameters
HideShow
notification_id
string (required) 

ID of the Notification

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <oauth_access_token>
Body
{
  "priority": "NONE",
  "read": true
}
Schema
{
  "type": "object",
  "properties": {
    "priority": {
      "type": "string",
      "description": "Allowed values are 'HIGH', 'MEDIUM', 'LOW', and 'NONE'"
    },
    "read": {
      "type": "boolean"
    }
  }
}
Response  200
HideShow

The ID of the updated notification.

Headers
Content-Type: application/json
Body
{
  "id": "8374"
}
Response  400
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: application/json
Response  404
HideShow
Headers
Content-Type: application/json

Delete notification
DELETE/notifications/{notification_id}

Delete a single notification

Example URI

DELETE https://app.trackimo.com/v2/notifications/notification_id
URI Parameters
HideShow
notification_id
string (required) 

ID of the Notification

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <oauth_access_token>
Response  200
HideShow

The ID of the deleted notification.

Headers
Content-Type: application/json
Body
{
  "id": "8374"
}
Response  401
HideShow
Headers
Content-Type: application/json
Response  404
HideShow
Headers
Content-Type: application/json

OAuth2 Authentication API

Application Registration

Create new application
POST/oauth2/client

Example URI

POST https://app.trackimo.com/v2/oauth2/client
Request
HideShow
Headers
Content-Type: application/json
Cookie: JSESSIONID=<cookie-value>
Body
{
  "appName": "Trackimo Application",
  "description": "Trackimo Application Description",
  "redirectUri": "https://dev.trackimo.com/api/v2/"
}
Schema
{
  "type": "object",
  "properties": {
    "appName": {
      "id": "appName",
      "type": "string",
      "description": "Application name"
    },
    "description": {
      "id": "description",
      "type": "string",
      "description": "Application description"
    },
    "redirectUri": {
      "id": "redirectUri",
      "type": "string",
      "description": "The URL to which the user will be redirected with the authorization code."
    }
  },
  "required": [
    "appName",
    "redirectUri"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "client_id": "183b9f5a-b935-4708-852c-c5999bdb9080",
  "client_secret": "c77054bfd321aef1ac82cd64c5c9b706"
}
Response  401
HideShow
Headers
Content-Type: application/json
Response  400
HideShow
Headers
Content-Type: application/json

Authentication

Request an authorization code
GET/oauth2/auth{?client_id,redirect_uri,scope,response_type,state,approval_prompt}

Example URI

GET https://app.trackimo.com/v2/oauth2/auth?client_id=812741506391.com.trackimo&redirect_uri=https%3A%2F%2Fclient.trackimo.com%2Fcode&scope=locations,notifications&response_type=code&state=url%3Dhttps%3A%2F%2Fapp.trackimo.com%26device_id%3D1019999&approval_prompt=force
URI Parameters
HideShow
client_id
string (required) Example: 812741506391.com.trackimo

Identifies the client that is making the request.

redirect_uri
string (required) Example: https%3A%2F%2Fclient.trackimo.com%2Fcode

The URL to which the user will be redirected with the authorization code (must be to the callback domain associated with the application)

scope
string (required) Example: locations,notifications

Comma-delimited set of permissions that the application requests.

response_type
string (required) Example: code

Must be set to ‘code’

state
string (optional) Example: url%3Dhttps%3A%2F%2Fapp.trackimo.com%26device_id%3D1019999

The state param is returned to your application (useful if the authentication is done from various points in an app)

approval_prompt
string (optional) Default: auto Example: force

Indicates whether the user should be re-prompted for consent. The default is auto, so a given user should only see the consent page for a given set of scopes the first time through the sequence. If the value is force, then the user sees a consent page even if they previously gave consent to your application for a given set of scopes.

Request
HideShow
Headers
Cookie: JSESSIONID=<cookie-value>
Response  302
HideShow

The system will respond to the authorization request by redirecting the user/browser to the redirect_uri provided. On success, a code will be included in the query string. If access is denied, error=access_denied will be included in the query string. In both cases, if provided, the state argument will also be included.

Headers
Content-Type: application/json
Location: https://example.com/code?state=url%3Dhttps%3A%2F%2Fapp.trackimo.com%26device_id%3D1019999&code=75e251e3ff8eee
Response  401
HideShow
Headers
Content-Type: application/json
Response  400
HideShow
Headers
Content-Type: application/json
Response  404
HideShow
Headers
Content-Type: application/json

Token exchange

Exchange token
POST/oauth2/token

Example URI

POST https://app.trackimo.com/v2/oauth2/token
Request
HideShow
Headers
Content-Type: application/json
Cookie: JSESSIONID=<cookie-value>
Body
{
  "client_id": "812741506391.com.trackimo",
  "client_secret": "7b2946535949ae70f015d696d8ac602830ece513",
  "code": "75e251e3ff8eee"
}
Schema
{
  "type": "object",
  "properties": {
    "client_id": {
      "id": "client_id",
      "type": "string",
      "description": "Identifies the client that is making the request."
    },
    "client_secret": {
      "id": "client_secret",
      "type": "string",
      "description": "The client secret obtained from the developer page."
    },
    "code": {
      "id": "code",
      "type": "string",
      "description": "The authorization code returned from the initial request."
    }
  },
  "required": [
    "client_id",
    "client_secret",
    "code",
    "redirect_uri"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "access_token": "49752f21-1bf2-440a-b031-0a01ed04c780",
  "expires_in": 3920,
  "token_type": "Bearer",
  "refresh_token": "91f77ff2-d501-4cb1-addc-3ca9737d84e0"
}
Response  401
HideShow
Headers
Content-Type: application/json
Response  400
HideShow
Headers
Content-Type: application/json

Token Refresh

Refresh token
POST/oauth2/token/refresh

Example URI

POST https://app.trackimo.com/v2/oauth2/token/refresh
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "client_id": "812741506391.com.trackimo",
  "client_secret": "7b2946535949ae70f015d696d8ac602830ece513",
  "refresh_token": "75e251e3ff8eee"
}
Schema
{
  "type": "object",
  "properties": {
    "client_id": {
      "id": "client_id",
      "type": "string",
      "description": "Identifies the client that is making the request."
    },
    "client_secret": {
      "id": "client_secret",
      "type": "string",
      "description": "The client secret obtained from the developer page."
    },
    "refresh_token": {
      "id": "refresh_token",
      "type": "string",
      "description": "Refresh Token Used to retrieve new access token"
    }
  },
  "required": [
    "client_id",
    "client_secret",
    "refresh_token"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "access_token": "49752f21-1bf2-440a-b031-0a01ed04c780",
  "expires_in": 3920,
  "token_type": "Bearer",
  "refresh_token": "91f77ff2-d501-4cb1-addc-3ca9737d84e0"
}
Response  400
HideShow
Headers
Content-Type: application/json

Revoking a token

Revoke a token
GET/oauth2/revoke{?token}

If the revocation is successfully processed, then the status code of the response is 200. For error conditions, a status code 400 is returned.

Example URI

GET https://app.trackimo.com/v2/oauth2/revoke?token=1/fFAGRNJru1FTz70BzhT3Zg
URI Parameters
HideShow
token
string (required) Example: 1/fFAGRNJru1FTz70BzhT3Zg

The token to revoke.

Response  200

User API

Current User

Currently logged in user
GET/user

Get the details of the currently logged in user.

Example URI

GET https://app.trackimo.com/v2/user
Request
HideShow
Headers
Authorization: Bearer <oauth_access_token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "user_id": 9276,
  "username": "trkuser22",
  "email": "user@trackimo.com",
  "firstName": "John",
  "lastName": "Doe",
  "roles": [
    "user"
  ],
  "preferences": {
    "speed_unit": "mph",
    "locale": "en_US",
    "clock_24_hour": true
  }
}
Response  401
HideShow
Headers
Content-Type: application/json

Generated by aglio on 11 Jan 2016