OsmAnd

This protocol supports two different formats of data: JSON and form or query parameters. Traccar Client, starting from version 9.0.0, uses the JSON format. The Traccar server supports JSON starting from version 6.7.0.

JSON format

This is the native format used by the background location SDK we use for Traccar Client.

{
  "location": {
    "timestamp": "2000-01-01T00:00:00.000Z", // time in ISO format
    "coords": {
      "latitude": 0.0,                       // latitude in degrees
      "longitude": 0.0,                      // longitude in degrees
      "accuracy": 0,                         // accuracy in meters
      "speed": 0,                            // speed in m/s
      "heading": 0,                          // heading in degrees
      "altitude": 0                          // altitude in meters
    },
    "is_moving": false,                      // motion state
    "odometer": 0,                           // device-side odometer value
    "event": "motionchange",                 // event type
    "battery": {
      "level": 1,                            // battery level as a decimal value from 0 to 1
      "is_charging": false                   // charging state
    },
    "activity": {
      "type": "still"                        // activity type; examples are 'still', 'walking', 'in_vehicle'
    },
    "extras": {}
  },
  "device_id": "48241179"                    // device identifier
}

Query / form format

This protocol was originally used by the OsmAnd mobile app. It was later adopted and extended to be used by our official Traccar Client apps.

The OsmAnd protocol processes HTTP requests with either query parameters or POST parameters. The following parameters can be included in the request:

Any other parameters will be treated as custom attributes and stored with the position.

Query format examples

Example 1: Basic request with mandatory parameters

http://demo.traccar.org:5055/?id=12345&lat=48.8566&lon=2.3522&timestamp=1609459200000

Example 2: Request with additional parameters

http://demo.traccar.org:5055/?deviceid=12345&lat=48.8566&lon=2.3522&timestamp=2021-01-01T00:00:00Z&speed=15&bearing=270&altitude=35&accuracy=10&hdop=0.8&batt=75

Example 3: Request with cell and WiFi information

http://demo.traccar.org:5055/?id=12345&lat=48.8566&lon=2.3522&timestamp=1609459200000&cell=208,10,12345,67890,50&wifi=00:11:22:33:44:55,-70