Aller au contenu principal

Notifications

Base path: /api/notifications

GET /notifications

Get notifications for the logged-in user.

Auth: Logged in

Query parameters:

ParameterTypeDescription
unread_onlybooleanUnread notifications only
typestringFilter by type prefix (e.g. booking)
pageintegerPage number
limitintegerItems per page

Response:

[
{
"id": 1,
"type": "booking.new",
"title": "New booking",
"message": "Booking for John Smith at 10:00",
"link": null,
"is_read": 0,
"created_at": "2026-03-24 10:00:00"
}
]

PUT /notifications/:id/read

Mark a notification as read.

Auth: Logged in


PUT /notifications/read-all

Mark all notifications as read.

Auth: Logged in


DELETE /notifications/:id

Delete a notification.

Auth: Logged in


Notification Preferences

GET /notifications/preferences

Get notification preferences.

PUT /notifications/preferences

Update notification preferences.

Request body: Object with notification type as key and channel preferences as value:

{
"booking.new": { "email": true, "push": true, "in_app": true },
"inventory.low_stock": { "email": false, "push": true, "in_app": true }
}

Notification Types

Type prefixDescription
booking.*Appointment-related
inventory.*Inventory-related
review.*Review-related
pos.*POS-related
campaign.*Campaign-related