Fleet setup

Maintenance

Maintenance management

Fetch a list of Maintenance tasks

GET
https://demo.traccar.org/api/maintenance

Without params, it returns a list of Maintenance tasks the user has access to

Parameters

allbooleanquery

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

userIdintegerquery

Standard users can use this only with their own userId

deviceIdintegerquery

Standard users can use this only with _deviceId_s, they have access to

groupIdintegerquery

Standard users can use this only with _groupId_s, they have access to

refreshbooleanquery
limitintegerquery

Limit the number of returned results

offsetintegerquery

Offset for pagination

keywordstringquery

Search keyword filter

Response

OK

Response fields application/json
Show child attributes
idinteger<int64>

Unique maintenance item identifier

namestring

Maintenance task name

typestring

Metric the maintenance is based on

startnumber

Current accumulated value when maintenance tracking starts

periodnumber

Threshold value after which maintenance is due

attributesobject

Custom maintenance attributes

401Unauthorized

Unauthorized

Authorization

BasicAuthhttp (basic)
ApiKeyhttp (bearer)

Create a Maintenance task

POST
https://demo.traccar.org/api/maintenance

Body

application/json
idinteger<int64>

Unique maintenance item identifier

namestring

Maintenance task name

typestring

Metric the maintenance is based on

startnumber

Current accumulated value when maintenance tracking starts

periodnumber

Threshold value after which maintenance is due

attributesobject

Custom maintenance attributes

Response

OK

Response fields application/json
idinteger<int64>

Unique maintenance item identifier

namestring

Maintenance task name

typestring

Metric the maintenance is based on

startnumber

Current accumulated value when maintenance tracking starts

periodnumber

Threshold value after which maintenance is due

attributesobject

Custom maintenance attributes

400Bad Request

Bad request

401Unauthorized

Unauthorized

Authorization

BasicAuthhttp (basic)
ApiKeyhttp (bearer)

Fetch a Maintenance task

GET
https://demo.traccar.org/api/maintenance/{id}

Parameters

idintegerrequiredpath

Response

OK

Response fields application/json
idinteger<int64>

Unique maintenance item identifier

namestring

Maintenance task name

typestring

Metric the maintenance is based on

startnumber

Current accumulated value when maintenance tracking starts

periodnumber

Threshold value after which maintenance is due

attributesobject

Custom maintenance attributes

401Unauthorized

Unauthorized

404Not Found

Not found

Authorization

BasicAuthhttp (basic)
ApiKeyhttp (bearer)

Update a Maintenance task

PUT
https://demo.traccar.org/api/maintenance/{id}

Body

application/json
idinteger<int64>

Unique maintenance item identifier

namestring

Maintenance task name

typestring

Metric the maintenance is based on

startnumber

Current accumulated value when maintenance tracking starts

periodnumber

Threshold value after which maintenance is due

attributesobject

Custom maintenance attributes

Parameters

idintegerrequiredpath

Response

OK

Response fields application/json
idinteger<int64>

Unique maintenance item identifier

namestring

Maintenance task name

typestring

Metric the maintenance is based on

startnumber

Current accumulated value when maintenance tracking starts

periodnumber

Threshold value after which maintenance is due

attributesobject

Custom maintenance attributes

400Bad Request

Bad request

401Unauthorized

Unauthorized

Authorization

BasicAuthhttp (basic)
ApiKeyhttp (bearer)

Delete a Maintenance task

DELETE
https://demo.traccar.org/api/maintenance/{id}

Parameters

idintegerrequiredpath

Response

204No Content

No Content

401Unauthorized

Unauthorized

Authorization

BasicAuthhttp (basic)
ApiKeyhttp (bearer)