Seller Notifications API
Base URL: http://localhost:8000/api/v1
Prefix: /sellers/notifications
Auth: JWT Bearer token for an active seller
Headers: Content-Type: application/json
1. List Notifications
Retrieve the authenticated seller’s notification history.
/sellers/notifications/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
HTTP 200 OK
{
"success": true,
"message": "Notifications retrieved successfully.",
"data": {
"notifications": {
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": "b18c23d8-7c92-492f-96a4-2c5d6d9a4d10",
"title": "New rental application",
"body": "A customer submitted a rental application for Downtown Apartment.",
"type": "rental",
"reference_type": "rental",
"reference_id": "8d4b6d2e-1b7f-4a4b-8f2c-1efba83f9c91",
"is_read": false,
"read_at": null,
"created_at": "2026-09-14T10:00:00Z",
"updated_at": "2026-09-14T10:00:00Z"
}
]
}
}
}Notes
Returns only the logged-in seller’s notifications, newest first.
Default page size: 20.
Optional query parameters:
| Parameter | Example | Purpose |
|---|---|---|
page | 2 | Pagination |
is_read | false | Read/unread filter |
type | rental | Notification category |
Example:
GET {{base_url}}/sellers/notifications/?is_read=false&type=rental&page=1Valid types:
property, conversation, appointment, purchase, rental, auction, investment, payment, payout, support, system.
Invalid filters return HTTP 400. Invalid pages return HTTP 404.
Currently generated seller alerts cover:
-
Payout request submitted
-
Payout approved
-
Payout placed on hold
-
Payout released
-
Payout sent for processing
-
Payout paid
-
Payout failed
-
Payout canceled
-
Property approved
-
Property rejected
-
New purchase reservation
-
New rental application
-
Reservation payment submitted
-
Purchase payment submitted
-
Lease payment submitted
-
Payment verified
-
Payment rejected
-
Cash payment recorded
-
KYB approved
-
KYB rejected
-
New appointment request
-
Customer appointment rescheduled
-
Customer appointment canceled
-
New customer message
Seller notifications are generated only for business events relevant to the seller. Seller actions such as accepting, rejecting, or rescheduling their own appointments do not create self-notifications.
Notification References
| Type | Reference Type | Reference ID | Notification Usage |
|---|---|---|---|
property | property | Property UUID | Property approval or rejection |
purchase | purchase | Purchase UUID | New purchase reservation |
rental | rental | Rental application UUID | New rental application |
payment | payment | Payment UUID | Payment submitted, verified, rejected, or cash recorded |
system | kyb | Verification UUID | KYB approval or rejection |
appointment | appointment | Appointment UUID | Appointment request or customer changes |
conversation | conversation | Conversation UUID | New customer message |
payout | payout | Payout UUID | Payout request and payout status changes |
The frontend should route notifications using reference_type and reference_id:
-
property→ seller property details -
purchase→ seller purchase/reservation details -
rental→ seller rental application details -
payment→ seller payment details -
kyb→ seller KYB details -
appointment→ seller appointment details -
conversation→ seller conversation details -
payout→ seller payout details
The frontend should handle deleted or unavailable referenced records gracefully.
2. Unread Count
Retrieve the seller’s unread notification count.
/sellers/notifications/unread-count/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
HTTP 200 OK
{
"success": true,
"message": "Unread notification count retrieved successfully.",
"data": {
"unread_count": 5
}
}Notes
Counts only the logged-in seller’s unread notifications.
The count is independent of notification-list filters.
3. Notification Details
Retrieve one notification belonging to the seller.
/sellers/notifications/{notification_id}/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
HTTP 200 OK
{
"success": true,
"message": "Notification retrieved successfully.",
"data": {
"notification": {
"id": "b18c23d8-7c92-492f-96a4-2c5d6d9a4d10",
"title": "New rental application",
"body": "A customer submitted a rental application for Downtown Apartment.",
"type": "rental",
"reference_type": "rental",
"reference_id": "8d4b6d2e-1b7f-4a4b-8f2c-1efba83f9c91",
"is_read": false,
"read_at": null,
"created_at": "2026-09-14T10:00:00Z",
"updated_at": "2026-09-14T10:00:00Z"
}
}
}Notes
Viewing details does not mark the notification as read.
Missing notifications and notifications belonging to another user return HTTP 404.
4. Update Read State
Mark a notification as read or unread.
/sellers/notifications/{notification_id}/Auth: Required
Headers
Authorization: Bearer {{access_token}}
Content-Type: application/jsonRequest Body
{
"is_read": true
}Success Example
HTTP 200 OK
{
"success": true,
"message": "Notification updated successfully.",
"data": {
"notification": {
"id": "b18c23d8-7c92-492f-96a4-2c5d6d9a4d10",
"title": "New rental application",
"body": "A customer submitted a rental application for Downtown Apartment.",
"type": "rental",
"reference_type": "rental",
"reference_id": "8d4b6d2e-1b7f-4a4b-8f2c-1efba83f9c91",
"is_read": true,
"read_at": "2026-09-14T10:05:00Z",
"created_at": "2026-09-14T10:00:00Z",
"updated_at": "2026-09-14T10:05:00Z"
},
"unread_count": 0
}
}Notes
is_read is required.
Use false to mark the notification unread and clear read_at.
Repeating the current state preserves the timestamp and does not broadcast another event.
State changes broadcast notification.updated to the seller’s connected tabs or devices.
Invalid or missing is_read returns HTTP 400.
Missing or other-user notification IDs return HTTP 404.
5. Mark All Read
Mark all currently unread notifications belonging to the seller as read.
/sellers/notifications/read-all/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
HTTP 200 OK
{
"success": true,
"message": "Notifications marked as read successfully.",
"data": {
"updated": 5,
"unread_count": 0
}
}Notes
No request body is required.
Other sellers’ read states remain independent.
The server broadcasts notifications.read_all when records change.
New notifications can make the returned unread count nonzero.
6. Live Notification Connection
Receive notification events through WebSockets.
ws://localhost:8000/ws/sellers/notifications/?token={access_token}Auth: Required
Success Example
A new notification arrives as:
{
"type": "notification.created",
"notification": {
"id": "b18c23d8-7c92-492f-96a4-2c5d6d9a4d10",
"title": "New rental application",
"body": "A customer submitted a rental application for Downtown Apartment.",
"type": "rental",
"reference_type": "rental",
"reference_id": "8d4b6d2e-1b7f-4a4b-8f2c-1efba83f9c91",
"is_read": false,
"read_at": null,
"created_at": "2026-09-14T10:00:00Z",
"updated_at": "2026-09-14T10:00:00Z"
},
"unread_count": 1
}Notes
Use the server’s root URL without ``.
Use wss:// with HTTPS deployments.
The connection joins the authenticated seller’s private group automatically.
WebSocket events do not use the REST success/message/data envelope.
| Event | Payload |
|---|---|
notification.created | notification, unread_count |
notification.updated | Updated notification, unread_count |
notifications.read_all | read_at, updated, unread_count |
Read-all event example:
{
"type": "notifications.read_all",
"read_at": "2026-09-14T10:05:00+00:00",
"updated": 5,
"unread_count": 0
}Perform read/unread updates through REST. Sending client messages over this socket returns:
{
"type": "error",
"message": "Use REST APIs to update notifications."
}Invalid authentication or unavailable seller access closes the connection with code 4403.
Seller access is rechecked on incoming messages and outgoing events.
Notifications persist before broadcasting. Failed live delivery does not undo the saved notification.
After connecting or reconnecting, fetch history and unread count through REST. Missed events are not automatically replayed.
Deduplicate displayed notifications by ID.
Common Success Format
REST endpoints use:
{
"success": true,
"message": "Operation completed successfully.",
"data": {}
}Common Error Format
HTTP 400 — validation error:
{
"success": false,
"message": "Validation failed.",
"errors": {
"is_read": [
"This field is required."
]
}
}HTTP 401 — missing authentication:
{
"success": false,
"message": "Authentication credentials were not provided.",
"errors": {}
}Invalid or expired tokens also return HTTP 401 with token-specific error details.
HTTP 403 — insufficient permissions:
{
"success": false,
"message": "You do not have permission to perform this action.",
"errors": {}
}Non-seller, inactive, blocked, and deleted accounts cannot access these APIs.
HTTP 404 — missing or other-user notification:
{
"success": false,
"message": "Notification not found.",
"errors": {}
}Malformed JSON returns HTTP 400.
Unsupported methods return HTTP 405.
Unsupported request content types may return HTTP 415.