/admin/compliance/legal-documents/{legal_document_id}
更新协议文档业务字段(title/lang/content/effective_at);status 不可经此接口修改
请求参数
| 名称 | 位置 | 类型 | 必填 | 默认值 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|---|---|
legal_document_id |
path |
string |
是 | legal document ID |
请求体
Schema: service-compliance/internal/handler/dto.UpdateLegalDocumentRequest
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
content |
string |
否 | [{"title":"1. 引言","body":"..."}] |
||
effective_at |
string |
否 | 2026-06-10T00:00:00Z |
||
lang |
string |
否 | zh-CN |
||
title |
string |
否 | 更新后的服务条款 |
响应
| 状态 | 描述 | Schema |
|---|---|---|
| 200 | success | service-compliance/internal/handler/dto.LegalDocumentItemResponse |
| 400 | bad request | service-compliance/internal/handler/dto.ErrorResponse |
引用的 Schema
service-compliance/internal/handler/dto.ErrorResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
code |
integer |
否 | 400 |
||
message |
string |
否 | invalid request |
service-compliance/internal/handler/dto.LegalDocumentItem
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
content |
string |
否 | [{"title":"1. 引言","body":"..."}] |
||
doc_type |
string |
否 | terms |
||
effective_at |
string |
否 | 2026-06-09T00:00:00Z |
||
id |
string |
否 | 01JQ... |
||
lang |
string |
否 | zh-CN |
||
status |
string |
否 | published |
||
tenant_id |
string |
否 | |
||
title |
string |
否 | 服务条款 |
||
version |
string |
否 | v1 |
service-compliance/internal/handler/dto.LegalDocumentItemResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
code |
integer |
否 | |||
data |
service-compliance/internal/handler/dto.LegalDocumentItem |
否 | |||
message |
string |
否 | |||
timestamp |
string |
否 |