Skip to main content

Notifications

Notifications allow you to send/receive messages to/from other users of the platform.

The notifications Object​

Field NameTypeDescription
idintegerPrimary key of the notification.
timestampdatetimeTimestamp in ISO8601 when the notification was created.
statusstringCurrent status of the notification. One of "inbox", "archived".
recipientobjectUser that received the notification. Many-to-one relationship to users.
senderobjectUser that sent the notification, if any. Many-to-one relationship to users.
subjectstringSubject line of the message.
messagestringNotification's message content. Will be sent in the email.
collectionstringCollection this notification references.
itemstringPrimary key of the item this notification references.

List Notifications​

List all notifications that exist in TrackVision.

Request​

GET /notifications

SEARCH /notifications

If using SEARCH you can provide a query object as the body of your request.

Learn more about SEARCH ->

Query Parameters​

Supports all global query parameters.

Response​

An array of up to limit notification objects. If no items are available, data will be an empty array.

Example​

GET /notifications

SEARCH /notifications

Retrieve a notification​

List an existing notification by primary key.

Request​

GET /notifications/:id

Query Parameters​

Supports all global query parameters.

Response​

Returns the requested notification object.

Example​

GET /notifications/42

Create a Notification​

Create a new notification.

Request​

POST /notifications

Provide a notification object as the body of your request.

Query Parameters​

Supports all global query parameters.

Request Body​

A partial notification object.

Response​

Returns the notification object for the created notification.

Example​

POST /notifications

{
"recipient": "410b5772-e63f-4ae6-9ea2-39c3a31bd6ca",
"subject": "Hi there!"
}

Create Multiple Notifications​

Create multiple new notifications.

Request​

POST /notifications

Provide an array of notification objects as the body of your request.

Query Parameters​

Supports all global query parameters.

Request Body​

An array of partial notification objects.

Response​

Returns the notification object for the created notification.

Example​

POST /notifications

[
{
"collection": "trackvision_files",
"recipient": "410b5772-e63f-4ae6-9ea2-39c3a31bd6ca",
"message": "Hi there! You should check out these files"
},
{
"collection": "articles",
"recipient": "410b5772-e63f-4ae6-9ea2-39c3a31bd6ca",
"message": "Hi there! You should check out these articles"
}
]

Update a Notification​

Update an existing notification.

Email Notifications

Emails are only sent when the notification is created. Updated to an existing notification won't trigger a new notification email to be sent.

Request​

PATCH /notifications/:id

Provide a partial notification object as the body of your request.

Query Parameters​

Supports all global query parameters.

Request Body​

A partial notification object.

Response​

Returns the notification object for the updated notification.

Example​

PATCH /notifications/34

{
"message": "This is my updated notification"
}

Update Multiple Notifications​

Update multiple existing notifications.

Request​

PATCH /notifications

{
"keys": notification_id_array,
"data": partial_notification_object
}

Query Parameters​

Supports all global query parameters.

Request Body​

keys Required
Array of primary keys of the notifications you'd like to update.

data Required
Any of the notification object's properties.

Response​

Returns the notification objects for the updated notifications.

Example​

PATCH /notifications

{
"keys": [15, 64],
"data": {
"message": "Updated message!"
}
}

Delete a Notification​

Delete an existing notification.

Request​

DELETE /notifications/:id

Response​

Empty body.

Example​

DELETE /notifications/34

Delete Multiple Notifications​

Delete multiple existing notifications.

Request​

DELETE /notifications

Provide an array of notification IDs as your request body.

Request Body​

An array of notification primary keys

Response​

Empty body.

Example​

DELETE /notifications

[15, 251, 810]