Fleet setup

Notifications

User notifications management

Fetch a list of Notifications

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

Without params, it returns a list of Notifications 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 identifier for the notification

typestring

Notification category such as geofenceEnter or ignitionOn

descriptionstring | null

User-defined text describing the notification

alwaysboolean

Whether the notification triggers regardless of schedule

commandIdinteger<int64>

Identifier of the command to send when the notification triggers

notificatorsstring

Comma-separated delivery channels (for example, web, mail)

calendarIdinteger<int64>

Calendar identifier restricting when the notification is active

attributesobject

Additional custom attributes used by notificators or templates

401Unauthorized

Unauthorized

Authorization

BasicAuthhttp (basic)
ApiKeyhttp (bearer)

Create a Notification

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

Body

application/json
idinteger<int64>

Unique identifier for the notification

typestring

Notification category such as geofenceEnter or ignitionOn

descriptionstring | null

User-defined text describing the notification

alwaysboolean

Whether the notification triggers regardless of schedule

commandIdinteger<int64>

Identifier of the command to send when the notification triggers

notificatorsstring

Comma-separated delivery channels (for example, web, mail)

calendarIdinteger<int64>

Calendar identifier restricting when the notification is active

attributesobject

Additional custom attributes used by notificators or templates

Response

OK

Response fields application/json
idinteger<int64>

Unique identifier for the notification

typestring

Notification category such as geofenceEnter or ignitionOn

descriptionstring | null

User-defined text describing the notification

alwaysboolean

Whether the notification triggers regardless of schedule

commandIdinteger<int64>

Identifier of the command to send when the notification triggers

notificatorsstring

Comma-separated delivery channels (for example, web, mail)

calendarIdinteger<int64>

Calendar identifier restricting when the notification is active

attributesobject

Additional custom attributes used by notificators or templates

400Bad Request

Bad request

401Unauthorized

Unauthorized

Authorization

BasicAuthhttp (basic)
ApiKeyhttp (bearer)

Fetch a Notification

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

Parameters

idintegerrequiredpath

Response

OK

Response fields application/json
idinteger<int64>

Unique identifier for the notification

typestring

Notification category such as geofenceEnter or ignitionOn

descriptionstring | null

User-defined text describing the notification

alwaysboolean

Whether the notification triggers regardless of schedule

commandIdinteger<int64>

Identifier of the command to send when the notification triggers

notificatorsstring

Comma-separated delivery channels (for example, web, mail)

calendarIdinteger<int64>

Calendar identifier restricting when the notification is active

attributesobject

Additional custom attributes used by notificators or templates

401Unauthorized

Unauthorized

404Not Found

Not found

Authorization

BasicAuthhttp (basic)
ApiKeyhttp (bearer)

Update a Notification

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

Body

application/json
idinteger<int64>

Unique identifier for the notification

typestring

Notification category such as geofenceEnter or ignitionOn

descriptionstring | null

User-defined text describing the notification

alwaysboolean

Whether the notification triggers regardless of schedule

commandIdinteger<int64>

Identifier of the command to send when the notification triggers

notificatorsstring

Comma-separated delivery channels (for example, web, mail)

calendarIdinteger<int64>

Calendar identifier restricting when the notification is active

attributesobject

Additional custom attributes used by notificators or templates

Parameters

idintegerrequiredpath

Response

OK

Response fields application/json
idinteger<int64>

Unique identifier for the notification

typestring

Notification category such as geofenceEnter or ignitionOn

descriptionstring | null

User-defined text describing the notification

alwaysboolean

Whether the notification triggers regardless of schedule

commandIdinteger<int64>

Identifier of the command to send when the notification triggers

notificatorsstring

Comma-separated delivery channels (for example, web, mail)

calendarIdinteger<int64>

Calendar identifier restricting when the notification is active

attributesobject

Additional custom attributes used by notificators or templates

400Bad Request

Bad request

401Unauthorized

Unauthorized

Authorization

BasicAuthhttp (basic)
ApiKeyhttp (bearer)

Delete a Notification

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

Parameters

idintegerrequiredpath

Response

204No Content

No Content

401Unauthorized

Unauthorized

Authorization

BasicAuthhttp (basic)
ApiKeyhttp (bearer)

Fetch a list of available Notification types

GET
https://demo.traccar.org/api/notifications/types

Response

OK

Response fields application/json
Show child attributes
typestring

Notification type identifier

401Unauthorized

Unauthorized

Authorization

BasicAuthhttp (basic)
ApiKeyhttp (bearer)

Fetch a list of available Notificators

GET
https://demo.traccar.org/api/notifications/notificators

Parameters

announcementbooleanquery

When true, exclude notificators that cannot deliver announcements

Response

OK

Response fields application/json
Show child attributes
typestring

Notification type identifier

401Unauthorized

Unauthorized

Authorization

BasicAuthhttp (basic)
ApiKeyhttp (bearer)

Send test notification to current user via Email and SMS

POST
https://demo.traccar.org/api/notifications/test

Response

204No Content

Successful sending

400Bad Request

Could happen if sending has failed

Authorization

BasicAuthhttp (basic)
ApiKeyhttp (bearer)

Send a test notification to the current User using the specified notificator

POST
https://demo.traccar.org/api/notifications/test/{notificator}

Parameters

notificatorstringrequiredpath

Response

204No Content

Successful sending

400Bad Request

Could happen if sending has failed

Authorization

BasicAuthhttp (basic)
ApiKeyhttp (bearer)

Send a custom notification to selected users using the specified notificator

POST
https://demo.traccar.org/api/notifications/send/{notificator}

Body

application/json
subjectstring

Subject or title of the notification

digeststring

Short summary shown in compact contexts; defaults to the body when omitted

bodystringrequired

Full notification text

priorityboolean

Whether the message should be treated as high priority

Parameters

notificatorstringrequiredpath
userIdArray<integer>query

Optional list of user ids to send the notification to; if omitted, sends to all permitted users

Response

204No Content

Successful sending

400Bad Request

Could happen if sending has failed

Authorization

BasicAuthhttp (basic)
ApiKeyhttp (bearer)