Notificaties
Base path: /api/notifications
GET /notifications
Notificaties ophalen voor de ingelogde gebruiker.
Auth: Ingelogd
Query parameters:
| Parameter | Type | Beschrijving |
|---|---|---|
unread_only | boolean | Alleen ongelezen notificaties |
type | string | Filter op type prefix (bijv. booking) |
page | integer | Paginanummer |
limit | integer | Items per pagina |
Response:
[
{
"id": 1,
"type": "booking.new",
"title": "Nieuwe boeking",
"message": "Boeking voor Jan de Vries om 10:00",
"link": null,
"is_read": 0,
"created_at": "2026-03-24 10:00:00"
}
]
PUT /notifications/:id/read
Notificatie als gelezen markeren.
Auth: Ingelogd
PUT /notifications/read-all
Alle notificaties als gelezen markeren.
Auth: Ingelogd
DELETE /notifications/:id
Notificatie verwijderen.
Auth: Ingelogd
Meldingsvoorkeuren
GET /notifications/preferences
Meldingsvoorkeuren ophalen.
PUT /notifications/preferences
Meldingsvoorkeuren bijwerken.
Request body: Object met notificatietype als key en kanaalvoorkeuren als waarde:
{
"booking.new": { "email": true, "push": true, "in_app": true },
"inventory.low_stock": { "email": false, "push": true, "in_app": true }
}
Notificatie types
| Type prefix | Beschrijving |
|---|---|
booking.* | Afspraak-gerelateerd |
inventory.* | Voorraad-gerelateerd |
review.* | Beoordeling-gerelateerd |
pos.* | Kassa-gerelateerd |
campaign.* | Campagne-gerelateerd |