GET /notifications/preferences/{user_id}
获取指定用户的通知接收偏好,包括各渠道开关、免打扰时段等设置 参考:CAN-SPAM Act (15 U.S.C. §7701) — Commercial Email Compliance。
通知服务 `bearerAuth` application/json
请求参数
| 名称 | 位置 | 类型 | 必填 | 默认值 | 示例 | 约束 | 描述 |
user_id |
path |
string |
是 |
|
|
|
用户ID |
引用的 Schema
service-core/base/dto.SimpleResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
code |
integer |
否 |
|
|
|
message |
string |
否 |
|
|
|
timestamp |
string |
否 |
|
|
|
service-notification/internal/handler/dto.NotificationPreferencesDetailResponse
service-notification/internal/handler/dto.NotificationPreferencesResponse
用户通知偏好设置
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
channels |
object |
否 |
|
|
渠道设置 |
email_enabled |
boolean |
否 |
True |
|
邮件启用 |
push_enabled |
boolean |
否 |
True |
|
推送启用 |
quiet_hours |
object |
否 |
|
|
免打扰时段 |
sms_enabled |
boolean |
否 |
False |
|
短信启用 |
type_prefs |
object |
否 |
|
|
通知类型偏好 |
updated_at |
string |
否 |
2026-04-15T10:30:00Z |
|
更新时间 |
user_id |
string |
否 |
usr_abc123 |
|
用户ID |