Contact us Login LIVE DEMO FREE TRIAL

get_state(…)

Get current tracker state (gps, gsm, outputs, etc.).

parameters:

name description type
tracker_id Id of the tracker (aka “object_id”). Tracker must belong to authorized user and not be blocked. Int

return:

{"success": true, 
  "user_time": <current time in user's timezone, e.g. "2014-07-09 07:50:58"?>,
  "state": {
    "source_id": <tracker data source id (from table "sources")>, //int
    "gps": {
        "updated": <date of last gps coordinates update in timezone of the user, e.g. "2013-02-19 10:48:08", or null if there was no updates>, //string
        "signal_level": <gps signal level in percent, e.g. 25, or null if device cannot provide such info>, //int
        "location": {
            "lat": <latitude, e.g. 56.826068>, //float
            "lng": <longitude, e.g. 60.594338> //float
        },
        "heading": <heading in degrees, e.g. 3>, //int
        "speed": <speed in km/h, e.g. 20> //int,
        "alt": <altitude in meters, e.g. 10> //int,
        "precision": <precision in meters, optional>,  //int
        "gsm_lbs": <true if location is detected by GSM LBS, optional>,  //boolean
    },
    "connection_status": <device connection status, possible values: "signal_lost", "just_registered", "offline", "idle", "active">, //string
    "movement_status": <movement status, possible values: "moving", "stopped", "parked">,
    "gsm": {  //can be null if device does not support transmission of gsm info
        "updated": <date of last gsm status update in timezone of the user, e.g. "2013-02-19 10:48:08", or null if there was no updates>, //string
        "signal_level": <gsm signal level in percent, e.g. 25, or null if device cannot provide such info>, //int
        "network_name": <gsm network name, e.g. "T-MOBILE", or null if device cannot provide such info>, //string
        "roaming": <roaming state, or null if device cannot provide such info> //boolean
    },
    "last_update": <date of last device state update in timezone of the user, e.g. "2013-02-19 10:48:08", or null if there was no updates>, //string
    "battery_level": <battery level in percent, e.g. 25, or null if device cannot provide such info>, //int,
    "battery_update": <date of last battery update in timezone of the user, e.g. "2013-02-19 10:48:08", or null if there was no updates>, //string
    "inputs": <array of states of all digital inputs, e.g. [true, true, false] means input 1 is on, input 2 is on, input 3 is off >, //array[boolean]
    "inputs_update": <date of last inputs update in timezone of the user, e.g. "2013-02-19 10:48:08", or null if there was no updates>, //string
    "outputs": <array of states of all digital outputs, e.g. [true, true, false] means output 1 is on, output 2 is on, output 3 is off >, //array[boolean]
    "ouputs_update": <date of last outputs update in timezone of the user, e.g. "2013-02-19 10:48:08", or null if there was no updates>, //string
    "additional": { //map of additional states, keys depends on tracker model
       "hardware_key": { <last scanned hardware key object>
          "value": < value >,
          "updated": < update time >
       }
    }
}}

errors:

  • 204 – Entity not found (if there is no tracker with such id belonging to authorized user)
  • 208 – Device blocked (if tracker exists but was blocked due to tariff restrictions or some other reason)

If you have more questions please contact our support team

Contacts

USA: +1 858 815 9045

Mexico: +52 334 1642158

UK: +44 808 1641499

Germany: +49 1573 5988250

Russia: +7 495 317 1622

Log in

Loading...

We use сookies to improve our website, products and related services, analyze site traffic, and serve targeted advertisements. If you continue to use our services, you consent to our use of сookies. Read more