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

Fetch a list of Devices

Request

Without any params, returns a list of the user's devices

Security
BasicAuth or ApiKey
Query
allboolean

Can only be used by admins or managers to fetch all entities

userIdinteger

Standard users can use this only with their own userId

idinteger

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

uniqueIdstring

To fetch one or more devices. Multiple params can be passed like uniqueId=333331&uniqieId=44442

curl -i -X GET \
  -u <username>:<password> \
  'https://docs2.mygpsapi.com/_mock/openapi/devices?all=true&userId=0&id=0&uniqueId=string'

Responses

OK

Bodyapplication/jsonArray [
idinteger(int64)
namestring
uniqueIdstring
statusstring
disabledboolean
lastUpdatestring or null(date-time)

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

positionIdinteger or null(int64)
groupIdinteger or null(int64)
phonestring or null
modelstring or null
contactstring or null
categorystring or null
attributesobject
]
Response
application/json
[ { "id": 0, "name": "string", "uniqueId": "string", "status": "string", "disabled": true, "lastUpdate": "2019-08-24T14:15:22Z", "positionId": 0, "groupId": 0, "phone": "string", "model": "string", "contact": "string", "category": "string", "attributes": {} } ]

Create a Device

Request

Security
BasicAuth or ApiKey
Bodyapplication/jsonrequired
idinteger(int64)
namestring
uniqueIdstring
statusstring
disabledboolean
lastUpdatestring or null(date-time)

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

positionIdinteger or null(int64)
groupIdinteger or null(int64)
phonestring or null
modelstring or null
contactstring or null
categorystring or null
attributesobject
curl -i -X POST \
  -u <username>:<password> \
  https://docs2.mygpsapi.com/_mock/openapi/devices \
  -H 'Content-Type: application/json' \
  -d '{
    "id": 0,
    "name": "string",
    "uniqueId": "string",
    "status": "string",
    "disabled": true,
    "lastUpdate": "2019-08-24T14:15:22Z",
    "positionId": 0,
    "groupId": 0,
    "phone": "string",
    "model": "string",
    "contact": "string",
    "category": "string",
    "attributes": {}
  }'

Responses

OK

Bodyapplication/json
idinteger(int64)
namestring
uniqueIdstring
statusstring
disabledboolean
lastUpdatestring or null(date-time)

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

positionIdinteger or null(int64)
groupIdinteger or null(int64)
phonestring or null
modelstring or null
contactstring or null
categorystring or null
attributesobject
Response
application/json
{ "id": 0, "name": "string", "uniqueId": "string", "status": "string", "disabled": true, "lastUpdate": "2019-08-24T14:15:22Z", "positionId": 0, "groupId": 0, "phone": "string", "model": "string", "contact": "string", "category": "string", "attributes": {} }

Update a Device

Request

Security
BasicAuth or ApiKey
Path
idintegerrequired
Bodyapplication/jsonrequired
idinteger(int64)
namestring
uniqueIdstring
statusstring
disabledboolean
lastUpdatestring or null(date-time)

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

positionIdinteger or null(int64)
groupIdinteger or null(int64)
phonestring or null
modelstring or null
contactstring or null
categorystring or null
attributesobject
curl -i -X PUT \
  -u <username>:<password> \
  'https://docs2.mygpsapi.com/_mock/openapi/devices/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": 0,
    "name": "string",
    "uniqueId": "string",
    "status": "string",
    "disabled": true,
    "lastUpdate": "2019-08-24T14:15:22Z",
    "positionId": 0,
    "groupId": 0,
    "phone": "string",
    "model": "string",
    "contact": "string",
    "category": "string",
    "attributes": {}
  }'

Responses

OK

Bodyapplication/json
idinteger(int64)
namestring
uniqueIdstring
statusstring
disabledboolean
lastUpdatestring or null(date-time)

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

positionIdinteger or null(int64)
groupIdinteger or null(int64)
phonestring or null
modelstring or null
contactstring or null
categorystring or null
attributesobject
Response
application/json
{ "id": 0, "name": "string", "uniqueId": "string", "status": "string", "disabled": true, "lastUpdate": "2019-08-24T14:15:22Z", "positionId": 0, "groupId": 0, "phone": "string", "model": "string", "contact": "string", "category": "string", "attributes": {} }

Delete a Device

Request

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

Responses

No Content

Body

Update total distance and hours of the Device

Request

Security
BasicAuth or ApiKey
Path
idintegerrequired
Bodyapplication/jsonrequired
deviceIdinteger(int64)
totalDistancenumber

in meters

hoursnumber
curl -i -X PUT \
  -u <username>:<password> \
  'https://docs2.mygpsapi.com/_mock/openapi/devices/{id}/accumulators' \
  -H 'Content-Type: application/json' \
  -d '{
    "deviceId": 0,
    "totalDistance": 0,
    "hours": 0
  }'

Responses

No Content

Body

Groups

Group management

Operations

Users

User management

Operations

Permissions

User permissions and other object linking

Operations

Positions

Retrieving raw location information

Operations

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