OVIRO LogoOVIRO
Push NotificationsNotification Endpoint

Notification Endpoint Object Schema

Chi tiết các trường dữ liệu của một object `NotificationEndpoint`

JSON Schema

Trường (Field)Kiểu (Type)Mô tả (Description)
company_idintID công ty (tenant)
creator_idintID người tạo/cập nhật
idintID endpoint
owner_typeintLoại chủ sở hữu (1: User, 3: Customer, 5: System)
owner_idintID chủ sở hữu (User ID hoặc Customer ID)
channel_typeintLoại kênh thông báo
providerstringNhà cung cấp dịch vụ (VD: fcm, apns, telegram)
endpoint_valuestringGiá trị endpoint (FCM token, Telegram chat ID, v.v.)
app_codestringMã ứng dụng (VD: pos, web, app)
platformstringNền tảng thiết bị (VD: android, ios, web)
device_idstringUUID thiết bị
statusintTrạng thái (1: Active, 3: Disabled, 5: Invalid)
error_messagestringThông báo lỗi (nếu bị đánh dấu Invalid)
ip_addressstringĐịa chỉ IP lần đăng ký gần nhất
date_last_usedintThời gian sử dụng lần cuối (UNIX timestamp)
date_createdintThời gian tạo (UNIX timestamp)
date_modifiedintThời gian sửa (UNIX timestamp)

Enums

Owner Type

Giá trịKeyMô tả
1OWNER_TYPE_USERNhân viên / Người dùng hệ thống
3OWNER_TYPE_CUSTOMERKhách hàng
5OWNER_TYPE_SYSTEMHệ thống (webhook, bot)

owner_type hỗ trợ cả kiểu số (1, 3, 5) và chuỗi ("user", "customer", "system").

Channel Type

Giá trịKeyMô tả
1TYPE_EMAILEmail
3TYPE_ZNSZalo Notification Service
5TYPE_TELEGRAMTelegram Bot
7TYPE_SMSTin nhắn SMS
9TYPE_APP_PUSHPush Notification (FCM/APNs)

Status

Giá trịKeyMô tả
1STATUS_ACTIVEĐang hoạt động
3STATUS_DISABLEDĐã hủy đăng ký (soft-disable)
5STATUS_INVALIDToken không hợp lệ (bị từ chối bởi provider)

Ví dụ JSON object

{
  "company_id": 10311,
  "creator_id": 456,
  "id": 1001,
  "owner_type": 1,
  "owner_id": 789,
  "channel_type": 9,
  "provider": "fcm",
  "endpoint_value": "dGhpcyBpcyBhIGZjbSB0b2tlbg...",
  "app_code": "pos",
  "platform": "android",
  "device_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": 1,
  "error_message": "",
  "ip_address": "192.168.1.1",
  "date_last_used": 1740350000,
  "date_created": 1740300000,
  "date_modified": 1740320000
}

On this page