iTraq API v1 (1.0.6)

Download OpenAPI specification:Download

iTraq API documentation

Authentication and authorization

exchange API key to auth token

header Parameters
Content-Type
required
string
Value: "application/json"
Request Body schema: application/json
email
string
password
string
apiKey
string

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "password": "string",
  • "apiKey": "string"
}

Device operations

updates the device settings

path Parameters
deviceId
required
integer

unique device identifier or SerialID or Tracking ID

header Parameters
Content-Type
required
string
Value: "application/json"
x-auth-token
required
string
Value: "<YOUR AUTH TOKEN>"
Request Body schema: application/json
object

the schedule of the device to server data transmission

hardware
number

bitmask of the device fine tuning

object

device fine tuning

name
string

device name

modes
integer

bitmask of triggers waking up the device (light, motion, etc.)

guardMode
boolean

switch device in the guard mode

object

digital fence parameters

object

set of threshold values of sensors; when out bounds the customer to be notified

gpsMode
boolean

switch GPS on/off

object

Responses

Request samples

Content type
application/json
{
  • "schedule": {
    },
  • "hardware": 0,
  • "hardwareSettings": {
    },
  • "name": "string",
  • "modes": 0,
  • "guardMode": true,
  • "guardModeInfo": {
    },
  • "triggers": {
    },
  • "gpsMode": true,
  • "additionalParameters": {
    }
}

requests the device settings

path Parameters
deviceId
required
integer

unique device identifier or SerialID or Tracking ID

header Parameters
Content-Type
required
string
Value: "application/json"
x-auth-token
required
string
Value: "<YOUR AUTH TOKEN>"

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "serialId": "string",
  • "imei": "string",
  • "simNumber": "string",
  • "firmwareVersion": 0,
  • "batteryCharge": 0,
  • "lastWakeUpFormatted": "string",
  • "lastLocation": {
    },
  • "schedule": {
    },
  • "hardware": 0,
  • "hardwareSettings": {
    },
  • "name": "string",
  • "modes": 0,
  • "guardMode": true,
  • "guardModeInfo": {
    },
  • "triggers": {
    },
  • "gpsMode": true,
  • "additionalParameters": {
    }
}

retrieves location history of the device

path Parameters
deviceId
required
integer

unique device identifier or SerialID or Tracking ID

query Parameters
page
integer
Default: 0

page number

pagesize
integer
Default: 50

number of elements per page

sortdirection
string
Default: "desc"
Enum: "desc" "asc"

sorting direction

includeLocations
string
Default: true
Enum: true false

whether locations to be included in the response. Either includeLocations or includeLogs (or both) must be set to true

includeLogs
string
Default: false
Enum: true false

whether sensor and error logs to be included in the response. Either includeLocations or includeLogs (or both) must be set to true

includeTemperature
string
Default: true
Enum: true false

whether temperature to be included in the response

includeSensors
string
Default: true
Enum: true false

whether sensors data to be included in the response

fromDate
integer
Default: 0

unix epoch timestamp of the device states period start

tillDate
integer

unix epoch timestamp of the device states period end

direction
string
Default: "earlier"
Enum: "earlier" "later"

later means fromDate < DEVICE_LOCATIONS.TIME < tillDate; earlier means DEVICE_LOCATIONS.TIME < fromDate (and tillDate is ignored)

header Parameters
Content-Type
required
string
Value: "application/json"
x-auth-token
required
string
Value: "<YOUR AUTH TOKEN>"

Responses

Response samples

Content type
application/json
{
  • "status": 0,
  • "data": {
    }
}

suspends the device

path Parameters
deviceId
required
integer

unique device identifier or SerialID or Tracking ID

header Parameters
Content-Type
required
string
Value: "application/json"
x-auth-token
required
string
Value: "<YOUR AUTH TOKEN>"

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "serialId": "string",
  • "imei": "string",
  • "simNumber": "string",
  • "firmwareVersion": 0,
  • "batteryCharge": 0,
  • "lastWakeUpFormatted": "string",
  • "lastLocation": {
    },
  • "schedule": {
    },
  • "hardware": 0,
  • "hardwareSettings": {
    },
  • "name": "string",
  • "modes": 0,
  • "guardMode": true,
  • "guardModeInfo": {
    },
  • "triggers": {
    },
  • "gpsMode": true,
  • "additionalParameters": {
    }
}