Count of New Notifications Grouped
The GET /api/notifications/new endpoint returns a summary of new (unread) notifications for the currently authenticated user, grouped by notification category. Instead of returning full notification details, it delivers a lightweight count per group so the calling application can efficiently display badge counts or category indicators. This is useful for dashboards and navigation bars that need to signal pending items without loading full notification payloads.
Endpoint
GET /api/notifications/new
Authentication
Bearer token required. Obtain via:
POST https://api.banking.netevia.dev/api/auth/v2
Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.
When to use
Call this endpoint when rendering a notification badge or summary panel in the partner application. It provides a quick overview of how many new items are waiting in each category — such as general notifications, messages, campaigns, and cardholder agreement notices — without the overhead of fetching every notification record. Poll this endpoint periodically or after key events (e.g., after a transaction completes) to keep badge counts current.
Response
200 OK
Returns an array of objects, each representing one notification group and its unread count.
| Field | Type | Description |
|---|---|---|
group | string (enum) | Notification group type. One of: Notifications, Messages, Campaigns, CardholderAgreement |
count | integer (int32) | Number of new (unread) notifications in this group |
[
{
"group": "Notifications",
"count": 5
},
{
"group": "Messages",
"count": 2
},
{
"group": "Campaigns",
"count": 0
},
{
"group": "CardholderAgreement",
"count": 1
}
]Notification Group Types
| Group | Description |
|---|---|
Notifications | General account and transaction alerts (e.g., payment received, low balance) |
Messages | Direct communications from support or system notices |
Campaigns | Promotional or informational messages from Netevia or the partner |
CardholderAgreement | Pending cardholder agreements or policy updates requiring acknowledgment |
Error Codes
| Code | When it happens |
|---|---|
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions to access notification data |
| 500 | Internal server error |
Common Mistakes
- Not refreshing the Bearer token before calling this endpoint — tokens expire after 10 minutes and the request will return 401.
- Treating a missing group in the response as an error — if a group has zero new notifications, it may be omitted from the array entirely; handle absent groups as a count of zero.
- Expecting full notification content in the response — this endpoint returns counts only; use the full notifications list endpoint to retrieve notification details.
Related Endpoints
GET /api/notifications— Retrieve the full list of notifications with detailsPOST /api/notifications/{id}/read— Mark a specific notification as readPOST /api/auth/v2— Obtain a Bearer token for authenticationPOST /api/auth/refresh— Refresh an existing Bearer token
Example
curl -X GET https://api.banking.netevia.dev/api/notifications/new \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"