Skip to content

Traccar (6.10.0)

Traccar GPS tracking server API documentation. To use the API you need to have a server instance. For testing purposes you can use one of free demo servers. For production use you can install your own server or get a subscription service.

Download OpenAPI description
Overview
Languages
Servers
Mock server
https://docs2.mygpsapi.com/_mock/openapi
Doha Dynamics API (Production)
https://mygpsapi.com/api

Server

Server information

Operations

Session

User session management

Operations

Devices

Device management

Operations

Groups

Group management

Operations

Users

User management

Operations

Permissions

User permissions and other object linking

Operations

Positions

Retrieving raw location information

Operations

Fetches a list of Positions

Request

We strongly recommend using Traccar WebSocket API instead of periodically polling positions endpoint. Without any params, it returns a list of last known positions for all the user's Devices. from and to fields are not required with id.

Security
BasicAuth or ApiKey
Query
deviceIdinteger

deviceId is optional, but requires the from and to parameters when used

fromstring(date-time)

in ISO 8601 format. eg. 1963-11-22T18:30:00Z

tostring(date-time)

in ISO 8601 format. eg. 1963-11-22T18:30:00Z

idinteger

To fetch one or more positions. Multiple params can be passed like id=31&id=42

curl -i -X GET \
  -u <username>:<password> \
  'https://docs2.mygpsapi.com/_mock/openapi/positions?deviceId=0&from=2019-08-24T14%3A15%3A22Z&to=2019-08-24T14%3A15%3A22Z&id=0'

Responses

OK

BodyArray [
idinteger(int64)
deviceIdinteger(int64)
protocolstring
deviceTimestring(date-time)

in ISO 8601 format. eg. 1963-11-22T18:30:00Z

fixTimestring(date-time)

in ISO 8601 format. eg. 1963-11-22T18:30:00Z

serverTimestring(date-time)

in ISO 8601 format. eg. 1963-11-22T18:30:00Z

validboolean
latitudenumber
longitudenumber
altitudenumber
speednumber

in knots

coursenumber
addressstring
accuracynumber
networkobject
geofenceIdsArray of integers
attributesobject
]
Response
[ { "id": 0, "deviceId": 0, "protocol": "string", "deviceTime": "2019-08-24T14:15:22Z", "fixTime": "2019-08-24T14:15:22Z", "serverTime": "2019-08-24T14:15:22Z", "valid": true, "latitude": 0, "longitude": 0, "altitude": 0, "speed": 0, "course": 0, "address": "string", "accuracy": 0, "network": {}, "geofenceIds": [ … ], "attributes": {} } ]

Deletes all the Positions of a device in the time span specified

Request

Security
BasicAuth or ApiKey
Query
deviceIdintegerrequired
fromstring(date-time)required

in ISO 8601 format. eg. 1963-11-22T18:30:00Z

tostring(date-time)required

in ISO 8601 format. eg. 1963-11-22T18:30:00Z

curl -i -X DELETE \
  -u <username>:<password> \
  'https://docs2.mygpsapi.com/_mock/openapi/positions?deviceId=0&from=2019-08-24T14%3A15%3A22Z&to=2019-08-24T14%3A15%3A22Z'

Responses

No Content

Body

Delete a Position

Request

Security
BasicAuth or ApiKey
Path
idintegerrequired
curl -i -X DELETE \
  -u <username>:<password> \
  'https://docs2.mygpsapi.com/_mock/openapi/positions/{id}'

Responses

No Content

Body

Events

Retrieving event information

Operations

Reports

Reports generation

Operations

Notifications

User notifications management

Operations

Geofences

Geofence management

Operations

Commands

Sending commands to devices and stored command management

Operations

Attributes

Computed attributes management

Operations

Drivers

Drivers management

Operations

Maintenance

Maintenance management

Operations

Calendars

Calendar management

Operations

Statistics

Retrieving server statistics

Operations