/internal/notification/send-external
内部 API:按模板 code 渲染后投递 email/sms(不创建站内通知)。 供无用户上下文的路径使用:Trust Center 订阅确认/退订、状态页订阅双确认(A5/A6)。 受 InternalAPIKeyMulti + X-Tenant-ID 保护;locale 缺省 zh-CN。
请求参数
| 名称 | 位置 | 类型 | 必填 | 默认值 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|---|---|
X-Tenant-ID |
header |
string |
是 | 租户ID |
请求体
Schema: service-notification/internal/handler/dto.InternalSendExternalRequest
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
channel |
string |
是 | email |
||
recipient |
string |
是 | user@example.com |
||
template_code |
string |
是 | status_subscription_confirm |
||
locale |
string |
否 | en-US |
||
variables |
object |
否 | extra keys: `string` |
响应
| 状态 | 描述 | Schema |
|---|---|---|
| 200 | 已入队 | service-core/base/dto.SimpleResponse |
| 400 | 请求参数无效 | service-core/base/dto.SimpleResponse |
| 401 | 未提供有效的X-API-Key | service-core/base/dto.SimpleResponse |
| 404 | 模板未找到或未启用 | service-core/base/dto.SimpleResponse |
| 500 | 服务内部错误 | service-core/base/dto.SimpleResponse |
引用的 Schema
service-core/base/dto.SimpleResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
code |
integer |
否 | |||
message |
string |
否 | |||
timestamp |
string |
否 |