Pagination notification messages list ของ user ที่ auth ++ เติม attr unread ด้วย
Signed 32-bit integers (commonly used integer type).
Signed 32-bit integers (commonly used integer type).
The request has succeeded.
curl --request GET \
--url https://dpt-api.finema.dev/notifications \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'{
"page": 1,
"total": 1,
"limit": 1,
"count": 1,
"items": [
{
"id": "c667df88-4de8-442b-a64a-5fbce59086f0",
"system": "dpt11",
"user_id": "…",
"title": "…",
"description": "…",
"url": "…",
"mark_read": false,
"created_at": "…",
"created_by_id": "…"
}
],
"unread": 1
}The request has succeeded.
สร้างข้อความแจ้งเตือนสำหรับเจ้าหน้าที่ในระบบทั้งหมด (ทีละหลายคน) อิงตามชื่อระบบที่ต้องการส่งถึง และเลือกระบุกลุ่มผู้ดูแลระบบหรือเจ้าหน้าที่ระบบ (call from backoffice auth by x-api-key)
ชื่อระบบที่ส่งข้อความแจ้งเตือน
ส่งหาผู้ดูแลระบบทุกคนหรือไม่?
ส่งหาเจ้าหน้าที่ระบบทุกคนหรือไม่?
The request has succeeded.
curl --request POST \
--url https://dpt-api.finema.dev/notifications/admin-broadcast \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: YOUR_TOKEN' \
--data '{
"system": "dpt11",
"notify_system_admins": true,
"notify_system_officers": true,
"title": "",
"description": "",
"url": ""
}'[
{
"id": "c667df88-4de8-442b-a64a-5fbce59086f0",
"system": "dpt11",
"user_id": "…",
"title": "…",
"description": "…",
"url": "…",
"mark_read": false,
"created_at": "…",
"created_by_id": "…"
}
]The request has succeeded.
สร้างข้อความแจ้งเตือนสำหรับ user ทั้งประชาชนและเจ้าหน้าที่ อิงตาม user_id ที่ต้องการส่งถึง (call from backoffice auth by x-api-key)
The request has succeeded.
curl --request POST \
--url https://dpt-api.finema.dev/notifications \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: YOUR_TOKEN' \
--data '{
"system": "dpt11",
"user_ids": [
""
],
"title": "",
"description": "",
"url": ""
}'[
{
"id": "c667df88-4de8-442b-a64a-5fbce59086f0",
"system": "dpt11",
"user_id": "…",
"title": "…",
"description": "…",
"url": "…",
"mark_read": false,
"created_at": "…",
"created_by_id": "…"
}
]The request has succeeded.