Notification
This section covers the API endpoints for managing notifications in the admin panel.
List Notifications
GET /v1/admin/notifications
Returns a paginated list of notifications and the count of unread notifications.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
per_page | integer | Number of items per page. Defaults to 10 |
Response
{
"success": true,
"message": "تم جلب البيانات بنجاح.",
"data": {
"number_of_notifications": "9+",
"notifications": {
"current_page": 1,
"data": [
{
"id": "13aa3780-cf82-406d-96b4-face9187e2c9",
"fullname": "omar Alakbri",
"icon": "https://sumaya369-production-media.s3.us-east-2.amazonaws.com/28786/3a486ae27338a94a1c8645f5350bb435.jpg",
"status": "unread",
"created_at": "قبل شهرين",
"message": "قام بإنشاء طلب جديد [حوالة بنكية] رقم 2501202556",
"title": "shazaabdrahman",
"type": "حواله بنكية"
},
{
"id": "37b537dd-4594-4c0f-92c7-051ea65bf8e5",
"fullname": "omar Alakbri",
"icon": "https://i.ibb.co/YhTw0wR/7-512.png",
"status": "unread",
"created_at": "قبل شهرين",
"message": "قام بإنشاء طلب جديد [حوالة بنكية] رقم 2501202542",
"title": "rosalinda",
"type": "حواله بنكية"
},
{
"id": "9a6b8684-12aa-4078-84ac-bf98bc2bc00b",
"fullname": "omar Alakbri",
"icon": "https://i.ibb.co/YhTw0wR/7-512.png",
"status": "unread",
"created_at": "قبل شهرين",
"message": "قام بإنشاء طلب جديد [حوالة بنكية] رقم 2501202540",
"title": "meriemsultana399",
"type": "حواله بنكية"
},
{
"id": "9696b028-252f-4c9d-8522-92dbd3728c60",
"fullname": "omar Alakbri",
"icon": "https://i.ibb.co/YhTw0wR/7-512.png",
"status": "unread",
"created_at": "قبل شهرين",
"message": "قام بإنشاء طلب جديد [حوالة بنكية] رقم 2501202538",
"title": "meriemsultana399",
"type": "حواله بنكية"
},
{
"id": "477d6f70-234b-4177-a6f1-d39512ac79a9",
"fullname": "omar Alakbri",
"icon": "https://i.ibb.co/YhTw0wR/7-512.png",
"status": "unread",
"created_at": "قبل شهرين",
"message": "قام بإنشاء طلب جديد [حوالة بنكية] رقم 2501202522",
"title": "sea_s_9",
"type": "حواله بنكية"
},
{
"id": "e7871a76-d505-4bd2-9b33-9b9c2ce378ac",
"fullname": "omar Alakbri",
"icon": "https://i.ibb.co/YhTw0wR/7-512.png",
"status": "unread",
"created_at": "قبل شهرين",
"message": "قام بإنشاء طلب جديد [حوالة بنكية] رقم 2501202500",
"title": "mesaq",
"type": "حواله بنكية"
},
{
"id": "6ac2f408-e9ad-42ab-bc14-d812fd6d9c7a",
"fullname": "omar Alakbri",
"icon": "https://sumaya369-production-media.s3.us-east-2.amazonaws.com/12120/Screenshot_2023-01-28-18-07-14-32_99c04817c0de5652397fc8b56c3b3817.jpg",
"status": "unread",
"created_at": "قبل شهرين",
"message": "قام بإنشاء طلب جديد [حوالة بنكية] رقم 2501202469",
"title": "mahdjouba_zina",
"type": "حواله بنكية"
},
{
"id": "ccbc58b1-6d1e-4bf4-a9b0-28d101c45cf7",
"fullname": "omar Alakbri",
"icon": "https://i.ibb.co/YhTw0wR/7-512.png",
"status": "unread",
"created_at": "قبل شهرين",
"message": "قام بإنشاء طلب جديد [حوالة بنكية] رقم 2501202440",
"title": "dhakermariem236",
"type": "حواله بنكية"
},
{
"id": "55319fcb-63d0-47f6-85fd-35cdb511e3c1",
"fullname": "omar Alakbri",
"icon": "https://i.ibb.co/YhTw0wR/7-512.png",
"status": "unread",
"created_at": "قبل شهرين",
"message": "قام بإنشاء طلب جديد [حوالة بنكية] رقم 2501202439",
"title": "marwa.sadeq",
"type": "حواله بنكية"
},
{
"id": "a5714579-2c3f-4e64-98f0-0187fc638879",
"fullname": "omar Alakbri",
"icon": "https://sumaya369-production-media.s3.us-east-2.amazonaws.com/10345/IMG_20230301_163541_754.jpg",
"status": "unread",
"created_at": "قبل شهرين",
"message": "قام بإنشاء طلب جديد [حوالة بنكية] رقم 2501202437",
"title": "asma.alihuse",
"type": "حواله بنكية"
}
],
"first_page_url": "http://192.168.0.139:8080/v1/admin/notifications?page=1",
"from": 1,
"last_page": 2183,
"last_page_url": "http://192.168.0.139:8080/v1/admin/notifications?page=2183",
"links": [
{
"url": null,
"label": "« السابق",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/notifications?page=1",
"label": "1",
"active": true
},
{
"url": "http://192.168.0.139:8080/v1/admin/notifications?page=2",
"label": "2",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/notifications?page=3",
"label": "3",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/notifications?page=4",
"label": "4",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/notifications?page=5",
"label": "5",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/notifications?page=6",
"label": "6",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/notifications?page=7",
"label": "7",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/notifications?page=8",
"label": "8",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/notifications?page=9",
"label": "9",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/notifications?page=10",
"label": "10",
"active": false
},
{
"url": null,
"label": "...",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/notifications?page=2182",
"label": "2182",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/notifications?page=2183",
"label": "2183",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/notifications?page=2",
"label": "التالي »",
"active": false
}
],
"next_page_url": "http://192.168.0.139:8080/v1/admin/notifications?page=2",
"path": "http://192.168.0.139:8080/v1/admin/notifications",
"per_page": 10,
"prev_page_url": null,
"to": 10,
"total": 21827
}
},
"status_code": 200
}
Update Notifications
PATCH /v1/admin/notifications
Mark notifications as read.
Request Body
| Parameter | Type | Description | Validation Rules |
|---|---|---|---|
ids | array | Array of notification UUIDs to mark as read | Required |
ids.* | string | UUID format | Required, uuid |
read_all | boolean | Mark all notifications as read | Optional |
Response
{
"success": true,
"message": "تم تحديث البيانات بنجاح.",
"data": null,
"status_code": 200
}
Delete Notifications
DELETE /v1/admin/notifications
Delete one or more notifications.
Request Body
| Parameter | Type | Description | Validation Rules |
|---|---|---|---|
ids | array | Array of notification UUIDs to delete | Required |
ids.* | string | UUID format | Required, uuid |
Response
{
"success": true,
"message": "تم حذف البيانات بنجاح.",
"data": null,
"status_code": 200
}
Authorization
All notification endpoints require authentication. The user can only access their own notifications.
Notes
- The unread notification count is capped at "9+" when there are more than 9 unread notifications
- Notifications are paginated with a default of 10 items per page
- The
read_allparameter in the update endpoint will mark all notifications as read regardless of theidsparameter