Fleet setup

Calendars

Calendar management

Fetch a list of Calendars

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

Without params, it returns a list of Calendars 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

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 calendar identifier

namestring

Calendar display name

datastring

base64 encoded in iCalendar format

attributesobject

Custom calendar attributes

401Unauthorized

Unauthorized

Authorization

BasicAuthhttp (basic)
ApiKeyhttp (bearer)

Create a Calendar

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

Body

application/json
idinteger<int64>

Unique calendar identifier

namestring

Calendar display name

datastring

base64 encoded in iCalendar format

attributesobject

Custom calendar attributes

Response

OK

Response fields application/json
idinteger<int64>

Unique calendar identifier

namestring

Calendar display name

datastring

base64 encoded in iCalendar format

attributesobject

Custom calendar attributes

400Bad Request

Bad request

401Unauthorized

Unauthorized

Authorization

BasicAuthhttp (basic)
ApiKeyhttp (bearer)

Fetch a Calendar

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

Parameters

idintegerrequiredpath

Response

OK

Response fields application/json
idinteger<int64>

Unique calendar identifier

namestring

Calendar display name

datastring

base64 encoded in iCalendar format

attributesobject

Custom calendar attributes

401Unauthorized

Unauthorized

404Not Found

Not found

Authorization

BasicAuthhttp (basic)
ApiKeyhttp (bearer)

Update a Calendar

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

Body

application/json
idinteger<int64>

Unique calendar identifier

namestring

Calendar display name

datastring

base64 encoded in iCalendar format

attributesobject

Custom calendar attributes

Parameters

idintegerrequiredpath

Response

OK

Response fields application/json
idinteger<int64>

Unique calendar identifier

namestring

Calendar display name

datastring

base64 encoded in iCalendar format

attributesobject

Custom calendar attributes

400Bad Request

Bad request

401Unauthorized

Unauthorized

Authorization

BasicAuthhttp (basic)
ApiKeyhttp (bearer)

Delete a Calendar

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

Parameters

idintegerrequiredpath

Response

204No Content

No Content

401Unauthorized

Unauthorized

Authorization

BasicAuthhttp (basic)
ApiKeyhttp (bearer)