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

字段类型必填示例约束描述
code integer 否
data service-notification/internal/handler/dto.NotificationPreferencesResponse 否
message string 否
timestamp string 否

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