In-App Notifications (The Bell)
Base URL:URL: http://localhost:8765/api/v1 (local) β https://dev.api. (staging)nextgate.com/nexgate.co/api/v1
Short Description
TheThisNotificationdocumentManagementisAPIONLYprovidesfora comprehensivethe in-app notificationsystembell β the π icon, its red badge, and the list thatallowsopensuserswhen you tap it. It is not about push notifications on the lock screen, email, SMS, or chat unread badges. Those are different systems; Part 0 tells you which one you need.v1.0 β verified end to
receive,endmanage,on staging on 2026-09-18: one account liked another's post, the owner's badge went from 0 to 1, andinteractthewithbellnotificationslistacrossshoweddifferent"joshdoeserviceslikedandyourshops.post" pointing at the right post. Every JSON sample below is a real staging response.
Short Description: Everything that happens to a user while they are not
looking β a like, a new follower, an order shipped, a ticket bought β is saved
as one row in their bell list. This API supportsreads creatingthat notifications,list, markingcounts unread rows for
the badge, marks rows read, and deletes them. The server also sends a live
notification.added event on the existing event stream so the badge moves
without the app polling.
Hints:
- Every endpoint needs
Authorization: Bearer <accessToken>. A user only ever sees their own rows β there is no way to read someone else's bell. - Pages start at 1, not 0.
page=0returns400 "Page index must not be less than zero". - The row's
titleis the whole sentence ("joshdoe liked your post").messageis an optional second line and is often an empty string. Never show an empty grey line. createdAtandreadAtcarry no timezone. They are UTC. AppendZbefore parsing, or "2 minutes ago" will be off by your offset.- Tapping a row opens
targetType+targetId. If your app does not know thetargetType, stay on the bell list. That rule is what lets the backend add new notification types without breaking old app versions (Part 3). - Ignore unknown keys inside
data. It carries values the server used to build the sentence; some of themasareread,internal.
Part 0 β Is this the right document?
| You are building⦠| System | Where |
|---|---|---|
| The π icon, its badge, the list of "X liked your post" rows | In-app notifications (this doc) | /api/v1/notifications/* + notification.added on /api/v1/events |
| A banner on the lock screen when the app is closed | Push (Firebase) | Not live yet. Needs the app to register its device token first β separate doc |
| Unread counts on chat threads | Chat | chatbox-api-doc.md β unread.changed |
| Email and SMS | Notification server | Nothing for the app to do |
The same event can reach a user through several of these at once. A like creates one bell row and, once push is live, one push. They are independent: reading the bell row does not clear the push, and vice versa.
Part 1 β How the bell works
somebody likes your post
β
βΌ
backend saves one row in YOUR bell list βββββββΊ row: isRead=false
β
βΌ
backend sends on /api/v1/events:
event: notification.added
data: {"type":"SOC_POST_LIKED","unreadCount":4}
β
βΌ
app sets the badge to 4 (no request needed)
if the bell list is open β refetch page 1
What the app does, screen by variousscreen
| Moment | Call | Why |
|---|---|---|
| App starts or comes back to the foreground | GET /notifications/unread-count |
The event stream was not connected while you were away; this is the truth |
notification.added arrives |
none β set the badge to unreadCount from the event |
The event already carries the new count |
| User opens the bell | GET /notifications/me?page=1&size=20 |
Newest first |
| User scrolls to the bottom | GET /notifications/me?page=2β¦ while hasNext is true |
|
| User taps a row | PUT /notifications/{id}/read, then open targetType/targetId |
Mark read first so the badge is right when they come back |
| "Mark all as read" button | PUT /notifications/read-all |
Then set the badge to 0 locally |
| Swipe to delete | DELETE /notifications/{id} |
|
| "Clear read" button | DELETE /notifications/read |
Removes every row already read |
Things the server does NOT tell you live
AuthenticationMarkingRequired:read sends no event.All endpoints under/notificationsrequire Bearer token authentication exceptIf the same user has the app open on a phone and a tablet and reads on one, the other keeps its old badge until it next calls. Call it whenever the app/notifications/in-unread-countendpointreturns to the foreground.Pagination:Deleting sends no eventListeither.endpointsUpdatesupportyourpaginationlist locally.
The live event
The bell rides the same stream the chat uses β GET /api/v1/events
(see chatbox-api-doc.md β "SSE stream" for connecting, reconnecting with
default , and page=1Last-Event-IDwhy size=20
| Event | Data | Meaning |
|---|---|---|
notification.added |
{"type": "SOC_POST_LIKED", "unreadCount": 4} |
A row was added to this user's bell. unreadCount is the |
type lets you do something special for a few types (100a requestssound perfor minutea pernew user)
Part 2 β The notification object
Every list and single-row endpoint returns rows in ISOthis 8601shape. formatReal withstaging localrow:
{
time| Field | Type | Description |
|---|---|---|
id |
UUID | The row. Use it to mark read or delete |
userId |
UUID | The owner β always the signed-in user |
shopId |
UUID / null | Set when the row is about one of the user's shops (new order, low stockβ¦) |
serviceId |
string | |
serviceType |
string | Which area of the app it belongs to β use it for filter tabs. See values |
targetType |
string | Which screen a tap opens. See Part 3 |
targetId |
string / null | The id that screen needs. null for screens that need none (e.g. WALLET) |
title |
string | The sentence to show. Always present |
message |
string | Optional second line (a snippet of the post, an amountβ¦). Often "" β hide the line when empty |
type |
string | The exact notification type, e.g. SOC_POST_LIKED, . 136 exist; new ones will be added. Do not switch on it for navigation β use targetType |
priority |
string | LOW, , MEDIUM, HIGH, URGENTHIGH/URGENT rows) |
isRead |
boolean | false until the user reads it |
data |
object | The values used to build the sentence. Useful for avatars (actor.name) or extra text. |
createdAt |
string | When it happened. ISO 8601, UTC, no offset |
readAt |
string / null | When it was marked read. UTC, no offset |
serviceType values
For filter tabs ("All", "Social", "Orders"β¦) and for endpoint 5.
| Value | Covers |
|---|---|
SOCIAL |
Likes, comments, follows, mentions, reposts |
CHAT |
Group invites, join requests, offers, missed calls, meetings |
LIVE |
Live streams and Spaces |
ORDER |
Orders you bought or sold |
SHOP |
Your shop: applications, stock, reviews, WhatsApp setup |
CART |
Items in your cart |
CHECKOUT |
Checkout sessions |
PAYMENT |
Payments made and received |
WALLET |
Wallet top-ups, balance, payouts |
INSTALLMENT |
Installment plans and dues |
GROUP_PURCHASE |
Group buying |
EVENT |
Events, tickets, bookings |
USER |
Your account: security, sessions, devices |
PROMOTIONAL |
Offers and announcements |
ADMIN |
Only admins ever receive these |
Part 3 β Where a tap goes (targetType)
Map each targetType you support to a screen, passing targetId when the
table says it carries one. Anything else β a targetType you have not
mapped, or CUSTOM / NONE β stays on the bell list, with the row marked
read. ExamplesNever includecrash and never show an error on an unknown value; the backend
adds new values over time.
targetType |
targetId is⦠|
Opens |
|---|---|---|
POST |
post id | The post |
COMMENT |
comment id | The comment, inside its post |
POLL |
poll id | The poll |
STREAM |
stream id | A live stream |
PROFILE |
account id | Somebody's profile |
FOLLOW_REQUESTS |
β | Pending follow requests |
REPORT_HISTORY |
β | The user's reports |
MODERATION_NOTICE |
report id | A moderation decision |
CONVERSATION |
conversation id | A chat thread |
CHAT_LIST |
β | The chat list |
GROUP_INVITES |
conversation id | Group invites |
GROUP_JOIN_REQUESTS |
conversation id | Join requests for a group you manage |
CALL |
call id | A call (e.g. missed-call details) |
MEETING |
meeting id | A meeting |
SPACE |
space id | A Space |
OFFER |
offer id | A personalised offer in chat |
SHOP_INBOX |
shop id | The shop's chat inbox |
ORDER |
order id | An order you bought |
SHOP_ORDER |
order id | An order your shop received |
ORDER_TRACKING |
order id | Delivery tracking |
CART |
β | The cart |
PRODUCT |
product id | A product |
INVENTORY |
shop id | The shop's stock screen |
DISPUTE |
dispute id | A dispute |
REVIEW |
review id | A review |
GROUP_PURCHASE |
group id | A group purchase |
AGREEMENT |
agreement id | An installment agreement |
SHOP |
shop id | A shop's public page |
SHOP_DASHBOARD |
shop id | Your shop's dashboard |
SHOP_APPLICATION |
shop id | Your shop application |
WABA_SETTINGS |
shop id | The shop's WhatsApp settings |
DOWNLOAD |
order id | Digital download for an order |
TRANSACTION |
transaction id | One transaction |
TRANSACTION_HISTORY |
β | All transactions |
CHECKOUT |
session id | A checkout session |
WALLET |
β | The wallet |
PAYOUT_SETTINGS |
β | Payout settings |
OTP_SCREEN |
β | The code entry screen |
EVENT |
event id | An event |
EVENT_DASHBOARD |
event id | Organiser's dashboard for an event |
EVENTS_LIST |
β | The events list |
TICKET |
ticket id | A ticket |
BOOKING |
booking id | A booking |
MY_BOOKINGS |
booking id | My bookings, scrolled to that booking |
CLAIM |
claim id | An organiser's fund claim |
SCANNER_MODE |
event id | The ticket scanner for an event |
EVENT_REVIEW |
event id | Review an event you attended |
HOME |
β | Home |
ONBOARDING |
β | Finish onboarding |
ACCOUNT_SETTINGS |
β | Account settings |
SECURITY_SETTINGS |
β | Security settings |
ACTIVE_SESSIONS |
β | Signed-in sessions |
CHAT_DEVICES |
β | Chat devices |
APPEAL_FORM |
β | Appeal a decision |
ADMIN_* (7 values) |
varies | Admin panel only β the consumer apps can treat these as unknown |
CUSTOM, |
β | Stay on the bell list |
If the target no longer exists (the post was deleted, for example), SHIPPING,the
screen's own endpoint returns PRODUCT404,. ACCOUNT
Standard Response Format
All API responses follow a consistent structure using our Globe Response Builder pattern:
Success Response Structure
{
"success": true,
"httpStatus": "OK",
"message": "Operation completed successfully",
"action_time": "2025-10-26T10:30:45"2026-09-18T19:23:04.211589898",
"data": {
// Actual response data goes here }
}
Error Response Structure
{
"success": false,
"httpStatus": "BAD_REQUEST",
"message": "Error description",
"action_time": "2025-10-26T10:30:45"2026-09-18T19:23:06.226159977",
"data": "Error description"
}
Standard Response Fields
| Field | Type | Description |
|---|---|---|
success |
boolean | Always true for successful operations, false for errors |
httpStatus |
string | HTTP status name (OK, BAD_REQUEST, NOT_FOUND, etc.) |
message |
string | Human-readable message describing the operation result |
action_time |
string | ISO 8601 timestamp of when the response was generated |
data |
object/string | Response payload for success, error details for failures |
Responses may also carry action and context (always null here) β ignore them.
The page object
Endpoints 1, 2, 5 and 6 return this inside data:
{
"notifications": [ /* notification objects, newest first */ ],
"currentPage": 1,
"pageSize": 20,
"totalElements": 1,
"totalPages": 1,
"hasNext": false,
"hasPrevious": false,
"isFirst": true,
"isLast": true
}
| Field | Description |
|---|---|
notifications |
The rows, newest first |
currentPage |
The page you asked for (starts at 1) |
pageSize |
Rows per page |
totalElements |
Rows across all pages |
totalPages |
Number of pages |
hasNext |
Ask for currentPage + 1 while this is true |
hasPrevious, isFirst, isLast |
Convenience flags |
New rows can arrive while the user scrolls, which shifts every later page by one. If you see the same
idtwice, keep one.
HTTP Method Badge Standards
For better visual clarity, all endpoints use colored badges for HTTP methods with the following standard colors:
- GET - GET - Green (Safe, read-only operations)
POSTPUT -Blue (Create new resources)- PUT - Yellow (
Update/replace entire resource)Update) - DELETE - DELETE - Red (Remove resources)
Endpoints
| # | Method | Path | Use it for |
|---|---|---|---|
| 1 | GET | /notifications/me |
The bell list |
| 2 | GET | /notifications/unread |
Only unread rows |
| 3 | GET | /notifications/unread-count |
The badge |
| 4 | GET | /notifications/summary |
Total / unread / read counts |
| 5 | GET | /notifications/service/{serviceType} |
A filter tab |
| 6 | GET | /notifications/shop/{shopId} |
A shop owner's shop notifications |
| 7 | GET | /notifications/{notificationId} |
One row |
| 8 | PUT | /notifications/{notificationId}/read |
Mark one read |
| 9 | PUT | /notifications/read |
Mark several read |
| 10 | PUT | /notifications/read-all |
Mark everything read |
| 11 | DELETE | /notifications/{notificationId} |
Delete one |
| 12 | DELETE | /notifications/batch |
Delete several |
| 13 | DELETE | /notifications/read |
Delete every read row |
1. GetList My Notifications
Purpose:Purpose: RetrieveThe allbell notificationslist β every row for the authenticatedsigned-in useruser, withread paginationand supportunread, newest first.
Endpoint:Endpoint: GET {base_url}/notifications/me
Access Level:Level: π Protected (Requires Bearer Token Authentication)
Authentication:Authentication: Bearer Token
Request Headers:
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer |
Query Parameters:
| Parameter | Type | Required | Description | Validation | Default |
|---|---|---|---|---|---|
| page | integer | No | Page number |
1 | |
| size | integer | No | 20 |
Success Response JSON Sample (staging, 2026-09-18):
{
"success": true,
"httpStatus": "OK",
"message": "Notifications retrieved successfully",
"action_time": "2025-10-26T10:30:45"2026-09-18T19:23:04.211589898",
"data": {
"notifications": [
{
"id": "123e4567-e89b-12d3-a456-426614174000"6e902bb6-9b38-49c6-825e-22b951f39584",
"userId": "987fcdeb-51a2-43d7-9c4e-123456789abc"02db7d92-b426-47b2-9171-cf15339c1376",
"shopId": "456e7890-e89b-12d3-a456-426614174001",null,
"serviceId": "ORD-2024-001"2b5f3f0c-6d6e-4c4a-a10a-34b622a1fc68",
"serviceType": "ORDER"SOCIAL",
"targetType": "POST",
"targetId": "2b5f3f0c-6d6e-4c4a-a10a-34b622a1fc68",
"title": "Orderjoshdoe Confirmed"liked your post",
"message": "Your order #ORD-2024-001 has been confirmed"",
"type": "SUCCESS"SOC_POST_LIKED",
"priority": "MEDIUM"LOW",
"isRead": false,
"data": { "orderId"actor": { "name": "ORD-2024-001"joshdoe" }, "amount": 150.00,
"currency"postId": "USD"2b5f3f0c-6d6e-4c4a-a10a-34b622a1fc68" },
"createdAt": "2025-10-26T09:15:30"2026-09-18T19:18:40.736493",
"readAt": null
}
],
"currentPage": 1,
"pageSize": 20,5,
"totalElements": 45,1,
"totalPages": 3,1,
"hasNext": true,false,
"hasPrevious": false,
"isFirst": true,
"isLast": falsetrue
}
}
Success Response Fields:
notifications | |
[] | |
message is "No | found".
|
Error Response JSON Sample (staging, page=0):
{
"success": false,
"httpStatus": "UNAUTHORIZED"BAD_REQUEST",
"message": "TokenPage hasindex expired"must not be less than zero",
"action_time": "2025-10-26T10:30:45"2026-09-18T19:23:06.226159977",
"data": "TokenPage hasindex expired"must not be less than zero"
}
Standard Error Types:
400 BAD_REQUEST:pageis 0 or negative401 UNAUTHORIZED: Token missing, invalid or expired
2. GetList Unread Notifications
Purpose:Purpose: RetrieveOnly onlyrows unreadwith notificationsisRead=false, newest first β for thean authenticated"Unread" usertab.
Endpoint:Endpoint: GET {base_url}/notifications/unread
Access Level:Level: π Protected (Requires Bearer Token Authentication)
Authentication:Authentication: Bearer Token
Request Headers
Query Parameters:
| Parameter | Type | Required | Description | Validation | Default |
|---|---|---|---|---|---|
| page | integer | No | Page number |
1 | |
| size | integer | No | 20 |
Success Response JSON Sample
: {
"success"true,identical "httpStatus":in "OK",shape "message":to "Notificationsendpoint retrieved1.
"action_time":Marking
"2025-10-26T10:30:45",a"data":row{read"notifications":removes[it{from"id":this"223e4567-e89b-12d3-a456-426614174002",list,"userId":so"987fcdeb-51a2-43d7-9c4e-123456789abc",every"shopId":laternull,page"serviceId":shifts"PAY-2024-050",up"serviceType":by"PAYMENT",one."title":If"PaymentyouPending",mark"message":rows"Yourreadpaymentwhile the user scrolls this tab, refetch from page 1 instead of asking fororderthe#ORD-2024-001next page.
Standard Error Types:
400 BAD_REQUEST:pageispending",0"type"or negative401 UNAUTHORIZED:"WARNING",Token"priority":missing,"HIGH",invalid"isRead":orfalse,expired
3. Get Unread Count
Purpose:Purpose: GetThe number on the total count of unread notifications for the authenticated userbadge.
Endpoint:Endpoint: GET {base_url}/notifications/unread-count
Access Level:Level: π Protected (Requires Bearer Token Authentication)
Authentication:Authentication: Bearer Token
Request Headers
Success Response JSON Sample (staging):
{
"success": true,
"httpStatus": "OK",
"message": "Unread count retrieved successfully",
"action_time": "2025-10-26T10:30:45"2026-09-18T19:23:05.489594598",
"data": { "unreadCount": 121 }
}
Success Response Fields:
| Field | Description |
|---|---|
| unreadCount | isRead=false. 99+ above 99 |
Call it when the app starts and every time it returns to the foreground. While
the app is open, notification.added keeps the badge current without calling
this.
Standard Error Types:
4. Get Notification Summary
Purpose:Purpose: GetTotal, a summary of all notifications including total, unread,unread and read counts in one call.
Endpoint:Endpoint: GET {base_url}/notifications/summary
Access Level:Level: π Protected (Requires Bearer Token Authentication)
Authentication:Authentication: Bearer Token
Request Headers
Success Response JSON Sample (staging):
{
"success": true,
"httpStatus": "OK",
"message": "Notification summary retrieved successfully",
"action_time": "2025-10-26T10:30:45"2026-09-18T19:23:04.820411225",
"data": { "total": 45,1, "unread": 12,1, "read": 330 }
}
Success Response Fields:
| Field | Description |
|---|---|
| total | |
| unread | isRead=false |
| read | total |
Standard Error Types:
5. Get NotificationsList by Shop
Area (serviceType)
Purpose:Purpose: RetrieveOne notificationsfilter filteredtab byβ ae.g. specificonly shopSOCIAL, or only ORDER.
Endpoint:Endpoint: GET {base_url}/notifications/shop/service/{shopId}serviceType}
Access Level:Level: π Protected (Requires Bearer Token Authentication)
Authentication:Authentication: Bearer Token
Request Headers
Path Parameters:
| Parameter | Type | Required | Description | Validation | |
|---|---|---|---|---|---|
| Yes | One of the |
Query Parameters:
| Parameter | Type | Required | Description | Validation | Default |
|---|---|---|---|---|---|
| page | integer | No | Page number |
1 | |
| size | integer | No | 20 |
Success Response JSON Sample
: {
"success"true,identical "httpStatus":in "OK",
"message": "Notifications retrieved successfully",
"action_time": "2025-10-26T10:30:45",
"data": {
"notifications": [
{
"id": "323e4567-e89b-12d3-a456-426614174003",
"userId": "987fcdeb-51a2-43d7-9c4e-123456789abc",
"shopId": "456e7890-e89b-12d3-a456-426614174001",
"serviceId": "PROD-2024-100",
"serviceType": "PRODUCT",
"title": "New Product Available",
"message": "A new product has been addedshape to yourendpoint shop",
"type": "INFO",
"priority": "LOW",
"isRead": true,
"data": {
"productId": "PROD-2024-100",
"productName": "Sample Product"
},
"createdAt": "2025-10-25T14:20:00",
"readAt": "2025-10-25T15:30:00"
}
],
"currentPage": 1,
"pageSize": 20,
"totalElements": 8,
"totalPages": 1,
"hasNext": false,
"hasPrevious": false,
"isFirst": true,
"isLast": true
}
}
6. Get Notifications by Service Type
Purpose: Retrieve notifications filtered by service type1
Endpoint:Standard Error Types:
400 BAD_REQUEST:pageis 0 or negative401 UNAUTHORIZED: Token missing, invalid or expired
6. List a Shop's Notifications
Purpose: For a shop owner β only the rows about one of their shops (new orders, low stock, reviewsβ¦).
Endpoint: GET {base_url}/notifications/service/shop/{serviceType}shopId}
Access Level:Level: π Protected (Requiresuse Beareronly Tokenfor Authentication)a shop the signed-in user owns)
Authentication:Authentication: Bearer Token
Request Headers
Path Parameters:
| Parameter | Type | Required | Description | Validation |
|---|---|---|---|---|
| Yes |
Query Parameters:
| Parameter | Type | Required | Description | Validation | Default |
|---|---|---|---|---|---|
| page | integer | No | Page number |
1 | |
| size | integer | No | 20 |
Success Response JSON Sample
: {
"success"true,identical "httpStatus":in "OK",shape "message":to "Notificationsendpoint retrieved1; successfully",every "action_time": "2025-10-26T10:30:45",
"data": {
"notifications": [
{
"id": "423e4567-e89b-12d3-a456-426614174004",
"userId": "987fcdeb-51a2-43d7-9c4e-123456789abc",
"shopId": "456e7890-e89b-12d3-a456-426614174001",
"serviceId": "ORD-2024-002",
"serviceType": "ORDER",
"title": "Order Shipped",
"message": "Your order #ORD-2024-002row has beenthis shipped",shopId.
Standard Error Types:
400 BAD_REQUEST:"SUCCESS",shopId"priority"is not a UUID, orpageis 0 or negative401 UNAUTHORIZED:"MEDIUM",Token"isRead":missing,false,invalid"data":or{expired
7. Get One Notification by ID
Purpose:Purpose: RetrieveFetch a single row β e.g. when the app opens from a link that carries a notification by its unique identifierid.
Endpoint:Endpoint: GET {base_url}/notifications/{notificationId}
Access Level:Level: π Protected (Requiresown Bearerrows Token Authentication)only)
Authentication:Authentication: Bearer Token
Request Headers
Path Parameters:
| Parameter | Type | Required | Description | Validation |
|---|---|---|---|---|
| notificationId | UUID | Yes |
Success Response JSON Sample:
{
"success": true,
"httpStatus": "OK",
"message": "Notification retrieved successfully",
"action_time": "2025-10-26T10:30:45"2026-09-18T19:23:04.211589898",
"data": { "id":/* "123e4567-e89b-12d3-a456-426614174000",one "userId":notification "987fcdeb-51a2-43d7-9c4e-123456789abc",object "shopId": "456e7890-e89b-12d3-a456-426614174001",
"serviceId": "ORD-2024-001",
"serviceType": "ORDER",
"title": "Order Confirmed",
"message": "Your order #ORD-2024-001 has been confirmed",
"type": "SUCCESS",
"priority": "MEDIUM",
"isRead": false,
"data": {
"orderId": "ORD-2024-001",
"amount": 150.00,
"currency": "USD"
},
"createdAt": "2025-10-26T09:15:30",
"readAt": null*/ }
}
Error Response JSON Sample (staging β a row that does not exist or is not yours):
{
"success": false,
"httpStatus": "NOT_FOUND",
"message": "Notification not found or access denied",
"action_time": "2025-10-26T10:30:45"2026-09-18T19:23:06.905963899",
"data": "Notification not found or access denied"
}
Standard Error Types:
8. Mark NotificationOne as Read
Purpose:Purpose: MarkCall when the user taps a single notification as readrow.
Endpoint:Endpoint: PUT {base_url}/notifications/{notificationId}/read
Access Level:Level: π Protected (Requiresown Bearerrows Token Authentication)only)
Authentication:Authentication: Bearer Token
Request Headers
Path Parameters:
| Parameter | Type | Required | Description | Validation |
|---|---|---|---|---|
| notificationId | UUID | Yes |
Success Response JSON Sample:
{
"success": true,
"httpStatus": "OK",
"message": "Notification marked as read",
"action_time": "2025-10-26T10:30:45"2026-09-18T19:25:00.000000000",
"data": null
}
Error
Marking Responsea JSONrow Samplethat
{is "success":already false,read "httpStatus":succeeds "NOT_FOUND",and "message":changes "Notificationnothing β safe to
retry. The badge is not foundsent back; subtract 1 locally.
Standard Error Types:
9. Mark Multiple NotificationsSeveral as Read
Purpose:Purpose: Mark multiplea notifications asselection read in aone single requestcall.
Endpoint:Endpoint: PUT {base_url}/notifications/read
Access Level:Level: π Protected (Requiresown Bearerrows Token Authentication)only)
Authentication:Authentication: Bearer Token
Request Headers
Request JSON Sample:
{
"notificationIds": [
"123e4567-e89b-12d3-a456-426614174000"6e902bb6-9b38-49c6-825e-22b951f39584",
"223e4567-e89b-12d3-a456-426614174002",
"323e4567-e89b-12d3-a456-426614174003"0c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f"
]
}
Request Body Parameters:
| Parameter | Type | Required | Description | Validation |
|---|---|---|---|---|
| notificationIds | array of UUID | Yes |
Success Response JSON Sample:
{
"success": true,
"httpStatus": "OK",
"message": "32 notification(s) marked as read",
"action_time": "2025-10-26T10:30:45"2026-09-18T19:25:00.000000000",
"data": null
}
All or nothing: if even one id is missing or belongs to someone else, no
row is changed and the call returns 400. Drop ids of rows you have deleted
before sending.
Error Response JSON Sample:
{
"success": false,
"httpStatus": "BAD_REQUEST",
"message": "Some notifications not found or access denied",
"action_time": "2025-10-26T10:30:45"2026-09-18T19:25:00.000000000",
"data": "Some notifications not found or access denied"
}
Standard Error Types:
400 BAD_REQUEST: A listed id is missing or not yours; nothing was changed401 UNAUTHORIZED: Token missing, invalid or expired422 UNPROCESSABLE_ENTITY:notificationIdsis empty
10. Mark All Notifications as Read
Purpose:Purpose: The "Mark all unread notifications for the authenticated user as readread" button.
Endpoint:Endpoint: PUT {base_url}/notifications/read-all
Access Level:Level: π Protected (Requires Bearer Token Authentication)
Authentication:Authentication: Bearer Token
Request Headers
Success Response JSON Sample:
{
"success": true,
"httpStatus": "OK",
"message": "All notifications marked as read",
"action_time": "2025-10-26T10:30:45"2026-09-18T19:25:00.000000000",
"data": null
}
Set the badge to 0 locally afterwards.
Standard Error Types:
11. Delete Notification( DON'T USE)
One
Purpose:Purpose: DeleteSwipe ato single notification permanentlydelete.
Endpoint:Endpoint: DELETE {base_url}/notifications/{notificationId}
Access Level:Level: π Protected (Requiresown Bearerrows Token Authentication)only)
Authentication:Authentication: Bearer Token
Request Headers
Path Parameters:
| Parameter | Type | Required | Description | Validation |
|---|---|---|---|---|
| notificationId | UUID | Yes |
Success Response JSON Sample:
{
"success": true,
"httpStatus": "OK",
"message": "Notification deleted successfully",
"action_time": "2025-10-26T10:30:45"2026-09-18T19:25:00.000000000",
"data": null
}
Error
Deleting Responsean JSON Sample
{
"success": false,
"httpStatus": "NOT_FOUND",
"message": "Notification not found or access denied",
"action_time": "2025-10-26T10:30:45",
"data": "Notification not found or access denied"
}
12. Batch Delete Notifications( DON'T USE)
Purpose:unread Deleterow multiplelowers notificationsthe inunread acount singleβ requestadjust the badge.
Deleted rows cannot be recovered.
Endpoint:Standard Error Types:
12. Delete Several
Purpose: Delete a selection in one call.
Endpoint: DELETE {base_url}/notifications/batch
Access Level:Level: π Protected (Requiresown Bearerrows Token Authentication)only)
Authentication:Authentication: Bearer Token
Request
Headers
This
Content- |
Request JSON Sample:
{
"notificationIds": [
"123e4567-e89b-12d3-a456-426614174000",
"223e4567-e89b-12d3-a456-426614174002",
"323e4567-e89b-12d3-a456-426614174003"6e902bb6-9b38-49c6-825e-22b951f39584"
]
}
Request Body Parameters:
| Parameter | Type | Required | Description | Validation |
|---|---|---|---|---|
| notificationIds | array of UUID | Yes |
Success Response JSON Sample:
{
"success": true,
"httpStatus": "OK",
"message": "1 notification(s) deleted successfully",
"action_time": "2026-09-18T19:25:00.000000000",
"data": null
}
All or nothing, like endpoint 9: one bad id and nothing is deleted.
Standard Error Types:
400 BAD_REQUEST: A listed id is missing or not yours; nothing was deleted401 UNAUTHORIZED: Token missing, invalid or expired422 UNPROCESSABLE_ENTITY:notificationIdsis empty
13. Delete All Read
Purpose: The "Clear read" button β removes every row already read. Unread rows stay.
Endpoint: DELETE {base_url}/notifications/read
Access Level: π Protected
Authentication: Bearer Token
Success Response JSON Sample:
{
"success": true,
"httpStatus": "OK",
"message": "3 notification(s) deleted successfully",
"action_time": "2025-10-26T10:30:45",
"data": null
}
Error Response JSON Sample
{
"success": false,
"httpStatus": "BAD_REQUEST",
"message": "Some notifications not found or access denied",
"action_time": "2025-10-26T10:30:45",
"data": "Some notifications not found or access denied"
}
13. Delete All Read Notifications( DON'T USE)
Purpose: Delete all read notifications for the authenticated user
Endpoint: DELETE {base_url}/notifications/read
Access Level: π Protected (Requires Bearer Token Authentication)
Authentication: Bearer Token
Request Headers
Success Response JSON Sample
{
"success": true,
"httpStatus": "OK",
"message": "15 read notification(s) deleted successfully",
"action_time": "2025-10-26T10:30:45"2026-09-18T19:25:00.000000000",
"data": 153
}
Success Response Fields:
| Field | Description |
|---|---|
| data |
The
14.badge Createdoes In-Appnot Notification(change DON'Tβ USE)
only Purpose:read Createrows awere new in-app notification (Internal service-to-service endpoint)removed.
Endpoint: POST {base_url}/notifications/in-app
Access Level: π Protected (Requires API Key or Service Authentication)
Authentication: API Key or Service Token
Request Headers
Request JSON Sample
{
"userId": "987fcdeb-51a2-43d7-9c4e-123456789abc",
"shopId": "456e7890-e89b-12d3-a456-426614174001",
"serviceId": "ORD-2024-001",
"serviceType": "ORDER",
"title": "Order Confirmed",
"message": "Your order #ORD-2024-001 has been confirmed and is being processed",
"type": "SUCCESS",
"priority": "MEDIUM",
"data": {
"orderId": "ORD-2024-001",
"amount": 150.00,
"currency": "USD",
"items": 3
}
}
Request Body Parameters
Success Response JSON Sample
{
"success": true,
"httpStatus": "OK",
"message": "Notification saved successfully",
"action_time": "2025-10-26T10:30:45",
"data": "123e4567-e89b-12d3-a456-426614174000"
}
Success Response Fields
Error Response JSON Sample
{
"success": false,
"httpStatus": "UNPROCESSABLE_ENTITY",
"message": "Validation failed",
"action_time": "2025-10-26T10:30:45",
"data": {
"userId": "must not be null",
"title": "must not be blank",
"message": "must not be blank"
}
}
Standard Error Types
Application-Level Exceptions (400-499)
:
Server-Level Exceptions (500+)
500 INTERNAL_SERVER_ERROR:Unexpected server errors
ErrorIntegration Response ExamplesChecklist
Bad
Request-
-Badge Generalloads from unread-count on app start and on every return to the foreground
-
notification.added on the existing /api/v1/events stream sets the badge from unreadCount β no second stream
- Pages start at 1; paging stops when
hasNext is false; duplicate ids are dropped
-
title is shown as the sentence; message line hidden when ""
-
createdAt parsed as UTC
- A tap marks the row read, then opens
targetType + targetId
- An unknown
targetType stays on the bell list β no crash, no error
- A
404 from the target screen shows that screen's "not available" state
- Badge adjusted locally after mark-read and delete (
400)
no unread-count on app start and on every return to the foregroundnotification.added on the existing /api/v1/events stream sets the badge from unreadCount β no second streamhasNext is false; duplicate ids are droppedtitle is shown as the sentence; message line hidden when ""createdAt parsed as UTCtargetType + targetIdtargetType stays on the bell list β no crash, no error404 from the target screen shows that screen's "not available" stateevent comes back)
{data type Unauthorized - Token Issues (401)
{
"success": false,
"httpStatus": "UNAUTHORIZED",
"message": "Token has expired",
"action_time": "2025-10-26T10:30:45",
"data": "Token has expired"
}
Forbidden - Access Denied (403)
{
"success": false,
"httpStatus": "FORBIDDEN",
"message": "Access denied: Insufficient permissions",
"action_time": "2025-10-26T10:30:45",
"data": "Access denied: Insufficient permissions"
}
Not Found (404)
{
"success": false,
"httpStatus": "NOT_FOUND",
"message": "Notification not found or access denied",
"action_time": "2025-10-26T10:30:45",
"data": "Notification not found or access denied"
}
Validation Error (422)
{
"success": false,
"httpStatus": "UNPROCESSABLE_ENTITY",
"message": "Validation failed",
"action_time": "2025-10-26T10:30:45",
"data": {
"userId": "must not be null",
"title": "must not be blank",
"serviceType": "must not be blank",
"priority": "must not be blank"
}
}
Quick Reference Guide
Common HTTP Status Codes
200: SuccessfulOK:OKGET/PUTrequest201 Created:Successful POST request204 No Content:Successful DELETE request400 BadRequest: Invalid request data (e.g.Request:page=0, an id that is not yours in a batch)401: Authentication required/failedUnauthorized:Unauthorized403 Forbidden:Insufficient permissions404 NotFound:Found:ResourceRow does notfoundexist or is not yours422 Unprocessable: Validation errors (emptyEntity:EntitynotificationIds)429 Too Many Requests:Rate limit exceeded500 Internal ServerError: Server errorError:
Authentication Types
- Bearer
Token:Token: IncludeAuthorization: Bearerin headersyour_token<accessToken>(for user endpoints) API Key:IncludeX-API-Key: your_keyin headers (for service-to-service endpoints)
Data Format Standards
Dates:DatesUse: ISO86018601,formatUTC without an offset (2025-10-26T14:30:00)2026-09-18T19:18:40.736493)IDs:IDsAll IDs use: UUIDformatstringsPagination:PaginationUses 1-based page numberingBoolean Fields:Use:trueor(falsepagenotfrom1/0)1) andsize; response carriescurrentPage,totalPages,hasNext
Notification Types
INFO:General informational notificationsWARNING:Warning or caution notificationsERROR:Error or failure notificationsSUCCESS:Success or confirmation notifications
Priority Levels
LOW:Low priority, can be checked laterMEDIUM:Normal priorityHIGH:High priority, needs attention soonURGENT:Urgent priority, requires immediate attention