Notifications
All routes under /api/v1/notifications require authentication.
Notification Categories
| Category | Description |
|---|---|
stock | Low stock alerts |
credit | Credit payment reminders |
sales | Sales milestones |
ai | AI assistant messages |
system | System updates |
supplier | Supplier delivery notifications |
GET /notifications
List notifications with filtering.
Auth: Required
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
category | string | Filter by category |
unread | boolean | Only unread notifications |
page | int | Page number |
page_size | int | Items per page |
Response:
{
"success": true,
"data": {
"notifications": [
{
"id": "uuid",
"category": "stock",
"title": "Low Stock Alert",
"body": "Pepsi 500ml is below reorder point",
"link": "/inventory/products/uuid",
"is_read": false,
"created_at": "2024-01-15T10:00:00Z"
}
],
"unread_count": 5
}
}GET /notifications/unread-count
Get count of unread notifications.
Auth: Required
Response:
{
"success": true,
"data": {
"count": 5
}
}POST /notifications
Create a notification.
Auth: Required
Request Body:
{
"store_id": "uuid",
"category": "system",
"title": "System Update",
"body": "ZiadaPOS has been updated to version 2.0",
"link": "/settings"
}PATCH /notifications/read-all
Mark all notifications as read.
Auth: Required
PATCH /notifications/:id/read
Mark a single notification as read.
Auth: Required
DELETE /notifications/:id
Delete a notification.
Auth: Required