×

Current vehicle status

This API is used to obtain the current status information of one or more vehicles, including data on location, speed, sensor readings, and technical condition.

How to get data

Method

GET

Request address

To get the data, use the address: https://<server_address>/api/api.php?

Request parameters

To obtain the required data, append parameters to the request address. Parameters are specified after the question mark ? and are separated by the ampersand &.
  • cmd=status — command to retrieve status information
  • imei — unique identifier of the GPS tracker
  • agents — list of agent IDs, specified as a comma-separated list to request statuses of multiple vehicles
  • veh_numbers — registration number of the vehicle, exactly as it appears in the system, with strict adherence to letter and number case
  • node — node number where the command is executed
At least one of the following parameters must be present in the request: imei, agents, or veh_numbers.
 

Examples

Request by IMEI

https://<server_address>/api/api.php?cmd=status&imei=357073296325265&node=1

Request by multiple agent IDs

https://<server_address>/api/api.php?cmd=status&agents=51594,44841&node=1
 Response
{
  "code": 0,
  "msg": "OK",
  "data": [
    {
      "agentid": 44841,
      "imei": "865473034076573",
      "configuration": "Teltonika FM2200",
      "typeid": 27,
      "type": "Car",
      "vehiclenumber": "NURKA",
      "folder": "REAL",
      "created_time": 1518167398,
      "uniqid": "865473034076573",
      "current_mileage": 65345,
      "initial_mileage": 0,
      "driver_name": null,
      "driver_phone": null,
      "model": "ВАЗ (Lada) Kalina",
      "info": " test",
      "vin": "XTA219470K0259832",
      "status": {
        "active": 1,
        "speed": 0,
        "direction": 27,
        "lat": "47.119755",
        "lon": "39.667492",
        "alt": 0,
        "satsinview": 16,
        "unixtimestamp": "1621432378",
        "moving": 0,
        "parking": 9267,
        "firing": 0
      },
      "sensors_status": [
        {
          "name": "Ignition sensor",
          "id": "150549",
          "hum_value": "выкл.",
          "dig_value": "0",
          "raw_value": "12494",
          "change_ts": "1621423461",
          "group": "GROUP!"
        },
        {
          "name": "Датчик топлива",
          "id": "368013",
          "hum_value": "1249.4 -",
          "dig_value": "1249.4",
          "raw_value": "12494",
          "change_ts": "1621432378",
          "group": "myGroup"
        }
      ]
    }
  ],
  "reqest_time": 0.0642
}
The response is returned in JSON format and contains:
  • imei — unique number of the tracker
  • distance — distance traveled during the specified period
  • agent_id — identifier of the tracking device
  • account_id — account number in the system
  • code — status code (0 indicates success)
  • msg — message about the status of the request
  • data — array of objects containing information about the vehicles:
  • agentid — contract identifier
  • imei — International Mobile Equipment Identity
  • vin — vehicle identification number
  • configuration — model of the tracker
  • typeid — numerical identifier of the vehicle type
  • type — type of vehicle
  • vehiclenumber — registration number of the vehicle
  • folder — organizational group or branch
  • created_time — creation time in Unix timestamp format
  • uniqid — unique identifier
  • current_mileage — current mileage
  • initial_mileage — initial mileage
  • driver_name — name of the driver
  • driver_phone — phone number of the driver
  • model — model of the vehicle
  • info — additional information
  • status — information about the current status:
  • active — whether the object is active (1 for yes, 0 for no)
  • speed — current speed
  • direction — current direction in degrees
  • lat — current latitude
  • lon — current longitude
  • alt — current altitude
  • satsinview — number of visible satellites
  • unixtimestamp — time of the last update
  • moving — time spent moving in seconds
  • parking — time spent parked in seconds
  • firing — ignition status (1 for on, 0 for off)
  • sensors_status — array containing information about the sensors:
  • name — name of the sensor
  • id — identifier of the sensor
  • hum_value — actual value after calibration
  • dig_value — digital value after calibration
  • raw_value — raw value before calibration
  • change_ts — time of the last value change in Unix timestamp format
  • group — sensor group
  • request_time — time taken to process the request in seconds