Notifications
Announcements
List published announcements and read one announcement by UUID.
Flow Summary
The current announcement flow is:
Step 1. Load the announcement feedGET /api/v1/announcement
Step 2. Open one announcementGET /api/v1/announcement/{uuid}
Treat these routes as protected in the current app setup.
Authorization: Bearer <access_token>
Language Behavior
- These handlers read
Accept-Language - Only exact
zhreturns the Chinesetitleandcontent - Any other value falls back to English
1. List Announcements
GET /api/v1/announcement
Returns the mobile user's visible announcement feed.
Current visibility rules
The repository only returns:
status = PUBLISHED- announcements currently inside the publish window, where:
start_at <= nowandend_at >= now, or- both
start_atandend_atare null
Then it applies audience rules:
ADMINannouncements withaudience_type = ALL_USERSare visible to everyone- If the current user has an
agent_id, the feed also includesAGENTannouncements for that agent where:audience_type = ALL_USERS, oraudience_type = SPECIFIC_USERSand the user is linked inannouncement_users
Important backend caveat
- The handler creates pagination metadata with
page = 1andlimit = 10 - It then binds query params into a filter DTO that has no
pageorlimitfields - In practice, the list is currently hard-fixed to page 1 with 10 items
- Even though the route comment says paginated, client-provided pagination params are ignored right now
Success response shape
{
"status_code": 200,
"message": "Success",
"data": [
{
"id": 7,
"uuid": "0d65f58d-47f6-43d7-84b2-4bdc8d44e391",
"type": "ADMIN",
"title": "System maintenance",
"content": "Scheduled maintenance will start tonight.",
"audience_type": "ALL_USERS",
"status": "PUBLISHED",
"small_image_url": "https://...",
"photo_urls": "https://...",
"large_image_url": "https://...",
"published_at": "2026-02-28T10:00:00Z",
"created_at": "2026-02-28T09:00:00Z",
"agent_id": 0
}
],
"metadata": {
"current_page": 1,
"limit": 10,
"total": 1
}
}
2. Get Announcement By UUID
GET /api/v1/announcement/{uuid}
Returns one announcement by UUID.
Important backend caveat
- The detail query currently loads by UUID only
- It does not re-check:
status = PUBLISHED- publish window
- agent visibility
- specific-user audience membership
- That means the detail endpoint is currently broader than the list endpoint
Response fields
The detail payload returns the localized title and content, plus:
typeaudience_typestatussmall_image_urlphoto_urlslarge_image_urlpublished_atcreated_atcreated_by_nameagent_id
Integration Notes
- Use the list endpoint for the app's announcement feed.
- Treat the detail endpoint carefully, because its current access rules are looser than the feed query.