สร้างข้อความแจ้งเตือนสำหรับเจ้าหน้าที่ในระบบทั้งหมด (ทีละหลายคน) อิงตามชื่อระบบที่ต้องการส่งถึง และเลือกระบุกลุ่มผู้ดูแลระบบหรือเจ้าหน้าที่ระบบ (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.
Bulk mark read all of this auth user 's notifications
There is no content to send for this request, but the headers may be useful.
curl --request POST \
--url https://dpt-api.finema.dev/notifications/read-all \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'There is no content to send for this request, but the headers may be useful.
สร้างข้อความแจ้งเตือนสำหรับ 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.