Notifications
Get Notifications​
Provide an introduction to the List Notifications API, explaining its purpose and functionality. Highlight that the API allows customers to retrieve a list of notifications they have received.
Endpoint:
api/customer/notificationsMethod:
GETSuccess Response:
| Key | Type | Description |
|---|---|---|
items | Array | an array of objects containing information about each notification. |
total | Integer | the total number of notifications. |
unread_count | Integer | the total number of unread notifications. |
You can check more details about Notifications Resource.
{
"code": 200,
"data": {
"items": [
{
"title": "Order Created",
"body": "Your order #4072 is now Placed",
"title_ar": "تم الطلب",
"body_ar": "ØØ§Ù„Ù‡ طلبك رقم #4072 هي تم الطلب",
"type": 5,
"item_id": 4072,
"item_link": null,
"read": 1,
"image": null,
"name": "-",
"slug": "",
"created_at": "2023-06-26 11:52:55",
"user_id": 1031149,
"user_type": 1,
"details": null
},
//...
],
"total": 2,
"unread_count": 1
}
}
Check the following section to learn more about the Get Notifications API Reference
Mark As Read Notification​
The Notification Service API allows you to manage notifications within your application. This endpoint enables you to mark all notification as unread. By marking a notification as unread, you can indicate to the user that there are new or unread updates they need to review.
Endpoint:
api/customer/notifications/readMethod:
POSTSuccess Response:
{
"code": 200,
"message": "Success",
"data": null,
"meta": []
}
Check the following section to learn more about the Mark As Read Notification API Reference