Skip to main content

Notice API

The Notice API provides ways for user get self's notifications.

Endpoints

# Endpoints


Notice page

獲取當前用戶通知分页

Request

POST /app/notice/page
{
"pagination": {
"page": 1,
"size": 3,
"totalItems": 1,
"totalPages": 1
},
"sortings": [
{
"property": "createdAt",
"direction": "DESC"
}
]
}

Response (NoticePageResp)

{
"success": true,
"message": "",
"data": [
{
"pagination": {
"page": 1,
"size": 10,
"totalItems": 3,
"totalPages": 1
},
"sortings": [
{
"direction": "DESC",
"property": "createdAt"
}
],
"items": [
{
"id": "b2be0e33-8f22-4a21-be9a-d97e133bc737",
"sendTime": "2024-06-17T17:19:45.731112",
"title": "加入計劃會員申請",
"content": "您已成功提交加入計劃會員申請,請耐心等待審核結果!",
"isRead": false,
"missionLink": 0
},
{
"id": "b2be0e33-8f22-4a21-be9a-d97e133bc737",
"sendTime": "2024-06-17T11:20:41.279588",
"title": "加入中心成功",
"content": "恭喜您!您已經成功加入中心!",
"isRead": false,
"missionLink": 0
},
{
"id": "b2be0e33-8f22-4a21-be9a-d97e133bc737",
"sendTime": "2024-06-14T15:30:15.38132",
"title": "您提交了切換地區申請",
"content": "您已提交了從地區【中西區】變更至地區【九龍城】的切換地區申請。",
"isRead": false,
"missionLink": 0
}
]
}
]
}

Get notice

標記通知已讀

Request

PUT /app/notice/{id}/read

Response

{
"success": true,
"message": "",
"data": null
}

Delete notice

刪除通知

Request

DELETE /app/notice/{id}

Response

{
"success": true,
"message": "",
"data": null
}

Read all notice

已讀所有通知

Request

PUT /app/notice/read-all

Response

{
"success": true,
"message": "",
"data": null
}

Has new notice

是否有新通知

Request

GET /app/notice/has-new

Response

{
"success": true,
"message": "",
"data": true
}


Resources

PaginationAndSorting

properties
  • pagination
    Pagination
    required
    The required pagination class.
  • sortings
    The list of fields to be sorted, the order of the elements matter as it will affect how to resource is sorted.

NoticePageResp

This class extends PaginationAndSorting

properties
  • id
    String
    required
    通知ID
  • sendTime
    datetime
    required
    發送時間
  • title
    String
    required
    標題
  • content
    String
    required
    內容
  • isRead
    boolean
    required
    是否已讀
  • missionLink
    MissionLink
    The in-app redirect link of the mission.

NoticeDTO

properties
  • id
    String
    required
    通知ID
  • title
    String
    required
    標題
  • content
    String
    required
    內容
  • createdTime
    datetime
    required
    創建時間