Push NotificationsNotification Endpoint
Hủy đăng ký Endpoint
Hủy đăng ký (soft-disable) endpoint nhận thông báo theo owner-scope.
Endpoint
POST /v1/notificationendpoints/unregister
Body Parameters
| Tên | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|
company_id | int | Có | ID công ty |
owner_type | int | string | Có | Loại chủ sở hữu (1/"user", 3/"customer", 5/"system") |
owner_id | int | Có | ID chủ sở hữu (User ID hoặc Customer ID) |
channel_type | int | Có | Loại kênh thông báo cần hủy (VD: 9 = Push) |
app_code | string | Có | Mã ứng dụng cần hủy đăng ký (VD: pos, web, app) |
Ví dụ JSON
{
"company_id": 10311,
"owner_type": 1,
"owner_id": 789,
"channel_type": 9,
"app_code": "pos"
}Response Schema
HTTP 200 - JSON Object
{
"status": "disabled",
"message": "Endpoint disabled"
}Nếu không tìm thấy endpoint ACTIVE phù hợp:
{
"status": "not_found",
"message": "No active endpoint found"
}Error Codes
| HTTP | Code | Mô tả |
|---|---|---|
| 422 | error_company_id_required | ID công ty không được để trống |
| 422 | error_owner_type_required | Loại chủ sở hữu không được để trống |
| 422 | error_owner_type_invalid | Loại chủ sở hữu không hợp lệ |
| 422 | error_owner_id_required | ID chủ sở hữu không được để trống hoặc phải > 0 |
| 422 | error_channel_type_required | Loại kênh không được để trống hoặc phải > 0 |
| 422 | error_app_code_required | Mã ứng dụng không được để trống |