/notifications

สร้างข้อความแจ้งเตือนสำหรับ user ทั้งประชาชนและเจ้าหน้าที่ อิงตาม user_id ที่ต้องการส่งถึง (call from backoffice auth by x-api-key)

Body
application/json
system
required
string enum
  • dpt11
  • dpt12
  • dpt13
  • dpt21
  • dpt22
  • dpt23
  • dpt31
  • dpt32
  • dpt51
  • dpt52
  • dpt53
  • dpt54
  • dpt55
  • dpt56
  • dpt6
  • dpt7
user_ids
required
array string[]
title
required
string
description
string
url
required
string uri
Responses
  • 200

    The request has succeeded.

POST/notifications
Shell cURL
curl --request POST \
  --url https://dpt-api.finema.dev/notifications \
  --header 'Content-Type: application/json' \
  --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": "…"
  }
]

/notifications

Pagination notification messages list ของ user ที่ auth ++ เติม attr unread ด้วย

Query Parameters
  • q
    string
  • limit
    integer int32

    Signed 32-bit integers (commonly used integer type).

  • page
    integer int32

    Signed 32-bit integers (commonly used integer type).

Responses
  • 200

    The request has succeeded.

GET/notifications
Shell cURL
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
}
0.0.0
OAS 3.0.0

Common API

Client Libraries
Shell
Ruby
Node.js
PHP
Python
C
More
Authentication
Bearer Authentication (BearerAuth)

/notifications

สร้างข้อความแจ้งเตือนสำหรับ user ทั้งประชาชนและเจ้าหน้าที่ อิงตาม user_id ที่ต้องการส่งถึง (call from backoffice auth by x-api-key)

Body
application/json
system
required
string enum
  • dpt11
  • dpt12
  • dpt13
  • dpt21
  • dpt22
  • dpt23
  • dpt31
  • dpt32
  • dpt51
  • dpt52
  • dpt53
  • dpt54
  • dpt55
  • dpt56
  • dpt6
  • dpt7
user_ids
required
array string[]
title
required
string
description
string
url
required
string uri
Responses
  • 200

    The request has succeeded.

POST/notifications
Shell cURL
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": "…"
  }
]