Notifications
What are Notifications?
Section titled “What are Notifications?”Notifications are messages generated by the system to inform users about important events. Notifications are user-specific and are returned only for the currently authenticated user. Notifications can be triggered by various actions around the application and allows users to stay informed about relevant updates.
Structure of a Data Import request
Section titled “Structure of a Data Import request”Headers
Section titled “Headers”| Field | Type | Description | Required |
|---|---|---|---|
Authorization | string | Bearer token for authentication. | Yes |
Path parameters
Section titled “Path parameters”| Field | Type | Description | Required |
|---|---|---|---|
entity | string | Name or ID of the entity to import. | Yes |
Query parameters
Section titled “Query parameters”| Field | Type | Description | Required |
|---|---|---|---|
limit | number | Page size for notification list. | No |
page | number | Pagination page. | No |
read | boolean | Filter by read state. | No |
About the notifications
Section titled “About the notifications”Notification
Section titled “Notification”| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the notification. |
title | string | Short title of the notification. |
message | string | Detailed message of the notification. |
read | boolean | Whether the notification has been read. |
createdAt | string | Timestamp when the notification was created. |
unreadCount | number | Count of unread notifications (for unread count endpoint). |
updatedCount | number | Count of notifications marked as read (for read-all endpoint). |
Endpoints for managing Notifications
Section titled “Endpoints for managing Notifications”Get all notifications for the current user
Section titled “Get all notifications for the current user”Retrieve all notifications for the current user.
GET /api/v1/notificationsExample response:
{ "errors": [], "status": 200, "error": false, "message": "Notifications fetched", "data": [ { <Notification> } ], "pagination": { <Pagination> }}Get count of unread notifications for the current user
Section titled “Get count of unread notifications for the current user”Get count of unread notifications for the current user.
GET /api/v1/notifications/unread-countExample response:
{ "errors": [], "status": 200, "error": false, "message": "Unread count", "data": { "unreadCount": 0 }}Mark a notification as read
Section titled “Mark a notification as read”Mark a single notification as read.
PUT /api/v1/notifications/F0123456-7890-ABCD-EF00-00000000000/readExample response:
{ "errors": [], "status": 200, "error": false, "message": "Notification marked as read", "data": { "id": "F0123456-7890-ABCD-EF00-00000000000", "read": true }}Mark all unread notifications as read
Section titled “Mark all unread notifications as read”Mark all unread notifications as read.
PUT /api/v1/notifications/read-allExample response:
{ "errors": [], "status": 200, "error": false, "message": "All notifications marked as read", "data": { "updatedCount": 100 }}Delete a notification by ID
Section titled “Delete a notification by ID”Delete a notification by ID.
DELETE /api/v1/notifications/F0123456-7890-ABCD-EF00-00000000000Example response:
{ "errors": [], "status": 200, "error": false, "message": "Notification deleted", "data": { "id": "F0123456-7890-ABCD-EF00-00000000000" }}