انتقل إلى المحتوى الرئيسي

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/notifications

  • Method: GET

  • Success Response:

KeyTypeDescription
itemsArrayan array of objects containing information about each notification.
totalIntegerthe total number of notifications.
unread_countIntegerthe total number of unread notifications.
Notifications Resource

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/read

  • Method: POST

  • Success Response:

{
"code": 200,
"message": "Success",
"data": null,
"meta": []
}
معلومات

Check the following section to learn more about the Mark As Read Notification API Reference