openapi: 3.1.0 info: title: klt-bos version: 0.1.0 description: | 恪澜通运营支撑扩展微服务(klt-bos)。 统一请求信封:`{ "data": { … } }`;统一响应信封:`{ code, message, error_code?, data }`。 业务错误码段 60000–60999(注意:2026-11-07 平台新口径:`60000` 以前平台已保留 ⇒ 原 20000–20999 **整体 +40000 平移**,块结构与段内顺位不变;这是第二次对外契约破坏性平移)。 本服务**产出**的数字码落在该段内;唯一在册例外=**鉴权失败类透传平台原码**: 未认证 `11000`、无权限 `11001`(业主 2026-11-07 裁定=不收段,含平台 SDK 鉴权闸门 在本进程内产出的响应,业务侧不得改写)。其余平台通用码(11100/11103/11104/10110) 仍由 `S` 段自造码承接,平台原码在 `message` 原文保留。 通用块 60000–60049(`S` 段):`KLT-S407`/60001 通用冲突、`KLT-S20002`/11000 未认证(透传)、 `KLT-S20003`/11001 无权限(透传)、`KLT-S20004`/60004 参数缺失或格式错误、`KLT-S20005`/60005 对象不存在、 `KLT-S20006`/60006 下游依赖失败、`KLT-S20007`/60007 内部错误、`KLT-S20008`/60008 功能未实现; 角色档拒绝 `KLT-P301`/60058(路由级 AC 已放行、但本服务 `require_roles` 细粒度角色档拦下, ⛔ 与网关授权层 `11001` 混用:`11001`=路由 catalog 未绑键/授权层拦下,`60058`=本服务角色档拒下); 设计口径码 `KLT-T2xx`(发号=第 1 册 07-业务错误码;`error_code`=代码,`code`=数字,与通用族 `KLT-S2xxxx` 并行且⛔ 混用): `KLT-T201`/60068 名称已存在(运营商/运营团队/运维团队名称在同一区域范围内重复,忽略大小写与首尾空白)、 `KLT-T216`/60095 负责范围与**同类**其他主体交叉(报文带对方名称+冲突区域/客户清单;异类可并存;内置「总部·不限区域」豁免)、 `KLT-T222`/60076 操作过于频繁(激活预校验与激活限流,⛔ 锁定账号)、 `KLT-T223`/60077 新密码不能与原密码相同、 `KLT-T224`/60089 同省份下已存在同品牌运营商档案(省份 × 品牌唯一)、 `KLT-T225`/60090 运营商档案的所属区域必须是省级节点(本码⛔ 挂其他档案,业主 D-OR-15 定案)、 `KLT-T226`/60091 合伙人名称全站唯一(⚠️ 数字 `60091` 在设计册 07 册登记给**未实现**的 `KLT-T215`「所挂运维团队不存在」⇒ 设计册数字归属待同步)、 `KLT-T227`/60096 负责范围同请求内祖先+子孙混选(整单⛔ 落库)。 ⚠️ 设计册在册但本服务**无抛点**(⇒ ⛔ 进上表、⛔ 挂 `x-error-codes`,否则契约谎称会下发):`KLT-T202`/60069、`KLT-T203`/60070、`KLT-T211`/60071、`KLT-T212`/60072、`KLT-T213`/60073、`KLT-T214`/60074、`KLT-T215`/60091(`error.rs` 无该变体);`KLT-T221`/60075(`error.rs` 只声明变体,业务链路⛔ 抛出)。 注意:`KLT-*` 字符串不随段位改名(对外稳定契约)⇒ 字符串内嵌数字与 `code` 已脱钩。 成功码沿用平台统一值 10000。调用方断言**只绑** `error_code`(`KLT-*`),不绑数字顺位。 判权/判成功口径(RG-12 裁定):本服务经网关**一律以 HTTP 200 返回、结果只体现在信封 `code`**, 调用方⛔ 据 HTTP 状态判成败/判权限;权限拒绝按层取码——授权/认证层 `11001`、本服务角色档 `60058`。 经网关对外前缀:`/api/klt/klt-bos/{resource}/{action}@v1`(本文件路径不含 namespace 前缀; 前缀口径=注册中心 `services/registry.rs:707` `format!("/api/{namespace}/{service_name}{path}")`, ⇒ namespace=`klt` + service_name=`klt-bos`。注意:此前写成的 `/api/klt/bos/` 系**前缀漂移**, 若本服务以 `prefix_mode=strip_prefix` 注册会被剥掉一段而全链路 404(平台 v1.5 件 §2.4)。) 分页约定:请求页码 0 基;呈现时再转为 1 基。 x-error-code-range: start: 60000 end: 60999 servers: - url: / tags: - name: 系统健康 description: 服务存活与状态探测,不含业务写操作。 - name: 认证与激活 description: 当前登录上下文查询;免登录的激活码校验与密码设置。 - name: 区域管理 description: 区域树节点新建、改名、删除与可见范围查询。 - name: 账号管理 description: 账号开通、状态、激活码、改密与客户分账号。 - name: 运营商 description: 运营商建档与对账账号。 - name: 合伙人 description: 合伙人建档、负责范围读写。 - name: 运营团队 description: 运营团队(ent_team)档案、成员与负责范围。 - name: 运维团队与成员 description: 运维团队建档、成员、分派方式、覆盖客户与成员范围。 - name: 客户管理 description: 客户建档、改挂区域、归属变更与变更历史。 - name: 批量导入 description: 客户批量导入模板、提交、批次、续传与导出。 - name: 交付现状 description: 在册资源一览与导出(讨论稿§7.7:客户详情页签、订阅详情当前资源、门户摘要三处共用台账取数) - name: 套餐档位 description: 固定/自定义套餐档位维护。 - name: 合同 description: 合同新建、编辑与查询(含服务条目与 IP 条件)。 - name: 订阅 description: 订阅开通、升降配、叠加与查询。 - name: 成本与分成 description: 成本项定义、成本金额与分成规则。 - name: 运维视图 description: 运维侧只读首页概览。 - name: 定时作业 description: 已注册作业清单、启停、执行记录与补跑。 - name: 工单与开停交付 description: 工单列表/详情/分派/回填/终态/材料与闭环配置(第5册§6) - name: 竣工与回执 description: 竣工回传文件生成与运营商回执确认(第5册§6.5) - name: 报文人工处置 description: 运营商报文待处置队列、挂接并生效、作废、冲突确认与改挂(第5册§6.6) paths: /health: get: summary: 健康检查 description: 服务存活探测,无需登录。 operationId: health tags: - 系统健康 x-require-auth: false x-resource-type: $ref: '#/components/x-resource-types/health/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data /health@v1: get: summary: 健康检查(v1) description: 服务存活探测,无需登录。 operationId: health_v1 tags: - 系统健康 x-require-auth: false x-resource-type: $ref: '#/components/x-resource-types/health/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data /ping@v1: get: summary: 存活探测 description: 需登录的轻量探测,返回服务状态与绑定信息。 operationId: ping tags: - 系统健康 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ping/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data /auth/context@v1: get: summary: 当前登录上下文 description: 返回当前登录身份、业务角色、主体类型/ID、可见形态等;首次业务请求在此完成未激活/已过期拦截。 operationId: auth_context tags: - 认证与激活 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/auth/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data /region/create@v1: post: summary: 新建区域节点 description: 在区域树下新建省/市/区县节点。admin 任意层级;区域运营主/子账号仅限本团队负责范围内已有省份下建市/区县。 operationId: region_create tags: - 区域管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/region/code' x-action: $ref: '#/components/x-actions/create/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 新建区域参数 properties: parent_node_id: type: string description: 父节点 ID,必填;区域树根由平台建立,业务侧不自行挂根 node_name: type: string description: 本级区域名称,同父唯一 level: type: string enum: [省, 市, 区县] description: 业务侧自持层级,必填且不得按平台 depth 推导 required: - parent_node_id - node_name - level required: - data x-error-codes: [60058, 60059, 60060, 60063, 60087] responses: "200": description: 成功。统一信封 code/message/data /region/rename@v1: post: summary: 重命名区域节点 description: 仅修改节点名称 node_name,不改层级与父子关系。 operationId: region_rename tags: - 区域管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/region/code' x-action: $ref: '#/components/x-actions/update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: node_id: type: string description: 区域节点 ID node_name: type: string description: 新名称 required: - node_id - node_name required: - data x-error-codes: [60058, 60060, 60063] responses: "200": description: 成功。统一信封 code/message/data /region/delete@v1: post: summary: 删除区域节点 description: 仅 admin。须提交 confirm_name(与当前区域名逐字一致)并通过三重守卫(无下级/无挂载客户/无引用)。 operationId: region_delete tags: - 区域管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/region/code' x-action: $ref: '#/components/x-actions/delete/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: node_id: type: string description: 待删除区域节点 ID confirm_name: type: string description: 确认名称,须与当前区域名逐字一致 required: - node_id - confirm_name required: - data x-error-codes: [60058, 60063] responses: "200": description: 成功。统一信封 code/message/data /region/tree@v1: post: summary: 查询可见区域树 description: 按操作人可见范围返回区域节点集合/树;运营主/子账号只见本范围及下级。注意:2026-11-08 由 GET 改 POST(R-5:GET 无请求体,网关无法注入授权上界)。 operationId: region_tree tags: - 区域管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/region/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog x-enumeration-kind: tree requestBody: required: true description: 统一信封请求体(无业务参数,data 传空对象以使网关注入授权上界) content: application/json: schema: type: object properties: data: type: object description: 无业务参数 required: - data x-error-codes: [60063] responses: "200": description: 成功。统一信封 code/message/data /region/subtree@v1: post: summary: 查询区域子树 description: 挂载弹窗左树、区域钻取共用;按可见范围裁剪。 operationId: region_subtree tags: - 区域管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/region/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog # 工单回件 §5.2 B1(2026-11-08):operation 级 x-enumeration-kind 是作者侧唯一的真源列举标记, # 注册中心折叠为 scope_config.POST.source_enumeration 后 AC 才回传授权上界、网关才注入 # (手写 x-scope.source_enumeration 会被注册中心拒,registry.rs:510-528)。 # 标 tree 的依据:本路由可见集=区域资源树授权子集——handler 已消费通道② # (region.rs tree_inner → ScopedSelect::visible_region_node_ids,scoped_select.rs:120 优先取 # 网关注入实例)。注意:2026-11-08 R-5 裁决:同源 /region/tree@v1 已由 GET 改 POST 并同样标 # tree(GET 无请求体,网关无法注入授权上界;改 POST 后 data 传空对象即可触发注入)。 x-enumeration-kind: tree requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 子树查询参数 properties: node_id: type: string description: 根节点 ID(可选;空则按可见根展开) required: - data x-error-codes: [60063] responses: "200": description: 成功。统一信封 code/message/data /region/change_log@v1: get: summary: 区域变更流水 description: 仅 admin 可见;运营子账号可见节点但不可见变更流水。 operationId: region_change_log tags: - 区域管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/region/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [60058, 60063] responses: "200": description: 成功。统一信封 code/message/data /region/orphans@v1: post: summary: 悬空区域节点 description: 查询悬空/孤儿节点;按节点所在区域分派可见性,admin 全量。注意:2026-11-08 由 GET 改 POST(R-5)。 operationId: region_orphans tags: - 区域管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/region/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog x-enumeration-kind: tree requestBody: required: true description: 统一信封请求体(无业务参数,data 传空对象以使网关注入授权上界) content: application/json: schema: type: object properties: data: type: object description: 无业务参数 required: - data x-error-codes: [60063] responses: "200": description: 成功。统一信封 code/message/data /account/get_list@v1: post: summary: 成员账号列表 description: 列登录名/手机号(掩码)/角色/主体/主-子账号标记/启停状态,并下发激活码生命周期(交付、激活、设密时间与有效截止日)。`status`=账号启停(`bos_user_binding.status`),`activation_status`=激活态(`bos_account_ext.status`),两者正交。运维侧全量,团队侧限本团队成员。注意:「姓名」列无数据源(`bos_user_binding` 无该列),见总则§18.3。 operationId: account_get_list tags: - 账号管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/account/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: false description: 分页与过滤(page/page_size/keyword/role_code/subject_type/subject_id/status/activation_status),业务字段置于 data content: application/json: schema: type: object x-error-codes: [60001, 60053, 60054, 60077, 60082] responses: "200": description: 成功。统一信封 code/message/data /ent_team/get_list@v1: post: summary: 运营团队列表 description: 一条团队带负责人登录名、成员数与成员明细(`members[]`,含 `name`/`display_name`/`username`、账号启停 `binding_status` 与可承接工单类型 `ticket_types`,主/子账号一并下发);仅 admin/opsMain/opsSub。 operationId: ent_team_get_list tags: - 运营团队 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ent_team/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: false description: 分页与过滤(page/page_size/keyword),业务字段置于 data content: application/json: schema: type: object x-error-codes: [60053, 60054, 60068] responses: "200": description: 成功。统一信封 code/message/data /ops_team/get_list@v1: post: summary: 运维团队列表 description: 一页列出全部团队,带可分配工单类型、成员数与派单/结算口径。两列负载(未完成工单/超期未完成)与成员级 open_tickets 均已内联真值(批量一次算全部团队);取数失败才回 null+顶层 load_pending/member_load_pending,不回落 0。 operationId: ops_team_get_list tags: - 运维团队 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ops_team/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: false description: 分页与过滤(page/page_size/keyword/region_node_id),业务字段置于 data content: application/json: schema: type: object x-error-codes: [60053, 60054, 60068, 60082] responses: "200": description: 成功。统一信封 code/message/data /audit/get_list@v1: post: summary: 审计日志检索 description: SC-04 六列(时间/操作人/操作类型/对象/变更前/变更后);时间倒序+(occurred_at,id) 游标,不用 OFFSET。数据取自 bos_audit_log,各业务写口(含 /audit/export@v1)均写留痕;响应附 audit_read_ready/audit_write_ready/cursor_usable 三个诚实标记。 operationId: audit_get_list tags: - 审计日志 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/audit/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: false description: 游标与检索条件(cursor/page_size/object_type/object_ref/actor_user_id/occurred_from/occurred_to/keyword),业务字段置于 data content: application/json: schema: type: object x-error-codes: [60053] responses: "200": description: 成功。统一信封 code/message/data /audit/export@v1: post: summary: 审计日志导出 description: 'SC-04 导出(第10册§6.3):入参与 /audit/get_list@v1 逐字同构(同一份 DTO、同一段可见范围谓词),不接受 row_ids[];CSV(UTF-8 带 BOM)首行为 `#` 说明行(导出时刻+筛选条件逐项回显+文件行数/同一谓词命中总数+范围裁剪声明);行数上限 20000,超限 KLT-R20903(detail.row_count/detail.limit)且不产文件、不写审计、不落 OSS;产出成功写 object_type=audit_export 留痕,留痕失败 KLT-S405。仅运营侧(admin/opsMain/opsSub)。' operationId: audit_export tags: - 审计日志 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/audit/code' x-action: $ref: '#/components/x-actions/export/code' x-version: v1 x-permission-visibility: catalog requestBody: required: false description: 与 /audit/get_list@v1 同构的筛选条件(cursor/page_size 不参与导出) content: application/json: schema: type: object x-error-codes: [60903, 60905] responses: "200": description: 成功。统一信封 code/message/data;data={file_name, oss_key, row_count, limit, truncated:false} /account/provision@v1: post: summary: 开通账号 description: 四入口共用开通管线。唯一性守卫(登录名/手机号)先于平台调用;角色与主体须一致。 operationId: account_provision tags: - 账号管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/account/code' x-action: $ref: '#/components/x-actions/create/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: username: type: string description: 登录名(归一化后全站唯一) role_code: type: string description: 业务角色码 subject_type: type: string description: 主体类型(operator/partner/ent_team/ops_team/customer 等) subject_id: type: string description: 主体 ID mobile: type: string description: 手机号(可选,唯一) required: - username - role_code - subject_type - subject_id required: - data x-error-codes: [60001, 60053, 60054, 60077, 60082] responses: "200": description: 成功。统一信封 code/message/data /account/update_status@v1: post: summary: 停用或恢复账号 description: 停用/恢复账号状态;不可操作当前登录账号。 operationId: account_update_status tags: - 账号管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/account/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: user_id: type: string description: 目标用户 ID status: type: string description: 目标状态(如 disabled/active) required: - user_id - status required: - data x-error-codes: [60001, 60053, 60054, 60077, 60082] responses: "200": description: 成功。统一信封 code/message/data /account/unbind@v1: post: summary: 注销/解绑账号 description: | 本地处置 `bos_user_binding`+`bos_account_ext`(与运营商删除级联同口径)。 平台 iam-user 删除类接口仅认 Bearer 用户令牌 ⇒ `platform_sync.applied=false` 诚实标记。 不可注销当前登录账号。档案删除/成员移出亦走同一级联。 operationId: account_unbind tags: - 账号管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/account/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: user_id: type: string description: 目标用户 ID required: - user_id required: - data responses: "200": description: 成功。统一信封 code/message/data /account/reset_code@v1: post: summary: 重置激活码 description: 仅未激活账号可重置;已激活拒绝。新码仅当次返回。 operationId: account_reset_code tags: - 账号管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/account/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: user_id: type: string description: 目标用户 ID required: - user_id required: - data x-error-codes: [60001, 60053, 60054, 60077, 60082] responses: "200": description: 成功。统一信封 code/message/data /account/export_codes@v1: post: summary: 导出激活码 description: | 导出未设密账号激活码明文。必传按本人可见范围收窄后的 user_ids(不得传空列表——平台侧空值=项目内全量); scope 一律服务端派生(`scope_type=end_user` +项目空间 ID),不收客户端的 scope_type/scope_id; validity 默认 `valid`(只读),`expired`/`all` 为写操作(对已过期行换新),不接受 `active`。 明文=调平台 `bootstrap_credential/export@v1`(项目服务授权主体 keypair),>200 人自动分片翻页。 **错误码(D-14/D-17)**:空/非法入参 `60004`;账号均未登记 `60005`;有登记但均不可见 `60108`/`KLT-C007`;角色无权 `60058`。 ⛔ 再用分成册 `60503`、⛔ 再借树节点 `S403`/`60066`。**读/写出参同一信封**:`export_mode`/`write_capability`/`reissued`/`kept`/`revoked`/ `audit_written`+`audit_note`;`items[].plaintext` 只随本次应答回显一次。 operationId: account_export_codes tags: - 账号管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/account/code' x-action: $ref: '#/components/x-actions/export/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: user_ids: type: array description: 按本人可见范围收窄后的用户 ID 列表(不可传空列表:平台侧空值=项目内全量导出) minItems: 1 items: type: string description: 用户 ID validity: type: string description: 导出口径(平台取值域):valid=仍有效(只读,缺省);expired=已过期(写);all=全部(写)。不接受 active——平台合法值是 valid,传 active 会被 60004 拒收(⛔ 透传平台 11103) default: valid enum: - valid - expired - all required: - user_ids required: - data x-error-codes: [60004, 60005, 60058, 60108] responses: "200": description: 成功。统一信封 code/message/data /account/change_password@v1: post: summary: 自助修改密码 description: 已登录用户修改本人密码;新旧相同不保存。 operationId: account_change_password tags: - 账号管理 x-require-auth: true # AC-05 明定「任何已登录角色」:不挂业务权限键(`bos.account.manage` 只授给运营侧)。 # 登录即可=复用所有人都在的 `bos.auth.view@v1`;「只改本人」由 handler 保证。 x-resource-type: $ref: '#/components/x-resource-types/auth/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: old_password: type: string description: 原密码 new_password: type: string description: 新密码 required: - old_password - new_password required: - data x-error-codes: [60001, 60053, 60054, 60055, 60077, 60082] responses: "200": description: 成功。统一信封 code/message/data /account/profile/update@v1: post: summary: 本人维护姓名 description: AC-05 个人资料;仅限本人。只写账号级自填姓名(bos_account_ext.display_name),不用于主体档案(客户联系人/运营商名/团队名归运营侧维护)。空串或 null=清除自填、回落到档案派生名;超 64 字符或含控制字符 ⇒ 60004。 operationId: account_profile_update tags: - 账号管理 x-require-auth: true # AC-05:任何已登录角色且仅限本人 ⇒ 登录即可,不挂业务权限键(`bos.account.manage` 会把客户等角色挡在网关)。 x-resource-type: $ref: '#/components/x-resource-types/auth/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: display_name: type: string maxLength: 64 description: 本人姓名;空串或 null=清除自填(回落到档案派生名) required: - data x-error-codes: [60004] responses: "200": description: 成功。统一信封 code/message/data /account/notify_pref@v1: get: summary: 读通知投递偏好 description: AC-06;只读本人三通道(站内/邮箱/短信)的 enabled/available/address_hint。站内恒开不可关;地址摘要一律脱敏。任何已登录角色。 operationId: account_notify_pref tags: - 账号管理 x-require-auth: true # AC-06:任何已登录角色只读本人;不挂业务权限键(06-接口清单「登录即可」)。 x-resource-type: $ref: '#/components/x-resource-types/auth/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data /account/notify_pref/save@v1: post: summary: 保存通知投递开关 description: AC-06;仅限本人(user_id 取登录上下文)。站内投递不可关闭(KLT-A004/60092);未绑定手机号不能开启短信(KLT-A005/60093)。关闭是合法动作、不发码。 operationId: account_notify_pref_save tags: - 账号管理 x-require-auth: true # AC-06:任何已登录角色且仅限本人 ⇒ 登录即可,不挂业务权限键。 x-resource-type: $ref: '#/components/x-resource-types/auth/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: inapp_enabled: type: boolean description: 站内投递开关;只接受 true/缺省,false ⇒ KLT-A004 mail_enabled: type: boolean description: 邮箱投递开关 sms_enabled: type: boolean description: 短信投递开关;无绑定手机号时 true ⇒ KLT-A005 required: - mail_enabled - sms_enabled required: - data x-error-codes: [60092, 60093] responses: "200": description: 成功。统一信封 code/message/data /account/notify_email@v1: post: summary: 本人维护通知投递邮箱 description: AC-06;仅限本人。空串=清空登记(合法动作);格式或长度不符 ⇒ KLT-A006/60094。不要求全站唯一。 operationId: account_notify_email tags: - 账号管理 x-require-auth: true # AC-06:任何已登录角色且仅限本人 ⇒ 登录即可,不挂业务权限键。 x-resource-type: $ref: '#/components/x-resource-types/auth/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: email: type: string maxLength: 254 description: 通知投递邮箱;空串或 null=清空登记 required: - data x-error-codes: [60094] responses: "200": description: 成功。统一信封 code/message/data /account/notify_email/set@v1: post: summary: 运营代办维护通知投递邮箱 description: AC-06;admin 全域、opsMain 负责范围内(opsSub 只读)。与本人自助口同一套格式校验(KLT-A006/60094),范围外按 11104 语义拒绝。 operationId: account_notify_email_set tags: - 账号管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/account/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: user_id: type: string description: 目标账号 ID email: type: string maxLength: 254 description: 通知投递邮箱;空串或 null=清空登记 required: - user_id required: - data x-error-codes: [60094] responses: "200": description: 成功。统一信封 code/message/data /activation/verify@v1: post: summary: 激活并设置密码 description: 免登录豁免接口。校验激活码后设置新密码;按来源 IP+码窗口限流,不设失败计数锁死。 operationId: activation_verify tags: - 认证与激活 x-require-auth: false x-resource-type: $ref: '#/components/x-resource-types/activation/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: code: type: string description: 激活码 new_password: type: string description: 新密码(建议不少于 8 位) minLength: 8 required: - code - new_password required: - data x-error-codes: [60006, 60076] responses: "200": description: 成功。统一信封 code/message/data /activation/precheck@v1: post: summary: 激活第 1 步预校验(登录名与激活状态) description: 免登录豁免接口。在设密步之前按登录名校验账号侧前置:已激活/已停用/未发码/已过期四类在第 1 步拦下;激活码明文仍由平台 bootstrap/consume 核销。 operationId: activation_precheck tags: - 认证与激活 x-require-auth: false x-resource-type: $ref: '#/components/x-resource-types/activation/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: login_name: type: string description: 登录名(平台定位账号的必填参数) code: type: string description: 激活码(仅作限流隔离键;码值由平台核销) required: - login_name required: - data x-error-codes: [60006, 60052, 60076, 60088] responses: "200": description: 成功。统一信封 code/message/data /operator/create@v1: post: summary: 新建运营商 description: 运营商建档。所属区域必须是省级节点;同省份×品牌唯一;可写结算口径。 operationId: operator_create tags: - 运营商 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/operator/code' x-action: $ref: '#/components/x-actions/create/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: name: type: string description: 运营商名称 brand: type: string description: 品牌:移动/联通/电信 region_node_id: type: string description: 建档区域节点 ID(必须省级) is_province_node: type: boolean description: 是否省级节点标记(服务端校验用,可选) settle_mode: type: string description: 结算方式:ratio=比例;amount=固定金额;per_account=每账号 enum: - ratio - amount - per_account settle_value: type: number description: 结算值:比例时 00 required: - name - brand - region_node_id required: - data x-error-codes: [60053, 60054, 60066, 60068, 60089, 60090] responses: "200": description: 成功。统一信封 code/message/data /operator/update@v1: post: summary: 编辑运营商 description: 编辑运营商档案;改品牌/省份不得绕过省份×品牌唯一与省级节点校验。 operationId: operator_update tags: - 运营商 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/operator/code' x-action: $ref: '#/components/x-actions/update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: operator_id: type: string description: 运营商 ID name: type: string description: 运营商名称 brand: type: string description: 品牌:移动/联通/电信 region_node_id: type: string description: 建档区域节点 ID(必须省级) is_province_node: type: boolean description: 是否省级节点标记(可选) settle_mode: type: string description: 结算方式:ratio/amount/per_account settle_value: type: number description: 结算值 row_version: type: integer description: 乐观锁版本(若启用) required: - operator_id - name - brand - region_node_id required: - data x-error-codes: [60053, 60054, 60066, 60068, 60089, 60090] responses: "200": description: 成功。统一信封 code/message/data /operator/delete@v1: post: summary: 删除运营商 description: 删除前六项检查并级联注销对账账号。 operationId: operator_delete tags: - 运营商 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/operator/code' x-action: $ref: '#/components/x-actions/delete/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: operator_id: type: string description: 运营商 ID required: - operator_id required: - data x-error-codes: [60053, 60054, 60066, 60068, 60089, 60090] responses: "200": description: 成功。统一信封 code/message/data /operator/get_list@v1: post: summary: 运营商列表 description: 卡片口径:建档区域或下挂客户落在本可见范围。 operationId: operator_get_list tags: - 运营商 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/operator/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 列表筛选参数 properties: page: type: integer description: 页码(0 基索引,默认 0) minimum: 0 default: 0 page_size: type: integer description: 每页条数(默认 20,上限 200) minimum: 1 maximum: 200 default: 20 keyword: type: string description: 关键字筛选(可选) brand: type: string description: 品牌筛选(可选) required: - data x-error-codes: [60053, 60054, 60066, 60068, 60089, 60090] responses: "200": description: 成功。统一信封 code/message/data /operator/recon_account/create@v1: post: summary: 创建对账账号 description: 一家运营商至多一个对账账号;初始密码仅当次显示。 operationId: operator_recon_account_create tags: - 运营商 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/operator_recon_account/code' x-action: $ref: '#/components/x-actions/create/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: operator_id: type: string description: 运营商 ID username: type: string description: 对账账号登录名 mobile: type: string description: 手机号(可选) required: - operator_id - username required: - data x-error-codes: [60053, 60054, 60066, 60068, 60089, 60090] responses: "200": description: 成功。统一信封 code/message/data /operator/recon_account/get@v1: post: summary: 查询对账账号 description: 只回状态提示(如「未发送,线下告知本人」),不回密码。 operationId: operator_recon_account_get tags: - 运营商 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/operator_recon_account/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: operator_id: type: string description: 运营商 ID required: - operator_id required: - data x-error-codes: [60053, 60054, 60066, 60068, 60089, 60090] responses: "200": description: 成功。统一信封 code/message/data /partner/create@v1: post: summary: 新建合伙人 description: 合伙人建档并同步开通账号;名称全站唯一;结算字段仅 admin 可写。 operationId: partner_create tags: - 合伙人 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/partner/code' x-action: $ref: '#/components/x-actions/create/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: name: type: string description: 合伙人名称(全站唯一) duty_desc: type: string description: 职务说明(可选) region_node_id: type: string description: 建档区域节点 ID mobile: type: string description: 手机号(可选) username: type: string description: 登录名(开通账号用) settle_mode: type: string description: 结算方式(仅 admin 可写,可选) settle_value: type: number description: 结算值(仅 admin 可写,可选) required: - name - region_node_id - username required: - data x-error-codes: [60053, 60054, 60091] responses: "200": description: 成功。统一信封 code/message/data /partner/update@v1: post: summary: 编辑合伙人 description: 编辑合伙人资料;登录名不可改。 operationId: partner_update tags: - 合伙人 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/partner/code' x-action: $ref: '#/components/x-actions/update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: partner_id: type: string description: 合伙人 ID name: type: string description: 合伙人名称(全站唯一) duty_desc: type: string description: 职务说明(可选) region_node_id: type: string description: 建档区域节点 ID mobile: type: string description: 手机号(可选) settle_mode: type: string description: 结算方式(仅 admin 可写,可选) settle_value: type: number description: 结算值(仅 admin 可写,可选) row_version: type: integer description: 乐观锁版本(若启用) required: - partner_id - name - region_node_id required: - data x-error-codes: [60053, 60054, 60091] responses: "200": description: 成功。统一信封 code/message/data /partner/delete@v1: post: summary: 删除合伙人 description: 删除合伙人档案及相关授权。 operationId: partner_delete tags: - 合伙人 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/partner/code' x-action: $ref: '#/components/x-actions/delete/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: partner_id: type: string description: 合伙人 ID required: - partner_id required: - data x-error-codes: [60053, 60054] responses: "200": description: 成功。统一信封 code/message/data /partner/get_list@v1: post: summary: 合伙人列表 description: 卡片口径:建档区域落在本范围(含下级)。 operationId: partner_get_list tags: - 合伙人 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/partner/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 列表筛选参数 properties: page: type: integer description: 页码(0 基索引,默认 0) minimum: 0 default: 0 page_size: type: integer description: 每页条数(默认 20,上限 200) minimum: 1 maximum: 200 default: 20 keyword: type: string description: 关键字筛选(可选) required: - data x-error-codes: [60053, 60054] responses: "200": description: 成功。统一信封 code/message/data /partner/scope/get@v1: post: summary: 读取合伙人负责范围 description: 返回该合伙人的 region/customer 两类 bos_data_scope。注意:2026-11-08 由 GET 改 POST(R-5,统一方法;本接口读 scope 表本身,不消费授权上界,故不标 x-enumeration-kind)。 operationId: partner_scope_get tags: - 合伙人 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/partner_scope/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: 统一信封请求体(无业务参数) content: application/json: schema: type: object properties: data: type: object description: 无业务参数 required: - data x-error-codes: [60053, 60054] responses: "200": description: 成功。统一信封 code/message/data /partner/scope/save@v1: post: summary: 保存合伙人负责范围 description: 写入 bos_data_scope(holder_type=partner);允许保存为空;保存即 bump epoch。同类合伙人区域子树/点客户不得交叉(KLT-T216);异类可并存。 operationId: partner_scope_save tags: - 合伙人 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/partner_scope/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: partner_id: type: string description: 合伙人 ID region_node_ids: type: array description: 负责区域节点 ID 列表(可空) items: type: string description: 区域节点 ID customer_ids: type: array description: 负责客户 ID 列表(可空) items: type: string description: 客户 ID required: - partner_id required: - data x-error-codes: [60053, 60054, 60095, 60096] responses: "200": description: 成功。统一信封 code/message/data /ent_team/create@v1: post: summary: 新建运营团队 description: 仅 admin。新建运营团队,负责范围初始为空。 operationId: ent_team_create tags: - 运营团队 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ent_team/code' x-action: $ref: '#/components/x-actions/create/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: team_name: type: string description: 团队名称 primary_username: type: string description: 主账号登录名(可选) primary_mobile: type: string description: 主账号手机号(可选) primary_name: type: string maxLength: 64 description: 主账号姓名(可选,落 `bos_account_ext.display_name`;下拉框按姓名选人,前端必填,未带=回落登录名) required: - team_name required: - data x-error-codes: [60053, 60054, 60068] responses: "200": description: 成功。统一信封 code/message/data /ent_team/update@v1: post: summary: 编辑运营团队 description: 仅 admin。编辑团队资料。 operationId: ent_team_update tags: - 运营团队 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ent_team/code' x-action: $ref: '#/components/x-actions/update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: team_id: type: string description: 团队 ID team_name: type: string description: 团队名称 row_version: type: integer description: 乐观锁版本(若启用) required: - team_id - team_name required: - data x-error-codes: [60053, 60054, 60068] responses: "200": description: 成功。统一信封 code/message/data /ent_team/delete@v1: post: summary: 删除运营团队 description: 仅 admin。内置「总部·不限区域」团队不可删。 operationId: ent_team_delete tags: - 运营团队 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ent_team/code' x-action: $ref: '#/components/x-actions/delete/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: team_id: type: string description: 团队 ID required: - team_id required: - data x-error-codes: [60053, 60054, 60068] responses: "200": description: 成功。统一信封 code/message/data /ent_team/member_add@v1: post: summary: 添加运营团队成员 description: 每团队有且仅有一个主账号;首个成员即主账号;成员姓名(`name`)落 `bos_account_ext.display_name`(未带=回落登录名)。不可删除当前登录账号。 operationId: ent_team_member_add tags: - 运营团队 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ent_team/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: team_id: type: string description: 团队 ID username: type: string description: 成员登录名 name: type: string maxLength: 64 description: 成员姓名(落 `bos_account_ext.display_name`;前端必填,未带=回落登录名) mobile: type: string description: 手机号(可选) is_primary: type: boolean description: 是否设为主账号(可选) required: - team_id - username required: - data x-error-codes: [60053, 60054, 60068] responses: "200": description: 成功。统一信封 code/message/data /ent_team/member_update@v1: post: summary: 编辑运营团队成员资料 description: 仅 admin。改姓名(`bos_account_ext.display_name`)、手机号与运营账号可承接工单类型清单(`ticket_types`);登录名与本/子身份不变(改名办 `ent_team/transfer_primary@v1`)。 operationId: ent_team_member_update tags: - 运营团队 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ent_team/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: team_id: type: string description: 团队 ID user_id: type: string description: 成员用户 ID name: type: string maxLength: 64 description: 姓名(可选;缺省=不改;空白串=拒绝,姓名是下拉框选人的展示值) mobile: type: string description: 手机号(可选;缺省/空串=不改;全站唯一) ticket_types: type: array items: type: string description: 可承接工单类型清单(`ops_account_ticket_type`,工单§3.4.2 判据二,2026-11-17 新增):缺省=不改;非空=整体替换,且**必须含 `renewal`**(续签单只由运营账号受理,清单不可清空;`[]` 或漏掉续签一律拒绝)。取值限八类型码(`open`/`service_open`/`updown`/`expiry_stop`/`service_stop`/`fault`/`after_sale`/`renewal`),只对 `role_code ∈ opsMain/opsSub` 的账号生效。新建与存量账号默认只播种 `renewal` required: - team_id - user_id required: - data x-error-codes: [60053, 60054, 60068] responses: "200": description: 成功。统一信封 code/message/data /ent_team/member_remove@v1: post: summary: 移除运营团队成员 description: 内置主账号不可删不可转交;不可删除当前登录账号。 operationId: ent_team_member_remove tags: - 运营团队 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ent_team/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: team_id: type: string description: 团队 ID user_id: type: string description: 成员用户 ID required: - team_id - user_id required: - data x-error-codes: [60053, 60054, 60068] responses: "200": description: 成功。统一信封 code/message/data /ent_team/transfer_primary@v1: post: summary: 转交运营团队主账号 description: 总运营可办理任意团队;运营主账号(opsMain)只能转交本团队(限本人所属团队)。同事务切换两人的 is_primary 标记并同步 role_code(opsMain↔opsSub),登录名与负责范围不变;内置总运营团队不可转交,跨团队接收方直接拒。审计记转出与转入账号名。 operationId: ent_team_transfer_primary tags: - 运营团队 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ent_team/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: team_id: type: string description: 团队 ID from_user_id: type: string description: 原主账号用户 ID to_user_id: type: string description: 新主账号用户 ID required: - team_id - from_user_id - to_user_id required: - data x-error-codes: [60053, 60054, 60068] responses: "200": description: 成功。统一信封 code/message/data /ent_team/scope/get@v1: post: summary: 读取运营团队负责范围 description: 仅 admin。返回团队区域负责范围。注意:2026-11-08 由 GET 改 POST(R-5,统一方法;本接口读 scope 表本身,不消费授权上界,故不标 x-enumeration-kind)。 operationId: ent_team_scope_get tags: - 运营团队 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ent_team_scope/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: 统一信封请求体(无业务参数) content: application/json: schema: type: object properties: data: type: object description: 无业务参数 required: - data x-error-codes: [60053, 60054, 60068] responses: "200": description: 成功。统一信封 code/message/data /ent_team/scope/save@v1: post: summary: 保存运营团队负责范围 description: 仅 admin。勾选区域写入 bos_data_scope(holder=ent_team),成为区域删除的引用来源。与其它非内置运营团队区域子树互斥(KLT-T216);内置总部豁免。 operationId: ent_team_scope_save tags: - 运营团队 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ent_team_scope/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: team_id: type: string description: 团队 ID region_node_ids: type: array description: 负责区域节点 ID 列表 items: type: string description: 区域节点 ID required: - team_id - region_node_ids required: - data x-error-codes: [60053, 60054, 60068, 60095, 60096] responses: "200": description: 成功。统一信封 code/message/data /ops_team/create@v1: post: summary: 新建运维团队 description: 须指定所属区域、可派工单类型≥1、分派方式与结算口径。注意:2026-11-05 起团队不分类型(无 team_type 键)。 operationId: ops_team_create tags: - 运维团队与成员 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ops_team/code' x-action: $ref: '#/components/x-actions/create/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: team_name: type: string description: 团队名称 region_node_id: type: string description: 所属区域节点 ID ticket_types: type: array description: 可派工单类型列表(至少 1 项;⛔ 含 `renewal`——续签单只由运营账号受理,业主 2026-11-17) items: type: string description: 工单类型码 dispatch_mode: type: string description: 分派方式:manual=手工;auto_avg=自动均分 enum: - manual - auto_avg settle_mode: type: string description: 结算方式 settle_value: type: number description: 结算值 primary_username: type: string description: 主账号登录名(空则默认「{团队名}主账号」) primary_name: type: string description: 主账号姓名(档案名,1~64 字符;空=未填,列表回落显示登录名) primary_mobile: type: string description: 主账号手机号(可选) required: - team_name - region_node_id - ticket_types - dispatch_mode required: - data x-error-codes: [60053, 60054, 60068, 60082] responses: "200": description: 成功。统一信封 code/message/data /ops_team/update@v1: post: summary: 编辑运维团队 description: 编辑团队资料。注意:2026-11-05 起团队不分类型,请求体无 team_type 键。 operationId: ops_team_update tags: - 运维团队与成员 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ops_team/code' x-action: $ref: '#/components/x-actions/update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: team_id: type: string description: 团队 ID team_name: type: string description: 团队名称 region_node_id: type: string description: 所属区域节点 ID ticket_types: type: array description: 可派工单类型列表(整体替换,至少 1 项;⛔ 含 `renewal`——续签单只由运营账号受理) items: type: string description: 工单类型码 settle_mode: type: string description: 结算方式 settle_value: type: number description: 结算值 row_version: type: integer description: 乐观锁版本(若启用) required: - team_id required: - data x-error-codes: [60053, 60054, 60068, 60082] responses: "200": description: 成功。统一信封 code/message/data /ops_team/delete@v1: post: summary: 删除运维团队 description: 删除前校验引用与未办完工单等守卫。 operationId: ops_team_delete tags: - 运维团队与成员 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ops_team/code' x-action: $ref: '#/components/x-actions/delete/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: team_id: type: string description: 团队 ID required: - team_id required: - data x-error-codes: [60053, 60054, 60068, 60082] responses: "200": description: 成功。统一信封 code/message/data /ops_team/scope/save@v1: post: summary: 保存运维团队负责范围 description: 三个范围写入口之一。同事务校验范围包含关系与未办完工单守卫;失败两侧都不落库。与其它运维团队区域子树/点客户互斥(KLT-T216);异类可并存。 operationId: ops_team_scope_save tags: - 运维团队与成员 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ops_team_scope/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: team_id: type: string description: 团队 ID region_node_ids: type: array description: 负责区域节点 ID 列表 items: type: string description: 区域节点 ID customer_ids: type: array description: 负责客户 ID 列表(可空) items: type: string description: 客户 ID required: - team_id required: - data x-error-codes: [60053, 60054, 60068, 60082, 60095, 60096] responses: "200": description: 成功。统一信封 code/message/data /ops_team/member_add@v1: post: summary: 添加运维成员 description: 新建成员档案(含成员姓名)并开通运维子账号(`role_code=ops`)。注意:2026-11-05 起成员不分类型,服务侧只校验 `ticket_types` 是团队可分配类型的子集(`KLT-I105`,可为空=不接单)。注意:2026-11-16 起 `ticket_mode` 与负责范围同构:`follow_team`=随团队(成员级零行),`custom`=勾选子集。注意:`renewal` 不属于运维可承接类型(续签单只由运营账号受理,业主 2026-11-17),传入即拒。 operationId: ops_team_member_add tags: - 运维团队与成员 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ops_team/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: team_id: type: string description: 团队 ID ticket_types: type: array description: 该成员可处理的工单类型(须为团队可分配类型的子集;空数组=不接单,如录入人员;⛔ 含 `renewal`——续签单只由运营账号受理)。`ticket_mode=follow_team` 时不得传本键 items: type: string description: 工单类型码 ticket_mode: type: string description: 可处理类型形态:follow_team=随团队可分配类型(成员级零行,团队改类型自动跟随);custom=勾选子集。缺省=follow_team(D-04/OR-14:与负责范围默认同构;显式 custom 且不带 ticket_types=不接单) enum: - follow_team - custom username: type: string description: 登录名 name: type: string description: 成员姓名(必填;1~64 字符、不含控制字符;契约字段=`name`,兼容旧键 `display_name`)。与登录名分列,列表「成员」列显示该值 display_name: type: string description: 成员姓名别名(兼容旧调用方;与 `name` 同义,优先用 `name`) mobile: type: string description: 手机号(可选) required: - team_id - username - name required: - data x-error-codes: [60053, 60054, 60068, 60082] responses: "200": description: 成功。统一信封 code/message/data /ops_team/member_update@v1: post: summary: 更新运维成员 description: 可改成员姓名、手机号与可处理工单类型(形态+子集,各字段缺省=不改)。注意:2026-11-05 起成员不分类型,不因类型变更改写 role_code;`custom` 时子集落 ops_member_ticket_type,`follow_team` 时清空该成员行并随团队类型。 operationId: ops_team_member_update tags: - 运维团队与成员 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ops_team/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: team_id: type: string description: 团队 ID ticket_types: type: array description: 该成员可处理的工单类型(整体替换;须为团队可分配类型的子集;空数组=不接单;⛔ 含 `renewal`——续签单只由运营账号受理)。`ticket_mode=follow_team` 时不得传本键 items: type: string description: 工单类型码 ticket_mode: type: string description: 可处理类型形态:follow_team=随团队(清空该成员的类型行);custom=按 ticket_types 整体替换。缺省且带 ticket_types ⇒ 按 custom;都不带 ⇒ 不动类型 enum: - follow_team - custom member_id: type: string description: 成员 ID name: type: string description: 成员姓名新值(契约字段=`name`,兼容旧键 `display_name`);1~64 字符、不含控制字符;缺省=不改,空串非法 display_name: type: string description: 成员姓名别名(兼容旧调用方;与 `name` 同义) mobile: type: string description: 手机号(可选) required: - team_id - member_id required: - data x-error-codes: [60053, 60054, 60068, 60082] responses: "200": description: 成功。统一信封 code/message/data /ops_team/transfer_primary@v1: post: summary: 转交运维团队主账号 description: 总运营/运维主账号可办;同事务切换两人的 is_primary 并同步 role_code(teamLead↔ops),新主账号可处理类型强制随团队;登录名与负责范围不变。 operationId: ops_team_transfer_primary tags: - 运维团队与成员 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ops_team/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: team_id: type: string description: 团队 ID from_member_id: type: string description: 原主账号成员 ID to_member_id: type: string description: 新主账号成员 ID(须同团队) required: - team_id - from_member_id - to_member_id required: - data x-error-codes: [60053, 60054, 60068] responses: "200": description: 成功。统一信封 code/message/data /ops_team/member_remove@v1: post: summary: 移除运维成员 description: 删除前五项检查并注销账号。 operationId: ops_team_member_remove tags: - 运维团队与成员 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ops_team/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: team_id: type: string description: 团队 ID member_id: type: string description: 成员 ID required: - team_id - member_id required: - data x-error-codes: [60053, 60054, 60068, 60082] responses: "200": description: 成功。统一信封 code/message/data /ops_member/scope/save@v1: post: summary: 保存运维成员负责范围 description: 三个范围写入口之二。scope_mode∈follow_team/region/customer;越界报错不保存。 operationId: ops_member_scope_save tags: - 运维团队与成员 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ops_member_scope/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: member_id: type: string description: 成员 ID scope_mode: type: string description: 范围模式:follow_team=跟随团队;region=按区域;customer=按客户 enum: - follow_team - region - customer targets: type: array description: region/customer 模式下的目标 ID 列表 items: type: string description: 目标 ID required: - member_id - scope_mode required: - data x-error-codes: [60053, 60054, 60068, 60082] responses: "200": description: 成功。统一信封 code/message/data /ops_team/dispatch_mode/update@v1: post: summary: 更新分派方式 description: 与运营侧改同一字段,后写入者生效;默认补记审计。 operationId: ops_team_dispatch_mode_update tags: - 运维团队与成员 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ops_team_dispatch_mode/code' x-action: $ref: '#/components/x-actions/update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: team_id: type: string description: 团队 ID dispatch_mode: type: string description: 分派方式:manual=手工;auto_avg=自动均分 enum: - manual - auto_avg required: - team_id - dispatch_mode required: - data x-error-codes: [60053, 60054, 60068, 60082] responses: "200": description: 成功。统一信封 code/message/data /ops_team/coverage/get@v1: post: summary: 运维团队覆盖客户 description: 覆盖客户=团队区域范围(Tree) ∩ 本类型归属(Owner),与列表分页同源。注意:2026-11-08 由 GET 改 POST(R-5)。 operationId: ops_team_coverage_get tags: - 运维团队与成员 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ops_team_coverage/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog x-enumeration-kind: list requestBody: required: true description: 统一信封请求体(无业务参数,data 传空对象以使网关注入授权上界) content: application/json: schema: type: object properties: data: type: object description: 无业务参数 required: - data x-error-codes: [60053, 60054, 60068, 60082] responses: "200": description: 成功。统一信封 code/message/data /customer/create@v1: post: summary: 新建客户 description: 客户建档(Opt-11 先挂树后建档)。`mount_request_id` 与 `parent_node_id` 至少给一个:给 `parent_node_id` 时由本接口完成「发号 → 平台资源树注册客户实例 → 回填挂载事实」;给 `mount_request_id` 时就近认领已存在的挂载申请。同时按 组织§4.5 为客户开通主账号(`primary_username` 留空=按主体号自动派生)。完整弹窗字段还可含识别号、联系人、地址、运维团队等。 operationId: customer_create tags: - 客户管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/customer/code' x-action: $ref: '#/components/x-actions/create/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: customer_name: type: string description: 客户名称 subject_type: type: string description: 主体类型 operator_id: type: string description: 归属运营商 ID partner_id: type: string description: 归属合伙人 ID(可选) mount_request_id: type: string description: 挂载申请 ID(与 parent_node_id 二选一;有值=认领已有的挂载事实) parent_node_id: type: string description: 所挂区域父节点 ID(与 mount_request_id 二选一;有值=由本接口完成平台挂树并回填挂载事实) id_code: type: string description: 识别号(可选) contact_name: type: string description: 联系人(可选) contact_mobile: type: string description: 联系电话(可选) tech_contact_name: type: string description: 技术联系人姓名(可选) tech_contact_mobile: type: string description: 技术联系人电话(可选) finance_contact_name: type: string description: 财务联系人姓名(可选) finance_contact_mobile: type: string description: 财务联系人电话(可选) remark: type: string description: 客户备注(可选,≤512 字) address: type: string description: 地址(可选) ops_team_ids: type: array description: 所挂运维团队 ID(**单支定案** 2026-11-12:建档必填**恰好 1 支**,数组形态仅兼容调用方;缺支/空数组/>1 支一律拒绝,且须在操作人负责范围内) items: type: string description: 运维团队 ID primary_username: type: string description: 客户主账号登录名(可选;留空=按主体号自动派生)。本接口自行调平台 iam-user/user/create@v1 建号 primary_mobile: type: string description: 客户主账号手机号(可选) license: type: object description: 登记材料(营业执照影像,客户§2.1/§3.5;`U-97` 2026-11-03 定案)。**选填**(业主 2026-11-19 定案,⛔ 强制登记)。影像本体由浏览器持自身账号票直传平台 `unified-oss`(本服务不收字节流、不开上传接口),建档只回报落库用的对象键+原始文件名。`object_key` 必须落在 `klt/customer/license/` 前缀下 properties: object_key: type: string description: 平台 unified-oss 逻辑键(1–512 字符,须以 klt/customer/license/ 开头;不得是 URL/签名链接) file_name: type: string description: 原始文件名(1–128 字符,不含路径分隔符;仅供页面展示) required: - object_key - file_name required: - customer_name - subject_type - operator_id required: - data x-error-codes: [60056, 60064, 60108, 60117] responses: "200": description: 成功。统一信封 code/message/data /customer/get_list@v1: post: summary: 客户列表 description: 按可见范围返回客户列表,支持筛选与分页。 operationId: customer_get_list tags: - 客户管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/customer/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog # 工单回件 §5.2 B1 点名的「客户列表」:本路由列出的行=klt.customer 维度的资源实例 # (PG-3 的可见集口径即「授权上界 ∩ 资源树挂载」),故按 list 声明真源列举。 # 注意:声明本身不改变本轮可见范围:handler 现按 customer_scope_pred 收窄 # (customer.rs:556 → partner.rs:1146),运维分支仍走本地 bos_data_scope, # 通道②在运维分支的接入待业主确认口径(见影响清单 L-2)。 x-enumeration-kind: list requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 列表筛选参数 properties: page: type: integer description: 页码(0 基索引,默认 0) minimum: 0 default: 0 page_size: type: integer description: 每页条数(默认 20,上限 200) minimum: 1 maximum: 200 default: 20 keyword: type: string description: 关键字筛选(可选) region_node_id: type: string description: 区域筛选(可选) operator_id: type: string description: 运营商筛选(可选) partner_id: type: string description: 合伙人筛选(可选) status: type: string description: 状态筛选(可选) required: - data x-error-codes: [60056, 60064, 60108, 60117] responses: "200": description: 成功。统一信封 code/message/data /customer/get@v1: post: summary: 客户详情 description: | 按客户 ID 查询档案详情;回显主体资料(含经办联系人/联系电话/地址,脱敏识别号)与当期团队、区域挂载、分账号数,以及登记材料摘要 `license{…}`(客户§3.5)。 **读侧越权(N-2/客户§3.7)**:不存在与不可见**同码同文**=信封 `60005`+文案含 `11104`(⛔ 分档回 `60108` 枚举存在性);写侧越权仍用 `60108`/`KLT-C007`。 operationId: customer_get tags: - 客户管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/customer/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: customer_id: type: string description: 客户 ID required: - customer_id required: - data x-error-codes: [60005, 60056, 60064, 60117] responses: "200": description: 成功。统一信封 code/message/data /customer/update@v1: post: summary: 编辑客户 description: >- 编辑客户资料。拒收改写 customer_id/region_node_id/operator_id/partner_id;改识别号时 change_basis 选填(留空按 NULL 留痕,⛔ 因缺依据拒写)。 **`row_version` 必填**(N-7):缺省 ⇒ `60004`;与库内不符 ⇒ `KLT-S407`/`60001`,⛔ 不带版本静默覆盖。 登记材料换图或随主体变更撤销时,**旧对象即时删除**(平台 `unified-oss/object/delete@v1`,KB-2 §2.6; 生命周期回收只兜「到期」,不替代即时删除)。删除为 best-effort:主表此刻已指向新对象, 删除失败不回退整笔,只告警并由运维补删。响应新增 `license_object_delete{status,reason,deleted?,failed_codes?,error?}`: `not_applicable`(未动影像/键未变)/`deleted`/`partial`/`failed`。注意:对象键不上响应体。 operationId: customer_update tags: - 客户管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/customer/code' x-action: $ref: '#/components/x-actions/update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: customer_id: type: string description: 客户 ID customer_name: type: string description: 客户名称 subject_type: type: string description: 主体类型 id_code: type: string description: 识别号 change_basis: type: string description: 改识别号时的变更依据 contact_name: type: string description: 联系人 contact_mobile: type: string description: 联系电话 tech_contact_name: type: string description: 技术联系人姓名(给了才改) tech_contact_mobile: type: string description: 技术联系人电话(给了才改) finance_contact_name: type: string description: 财务联系人姓名(给了才改) finance_contact_mobile: type: string description: 财务联系人电话(给了才改) remark: type: string description: 客户备注(给了才改;空串=清空;≤512 字) address: type: string description: 地址 ops_team_ids: type: array description: 改派运维团队(整体替换当前归属;**单支定案**:最多 1 支——空数组=清空归属⇒拒绝,>1 支⇒拒绝;不提交=不改动) items: type: string description: 运维团队 ID row_version: type: integer description: 乐观锁版本(必填;缺省=60004,不符=KLT-S407/60001) license: type: object description: 登记材料(营业执照影像)**整对替换**(客户§3.5 补传/替换,写入口只在本分区)。**选填**(业主 2026-11-19 定案,⛔ 强制登记)。不提交=本次不动影像(不清空);**唯一例外**:本次把 `subject_type` 改为非企业(`individual`/`sole_proprietor`)且库内有影像 ⇒ 影像随本笔**同批撤销**(两列置 `NULL`+`license_file_name` 变更留痕,见 2026-11-15 死锁修复);企业→企业不带 `license` 一律不动影像;库内无影像且本次也不提交时**照常保存其余字段**。`object_key` 须落在 `klt/customer/license/` 下 properties: object_key: type: string description: 平台 unified-oss 逻辑键(1–512 字符,须以 klt/customer/license/ 开头) file_name: type: string description: 原始文件名(1–128 字符,不含路径分隔符) required: - object_key - file_name required: - customer_id - row_version required: - data x-error-codes: [60001, 60004, 60056, 60064, 60108, 60117] responses: "200": description: 成功。统一信封 code/message/data /customer/delete_precheck@v1: post: summary: 客户删除前置检查 description: 返回 can_delete 与 reasons,供删除确认弹窗使用。 operationId: customer_delete_precheck tags: - 客户管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/customer/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: customer_id: type: string description: 客户 ID required: - customer_id required: - data x-error-codes: [60056, 60064, 60108, 60117] responses: "200": description: 成功。统一信封 code/message/data /customer/delete@v1: post: summary: 删除客户 description: 删除客户;须携带删除前置检查时的阻塞快照版本。 operationId: customer_delete tags: - 客户管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/customer/code' x-action: $ref: '#/components/x-actions/delete/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: customer_id: type: string description: 客户 ID precheck_version: type: string description: 删除前置检查快照版本 required: - customer_id required: - data x-error-codes: [60056, 60064, 60108, 60117] responses: "200": description: 成功。统一信封 code/message/data /customer/history@v1: post: summary: 客户变更历史 description: 查询客户档案变更流水。 operationId: customer_history tags: - 客户管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/customer/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: customer_id: type: string description: 客户 ID page: type: integer description: 页码(0 基索引,默认 0) minimum: 0 default: 0 page_size: type: integer description: 每页条数(默认 20,上限 200) minimum: 1 maximum: 200 default: 20 keyword: type: string description: 关键字筛选(可选) required: - customer_id required: - data x-error-codes: [60056, 60064, 60108, 60117] responses: "200": description: 成功。统一信封 code/message/data /customer/mount_candidates@v1: post: summary: 改挂候选客户 description: 返回操作人可见范围内可作为改挂目标的候选客户列表。注意:2026-11-08 由 GET 改 POST(R-5)。 operationId: customer_mount_candidates tags: - 客户管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/customer/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog x-enumeration-kind: list requestBody: required: true description: 统一信封请求体(无业务参数,data 传空对象以使网关注入授权上界) content: application/json: schema: type: object properties: data: type: object description: 无业务参数 required: - data x-error-codes: [60056, 60064, 60108, 60117] responses: "200": description: 成功。统一信封 code/message/data /customer/influence@v1: post: summary: 改挂影响面 description: 改挂前必做前置:未办完工单数、当前责任人与团队、当期是否已出账等。 operationId: customer_influence tags: - 客户管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/customer/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: customer_id: type: string description: 客户 ID required: - customer_id required: - data x-error-codes: [60056, 60064, 60108, 60117] responses: "200": description: 成功。统一信封 code/message/data /customer/move_region@v1: post: summary: 客户改挂区域 description: 复合事务改挂区域;新区域省份须等于归属运营商档案省份。 operationId: customer_move_region tags: - 客户管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/customer/code' x-action: $ref: '#/components/x-actions/update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: customer_id: type: string description: 客户 ID new_region_node_id: type: string description: 新挂载区域节点 ID ops_team_ids: type: array description: 随改挂重绑的运维团队(**单支定案**:最多 1 支;不提交=不改动) items: type: string description: 运维团队 ID required: - customer_id - new_region_node_id required: - data x-error-codes: [60056, 60064, 60108, 60117] responses: "200": description: 成功。统一信封 code/message/data /customer/attribution/update@v1: post: summary: 更新客户归属 description: 改归属运营商/合伙人;改运营商时档案省份须等于客户所挂区域省份。 operationId: customer_attribution_update tags: - 客户管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/customer_attribution/code' x-action: $ref: '#/components/x-actions/update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: customer_id: type: string description: 客户 ID operator_id: type: string description: 新归属运营商 ID(可选) partner_id: type: string description: 新归属合伙人 ID(可选,可清空) required: - customer_id required: - data x-error-codes: [60056, 60064, 60108, 60117] responses: "200": description: 成功。统一信封 code/message/data /import_batch/template_download@v1: get: summary: 下载导入模板 description: 返回 14 列 xlsx 模板说明(format/columns/max_rows)。 operationId: import_batch_template_download tags: - 批量导入 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/import_batch/code' x-action: $ref: '#/components/x-actions/export/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [60111, 60112, 60113, 60114] responses: "200": description: 成功。统一信封 code/message/data /import_batch/submit@v1: post: summary: 提交客户批量导入 description: 提交导入行对象列表,单批上限 500 行。列含客户名称、识别号、主体类型、联系人、电话、地址、区域、运营商、合伙人、运维团队、主账号等。 operationId: import_batch_submit tags: - 批量导入 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/import_batch/code' x-action: $ref: '#/components/x-actions/create/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: rows: type: array description: 导入行对象列表(≤500) maxItems: 500 items: type: object description: 单行导入字段(14 列) properties: row_no: type: integer description: 行编号 customer_name: type: string description: 客户名称 id_code: type: string description: 识别号 subject_type: type: string description: 主体类型 contact_name: type: string description: 联系人 contact_mobile: type: string description: 联系电话 address: type: string description: 地址 region_name: type: string description: 所挂区域 operator_name: type: string description: 运营商 partner_name: type: string description: 合伙人 ops_team_names: type: array description: 所挂运维团队名称(**单支定案** 2026-11-12:建档必填**恰好 1 支**——一格只填一支名称,不得用「;」分隔多支;留空或多支=该行校验失败) items: type: string description: 运维团队名称 primary_username: type: string description: 主账号登录名 primary_mobile: type: string description: 主账号手机号 required: - rows required: - data x-error-codes: [60111, 60112, 60113, 60114] responses: "200": description: 成功。统一信封 code/message/data /import_batch/get_list@v1: post: summary: 导入批次列表 description: 查询本人可见范围内的导入批次。 operationId: import_batch_get_list tags: - 批量导入 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/import_batch/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 列表筛选参数 properties: page: type: integer description: 页码(0 基索引,默认 0) minimum: 0 default: 0 page_size: type: integer description: 每页条数(默认 20,上限 200) minimum: 1 maximum: 200 default: 20 keyword: type: string description: 关键字筛选(可选) required: - data x-error-codes: [60111, 60112, 60113, 60114] responses: "200": description: 成功。统一信封 code/message/data /import_batch/get@v1: post: summary: 导入批次详情 description: 按批次 ID/编号查询详情与行状态。 operationId: import_batch_get tags: - 批量导入 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/import_batch/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: batch_id: type: string description: 批次 ID(与 batch_no 二选一) batch_no: type: string description: 批次编号(与 batch_id 二选一) required: - data x-error-codes: [60111, 60112, 60113, 60114] responses: "200": description: 成功。统一信封 code/message/data /import_batch/resume@v1: post: summary: 失败行续传 description: 针对失败行提交续传数据,行号对应原 row_no。 operationId: import_batch_resume tags: - 批量导入 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/import_batch/code' x-action: $ref: '#/components/x-actions/update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: batch_id: type: string description: 批次 ID rows: type: array description: 续传行列表(含原 row_no) items: type: object required: - batch_id - rows required: - data x-error-codes: [60111, 60112, 60113, 60114] responses: "200": description: 成功。统一信封 code/message/data /import_batch/export_codes@v1: post: summary: 按批次导出激活码 description: | 语义同账号导出(与 `/account/export_codes@v1` 共用分片/翻页/审计/出参信封,D-14); 须传批次与按本人可见范围收窄后的 user_ids(不可传空列表:空值=项目内全量); scope 服务端派生,不收 scope_type/scope_id;validity 默认 `valid`,不接受 `active`。 错误码:批次收窄 `60111`–`60114`;账号门禁同账号口 `60004`/`60005`/`60058`/`60108`(⛔ `60503`/`60066`); 出参另含 `batch_id`/`batch_no` 与读/写同一信封字段。 operationId: import_batch_export_codes tags: - 批量导入 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/import_batch/code' x-action: $ref: '#/components/x-actions/export/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: batch_id: type: string description: 批次 ID user_ids: type: array description: 按本人可见范围收窄后的用户 ID 列表(不可传空列表:平台侧空值=项目内全量导出) minItems: 1 items: type: string description: 用户 ID validity: type: string description: 导出口径(平台取值域):valid=仍有效(只读,缺省);expired=已过期(写);all=全部(写)。不接受 active default: valid enum: - valid - expired - all required: - batch_id - user_ids required: - data x-error-codes: [60004, 60005, 60058, 60108, 60111, 60112, 60113, 60114] responses: "200": description: 成功。统一信封 code/message/data /import_batch/export_customers@v1: post: summary: 按批次导出客户 description: 按导入批次导出客户 15 列结果。 operationId: import_batch_export_customers tags: - 批量导入 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/import_batch/code' x-action: $ref: '#/components/x-actions/export/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: batch_id: type: string description: 批次 ID required: - batch_id required: - data x-error-codes: [60111, 60112, 60113, 60114] responses: "200": description: 成功。统一信封 code/message/data /sub_account/get_list@v1: post: summary: 分账号列表 description: 查询客户下属分账号列表。 operationId: sub_account_get_list tags: - 账号管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/sub_account/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog # 工单回件 §5.2 B1 点名的「分账号列表」:列表按所属客户的可见集收窄 # (sub_account.rs:50 get_list → :57 customer_scope_pred),客户维度受授权上界约束 # ⇒ 按 list 声明真源列举。同 L-2:本轮仅打通声明,运维分支仍走本地口径。 x-enumeration-kind: list requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: customer_id: type: string description: 客户 ID page: type: integer description: 页码(0 基索引,默认 0) minimum: 0 default: 0 page_size: type: integer description: 每页条数(默认 20,上限 200) minimum: 1 maximum: 200 default: 20 keyword: type: string description: 关键字筛选(可选) required: - customer_id required: - data x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data /sub_account/update@v1: post: summary: 更新分账号 description: 运营可改 display_name 与 network_account_name;客户主账号只许改 display_name。 operationId: sub_account_update tags: - 账号管理 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/sub_account/code' x-action: $ref: '#/components/x-actions/update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: sub_account_id: type: string description: 分账号 ID display_name: type: string description: 显示名称/用途说明 network_account_name: type: string description: 网络侧账号名(运营可改) required: - sub_account_id required: - data x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data /delivery/list@v1: post: summary: 交付现状(在册资源一览) description: '讨论稿§7.7:客户详情「交付现状」页签与订阅详情「当前资源」区块共用。数据源锁定台账 subscription_ip_assignment(released_at IS NULL 的行=当前在册),⛔ 不用“最新一单”(并单后一单只含部分账号、service_open 又是增量交付);实测参数(内网 IP/实测上下行/实测出口)只取该账号“最近一次成功开通回填”(ticket_backfill.exec_conclusion=success)并随行下发 measured_at(列头日期)。三态:在用/已到期待回收(台账未释放且订阅 end_date 已过)/已回收(默认只显示前两态,勾选 include_released 才含第三态)。合同出口与实测出口两列并排、不一致时 exit_mismatch=true(两值都返回,⛔ 互相覆盖)。输出不含 port_start/port_end(D-6 端口本轮不启用、无“端口段”列)。可见范围复用 customer_scope_pred,未另立判据。' operationId: delivery_list tags: - 交付现状 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/delivery/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: false description: 分页与筛选(page/page_size/customer_id/subscription_id/sub_account_id/keyword/state/include_released),业务字段置于 data content: application/json: schema: type: object x-error-codes: [60004, 60053] responses: "200": description: 成功。统一信封 code/message/data /delivery/export@v1: post: summary: 交付现状导出 description: '讨论稿§7.7/§6.3 第 7 条:入参与 /delivery/list@v1 逐字同构(同一份 DTO、同一段谓词),导出不另立判据;CSV(UTF-8 带 BOM)首行为 `#` 说明行(导出时刻+筛选条件逐项回显+文件行数/同一谓词命中总数+范围裁剪声明);行数上限 20000,超限 KLT-R20903(detail.row_count/detail.limit)且不产文件、不写审计、不落 OSS;产出成功写 object_type=delivery_export 留痕,留痕失败 KLT-S405。角色 admin/opsMain/opsSub/teamLead。' operationId: delivery_export tags: - 交付现状 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/delivery/code' x-action: $ref: '#/components/x-actions/export/code' x-version: v1 x-permission-visibility: catalog requestBody: required: false description: 与 /delivery/list@v1 同构的筛选条件(page/page_size 不参与导出) content: application/json: schema: type: object x-error-codes: [60903, 60905] responses: "200": description: 成功。统一信封 code/message/data /line_exit/get_list@v1: post: summary: 线路出口目录列表 description: 套餐配置统一维护的线路出口(去空白+小写去重)。合同条目等页面只从这里选择;任何登录角色可读。每条带 ref_count/ref_summary(被合同条目、存量 IP 备案、派生档、订阅引用的合计与构成;IP 备案表自 2026-11-17 起停写,只计入历史行,防历史悬空),>0 即目录侧不允许删除。⚠️ 工单回填不读本目录、也不与订阅核定集合比对(2026-11-17 业主口径「工单连出口都不校」,KLT-G20406 已退役)。 operationId: line_exit_get_list tags: - 套餐档位 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/catalog/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog responses: "200": description: 成功。统一信封 code/message/data(data.items[]=exit_name/exit_key/sort_no/ref_count/ref_summary) /line_exit/save@v1: post: summary: 线路出口目录整段全量替换 description: 总运营/运营主账号可写;数组顺序即展示顺序。被合同条目、存量 IP 备案(该表自 2026-11-17 起停写,只计历史行)、派生档或订阅引用的出口不可删除(整单拒绝并点名引用数)。 operationId: line_exit_save tags: - 套餐档位 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/catalog/code' x-action: $ref: '#/components/x-actions/update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: items: type: array description: 线路出口整段(全量替换,上限 200 条) maxItems: 200 items: type: object description: 单个出口 properties: exit_name: type: string description: 国家/地区名称原文(1~64 字;去空白+小写后不可重复) required: - exit_name required: - items required: - data x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data /ip_bandwidth_tier/get_list@v1: post: summary: 带宽档位目录列表 description: 套餐配置「线路出口」tab 内统一维护的带宽档位(2026-11-16 业主裁定:档位不再写死 5/10/30 兆)。✅ 2026-11-17 改用途:主要作为**固定套餐/自定义套餐配置中带宽权益录入的快捷预设**(档位编辑器「03 带宽与权益」点一条即带出上/下行同值),另兼存量 IP 备案的历史引用;⛔ 与工单回填的 5/10/30 封闭三值互不约束。任何登录角色可读。每条带 ref_count/ref_summary(被存量 IP 备案引用的条数;该表自 2026-11-17 起停写),>0 即目录侧不允许删除。 operationId: ip_bandwidth_tier_get_list tags: - 套餐档位 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/catalog/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data(data.items[]=tier_key/tier_name/bandwidth_tier_mbps/bandwidth_committed/sort_no/ref_count/ref_summary) /ip_bandwidth_tier/save@v1: post: summary: 带宽档位目录整段全量替换 description: | 总运营/运营主账号可写;数组顺序即展示顺序(也是套餐编辑器里预设胶囊的顺序);同一兆数只允许一条,「不承诺带宽」(bandwidth_tier_mbps 缺省或 null)全表唯一。被存量 IP 备案引用的档位不可删除(整单拒绝并点名引用条数)。⚠️ 本清单是套餐带宽权益的**快捷预设**,⛔ 反向约束套餐上手填的兆数。 ⚠️ **读写不对称(既定契约)**:`get_list` 回 `tier_key`/`bandwidth_committed`/`sort_no`(系统派生);本接口 `items[]` **只收** `tier_name`+`bandwidth_tier_mbps`。⛔ 把读侧 JSON 原样写回(会因未声明字段/系统带出字段被拒)。 operationId: ip_bandwidth_tier_save tags: - 套餐档位 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/catalog/code' x-action: $ref: '#/components/x-actions/update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: items: type: array description: 带宽档位整段(全量替换,上限 50 条) maxItems: 50 items: type: object description: 单个档位 properties: tier_name: type: string description: 展示名称(1~64 字,如「10 兆」「不承诺带宽」) bandwidth_tier_mbps: type: integer nullable: true description: 带宽兆数(1~10000);缺省或 null=「不承诺带宽」 required: - tier_name required: - items required: - data x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data /portal/plan_board@v1: post: summary: 客户侧「我的套餐」两表 description: | 第 9 册门户 4 的唯一自有读口(§4)。主体号一律由会话派生:载荷出现 `customer_id`/`sub_account_id` ⇒ 硬拒(甲类);出现 `status`/`scope`/ `region_id` ⇒ `11103`(乙类)。`view=board`(与 `view=list` 同义)一次返回 「当前套餐」「往期套餐」两表;`view=detail` 本轮未接线 ⇒ `60008`。 operationId: portal_plan_board tags: - 客户门户 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/portal/code' x-action: $ref: '#/components/x-actions/plan_board/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数(白名单只有 view;主体与状态类键一律拒收) properties: view: type: string enum: - board - list - detail description: board(同义 list)=两表;detail=详情三段(本轮未接线 ⇒ 60008) required: - data # ⚠️ 只能是**整数**数组:注册中心 `error_code_range` 对字符串条目判 # 「x-error-codes 含有非整数」⇒ 整条路由 validation_status=abnormal/callable=false, # 网关不导流(实测 50000 未找到匹配路由)。字符串别名(KLT-P301→60058、 # KLT-M221→60214)只写在本 description 里,⛔ 再写回数组。 x-error-codes: [11103, 60004, 60005, 60008, 60058] responses: "200": description: 成功。统一信封 code/message/data content: application/json: schema: type: object properties: code: type: integer message: type: string data: type: object properties: view: type: string party: type: object description: 页头主体:customer_id/customer_name/operator_name(签订方)/region_path current_rows: type: array description: 当前套餐(status.key ∈ active/pending),服务端排序 items: $ref: '#/components/schemas/PortalPlanBoardRow' history_rows: type: array description: 往期套餐(含 expired 与 cancelled/replaced 终态) items: $ref: '#/components/schemas/PortalPlanBoardRow' amount_note: type: string description: 合同总额与每期结算口径的说明行(逐字,前端⛔ 改写) notes: type: array items: type: string /catalog/create@v1: post: summary: 新建套餐档位 description: 新建固定/自定义档位。拒收 sub_mode、first_referred_at。自定义档必填 customer_id。Ops 角色只能建自定义档(D-16);created_by=鉴权账号、created_team_id=建档团队快照(D-17)。 operationId: catalog_create tags: - 套餐档位 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/catalog/code' x-action: $ref: '#/components/x-actions/create/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: plan_kind: type: string description: 档位类型:fixed=固定;custom=自定义 enum: - fixed - custom plan_name: type: string description: 档位名称 plan_desc: type: string description: 套餐说明(报价单权益口径,可空;去首尾空白后 ≤512 字符,超长报 11103)。引用冻结后仍可改(与名称、随附成本项同档) plan_family: type: string description: 交付形态:link=跨境链路(份数恒 1);addon=叠加服务(份数≥1,不设带宽列) enum: - link - addon annual_price_cents: type: integer description: 年价(分) monthly_settle_cents: type: integer description: 月结算标准(分,可选,1~上限);可录入(2026-11-19 起由只读列改为可写) sub_account_quota: type: integer description: 分账号额度(非负,上限 9999):link 档必须 > 0;addon 档必须为 0(D-15)。可缺省——link=1、addon=0(2026-11-22) bandwidth_committed: type: boolean description: 是否承诺带宽:仅 link 档可传(缺省 true);addon 档一律不传(D-18) bandwidth_up_mbps: type: integer description: 上行带宽(Mbps,整数 1~1000);bandwidth_committed=true 时必填。不再有单值 total_bandwidth_mbps(2026-11-05 D8 关闭=该列退役,「总带宽」只是显示列名) bandwidth_down_mbps: type: integer description: 下行带宽(Mbps,整数 1~1000);bandwidth_committed=true 时必填;与上行同值时界面并显「上下行 N 兆」,不等显「下行 X 兆 / 上行 Y 兆」 customer_id: type: string description: 自定义档所属客户 ID(custom 必填) required: - plan_kind - plan_name - plan_family - annual_price_cents required: - data x-error-codes: [60001, 60202, 60203, 60204, 60205, 60206, 60227] responses: "200": description: 成功。统一信封 code/message/data /catalog/update@v1: post: summary: 编辑套餐档位 description: 编辑档位;plan_kind/plan_family 建后不可改(K204);被订阅引用冻结后多数字段只读。 operationId: catalog_update tags: - 套餐档位 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/catalog/code' x-action: $ref: '#/components/x-actions/update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: plan_id: type: string description: 档位 ID plan_name: type: string description: 档位名称 plan_desc: type: string nullable: true description: 套餐说明(可空;缺键=不动;null/空串=清空成库内 null;≤512 字符)。引用冻结后仍可改(2026-11-22) annual_price_cents: type: integer description: 年价(分) monthly_settle_cents: type: integer description: 月结算标准(分,可选,1~上限);可录入(2026-11-19 起由只读列改为可写) sub_account_quota: type: integer description: 分账号额度(非负,上限 9999):link 档必须 > 0;addon 档必须为 0(D-15) bandwidth_committed: type: boolean description: 是否承诺带宽:true=承诺(缺省);false=该档「不承诺带宽」,上下行两字段一律不传 bandwidth_up_mbps: type: integer description: 上行带宽(Mbps,整数 1~1000);bandwidth_committed=true 时必填,关闭「是否承诺带宽」时必不传(档位被订阅引用后随整单只读,K204) bandwidth_down_mbps: type: integer description: 下行带宽(Mbps,整数 1~1000);必填规则同上,两值不折算为单值 row_version: type: integer description: 乐观锁版本(若启用) required: - plan_id required: - data x-error-codes: [60001, 60202, 60203, 60204, 60205, 60206, 60227] responses: "200": description: 成功。统一信封 code/message/data /catalog/get_list@v1: post: summary: 套餐档位列表 description: 按 plan_kind/plan_family/created_by/created_team_id 等条件筛选档位列表。每行回 plan_family、use_purpose、created_by/created_team_id 及读侧名称 created_by_name/created_team_name(D-17);data.facets 回建档团队/建档人下拉项(服务端在 base 谓词 ∧ plan_kind=custom 上聚合,⛔ 用当前页行凑)。 operationId: catalog_get_list tags: - 套餐档位 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/catalog/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 列表筛选参数 properties: page: type: integer description: 页码(0 基索引,默认 0) minimum: 0 default: 0 page_size: type: integer description: 每页条数(默认 20,上限 200) minimum: 1 maximum: 200 default: 20 keyword: type: string description: 关键字筛选(可选) plan_kind: type: string description: 档位类型筛选:fixed/custom plan_family: type: string description: 交付形态筛选:link/addon(仅自定义档可筛,固定档带此参报错) enum: - link - addon customer_id: type: string description: 自定义档客户筛选 created_by: type: string description: 建档人筛选(R-14 台账收敛;=catalog_plan.created_by 账号 ID) created_team_id: type: string description: 建档团队筛选(R-14 台账收敛;=建档时快照的 catalog_plan.created_team_id) required: - data x-error-codes: [60001, 60202, 60203, 60204, 60205, 60206, 60227] responses: "200": description: 成功。统一信封 code/message/data /catalog/get@v1: post: summary: 套餐档位详情 description: 按档位 ID 查询详情。 operationId: catalog_get tags: - 套餐档位 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/catalog/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: plan_id: type: string description: 档位 ID required: - plan_id required: - data x-error-codes: [60001, 60202, 60203, 60204, 60205, 60206, 60227] responses: "200": description: 成功。统一信封 code/message/data /catalog/delete@v1: post: summary: 套餐档位条件删除 description: 按档位 ID 条件删除(第3册§3.7):引用份数+两栏阻塞清单(subscriptions/items),在用⇒KLT-K205;固定档仅 Admin。 operationId: catalog_delete tags: - 套餐档位 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/catalog/code' x-action: $ref: '#/components/x-actions/delete/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: plan_id: type: string description: 档位 ID required: - plan_id required: - data x-error-codes: [60001, 60202, 60203, 60204, 60205, 60206, 60227] responses: "200": description: 成功。统一信封 code/message/data /catalog/customer_options@v1: post: summary: 归属客户下拉 description: 只列操作人可见客户(自定义档归属客户下拉,第3册§3.2);硬上限 500 行⇒truncated。 operationId: catalog_customer_options tags: - 套餐档位 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/catalog/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 列表筛选参数 properties: keyword: type: string description: 客户名称关键字(可选) required: - data x-error-codes: [60001, 60202, 60203, 60204, 60205, 60206, 60227] responses: "200": description: 成功。统一信封 code/message/data /plan_cost_item/get_list@v1: post: summary: 档位随附成本项列表 description: 按档位读取随附成本项(第3册§3.5):名称是弱引用,不校验是否在全局清单;frozen 仅供前端提示。 operationId: plan_cost_item_get_list tags: - 套餐档位 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/plan_cost_item/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: plan_id: type: string description: 档位 ID required: - plan_id required: - data x-error-codes: [60001, 60202, 60203, 60204, 60205, 60206, 60227] responses: "200": description: 成功。统一信封 code/message/data /plan_cost_item/save@v1: post: summary: 档位随附成本项整段全量替换 description: 一次提交该档位全部成本项(先按 plan_id 删净再逐条插,第3册§3.5);同档位名称重复⇒KLT-K206。 operationId: plan_cost_item_save tags: - 套餐档位 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/plan_cost_item/code' x-action: $ref: '#/components/x-actions/update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: plan_id: type: string description: 档位 ID items: type: array description: 成本项整段(全量替换,上限 50 条) maxItems: 50 items: type: object description: 成本项条目 properties: item_name: type: string description: 成本项名称(弱引用,1~128 字) amount_cents: type: integer description: 金额(分,≥0) minimum: 0 billing_unit: type: string description: 计费单位(可选) enum: - per_customer - per_account - per_copy category: type: string description: 成本项分类(可选) enum: - intl_resource - device_purchase - project_fee remark: type: string description: 备注(可选,上限 512 字) sort_no: type: integer description: 排序号(≥0) minimum: 0 required: - item_name - amount_cents required: - plan_id required: - data x-error-codes: [60001, 60202, 60203, 60204, 60205, 60206, 60227] responses: "200": description: 成功。统一信封 code/message/data /contract/create@v1: post: summary: 新建合同 description: 客户段+合同段+服务构成条目一次提交(⚠️ 2026-11-17 起不再受理 IP 条目:`ip_entries`/`has_fixed_ip` 视为未知键 ⇒ 11103;境外 IP 由套餐档位所含 IP × 订阅份数表达)。客户未命中时用 data.customer_inline 随合同建档(先建档、后签合同,两个事务),成功时 data.inline_customer 回显客户号/主账号/激活码发放态/影像待补(激活码明文不在应答内,走客户列表「导出激活码」)。拒收 source(服务端定);created_by/created_by_name/created_by_org/created_by_mobile(录入经办人:机构/姓名/联系方式)由服务端从鉴权上下文写入、不取入参;agent_* 是运营商交接单上的经办人(姓名/电话/交接日期必填、机构选填)。 operationId: contract_create tags: - 合同 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/contract/code' x-action: $ref: '#/components/x-actions/create/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数(`customer_id` 与 `customer_inline` **至少给一个且不可同时给**) properties: customer_id: type: string description: 签约客户 ID。与 customer_inline **只可二选一**:命中已有客户填本项;未命中改用内联建档段 customer_inline: type: object description: >- 客户未命中时的内联建档段(需求 §5.3 CU-13;业主 2026-11-16 定案关闭 CU-41)。 本段先按 `/customer/create@v1` 的同一套规则建档(两个事务:建档 → 合同,不合并), 再签本合同;建档含客户主账号(未设初始口令 ⇒ 待激活、发激活码,明文不在本响应内下发)。 注意:企业营业执照影像**选填**(业主 2026-11-19 定案,与页面建档同口径), 留空不影响建档,建档后到客户档案「登记材料」格补传/替换。主体类型非企业时不收 license。 properties: customer_name: type: string description: 客户名称(必填;允许重名,查重靠识别号) subject_type: type: string description: 主体类型(必填):enterprise/individual/sole_proprietor enum: - enterprise - individual - sole_proprietor id_code: type: string description: 客户识别号(必填):既是安全存储载体,也是合同事务失败后重试的幂等键(不得省略) contact_name: type: string description: 客户经办联系人(与联系电话、地址同属 CU-13 第 1 步字段) contact_mobile: type: string description: 联系电话 tech_contact_name: type: string description: 技术联系人姓名(选填) tech_contact_mobile: type: string description: 技术联系人电话(选填) finance_contact_name: type: string description: 财务联系人姓名(选填) finance_contact_mobile: type: string description: 财务联系人电话(选填) remark: type: string description: 客户备注(选填,≤512 字) partner_id: type: string description: 归属合伙人(选填;反查所得,落 customer.partner_id) address: type: string description: 客户地址 parent_node_id: type: string description: 挂载区域(必填;区域树节点 ID,与 /customer/create@v1 的 parent_node_id 同义) operator_id: type: string description: 归属运营商(必填;弹窗下拉,候选=所挂区域省份下可见的运营商档案) ops_team_ids: type: array description: 运维团队(必填且**恰好 1 支**,单支定案;不得为空数组/不得传多支) items: type: string description: 团队 ID license: type: object description: 营业执照影像(**选填**;非企业主体不收)。两键成对 properties: object_key: type: string description: 平台对象存储对象键(浏览器直传后回报,须在客户影像前缀下) file_name: type: string description: 原始文件名(仅展示) required: - object_key - file_name primary_username: type: string description: 客户主账号登录名(选填;留空按主体号派生,4~32 位字母数字与 . _ -) primary_mobile: type: string description: 主账号绑定手机号(选填,11 位) required: - customer_name - subject_type - id_code - parent_node_id - operator_id - ops_team_ids contract_no: type: string description: 合同编号(空则服务端发号) external_no: type: string description: 外部合同号(可选) contract_type: type: string description: >- 合同类型:new(新建,缺省)/renew(续签)/expand(扩容补充协议)/change(变更协议)。 语义收口:renew 必须同时给 renew_from_contract_id;expand 的服务构成必须整批为增量叠加服务; 带 renew_from_contract_id 的合同类型只能是 renew。 enum: - new - renew - expand - change sign_date: type: string description: 签署日期(YYYY-MM-DD;选填,缺省按 agent_handover_on 兜底) format: date contract_amount_cents: type: integer description: 合同金额(分,可选) service_months: type: integer description: >- 服务期(月,1~600,必填):替代原 pay_cycle;结束日=生效日+服务期−1 天 (该月无对应日先取月末),页面锁定为只读推算值。 minimum: 1 maximum: 600 start_date: type: string description: 合同开始日期(YYYY-MM-DD) format: date end_date: type: string description: >- 合同结束日期(YYYY-MM-DD,可省略):省略时服务端按「生效日+服务期(月)−1 天」 推算(该月无对应日先取月末);显式给出则按显式值落库。 format: date agent_name: type: string description: 运营商经办人姓名(交接单三段之二,必填;不是录入账号 created_by) agent_mobile: type: string description: 运营商经办人联系方式(交接单三段之三,必填) agent_handover_on: type: string description: 经办交接日期(必填;与姓名/联系电话构成运营商经办人三件套,只用于回溯交接来源) format: date agent_org: type: string description: 运营商经办人机构(交接单三段之一,选填) attachment_url: type: string maxLength: 512 description: >- 合同附件(单值,可选):外部 http(s) 链接,或浏览器直传平台对象存储 (seoh-unified-oss 两段式)成功后回报的对象键,前缀必须为 klt/contract/attachment/。空串=清空。对象键不得当作可直接打开的链接, 详情读口另下发 attachment_view_url(短时效现签)。 service_items: type: array description: 服务构成条目列表 items: type: object description: 服务条目 properties: plan_id: type: string description: 档位 ID(必填;2026-11-19 D-15 起条目只能引用目录档位) quantity: type: integer description: 份数:link 档恒 1;addon 档≥1 item_family: type: string description: 交付形态(只读确认位,可缺省):只能与所引档位的 plan_family 相同,不同即 KLT-L216 enum: - link - addon item_mode: type: string description: >- 条目模式(D-9):new=常规条目(缺省);increment=增量叠加服务,只能引用本客户 既有 link 订阅(只传 ref_subscription_id,⛔ 再填 serves_item_id/ serves_item_index),档位必须是 addon。读口按同一编码原样回传。 enum: - new - increment serves_item_index: type: integer minimum: 0 description: >- 从属宿主(D-7):普通叠加服务叠加于同一请求 service_items 的哪一条, **0 基下标**(新建父条目尚无 item_id 时用)。父条目已存在时也可改传 serves_item_id; 二者同时给即 11103。仅 item_mode=new 且档位为 addon 时必填其一。 serves_item_id: type: string description: >- 从属宿主的条目 ID(编辑合同、父条目已存在时用);与 serves_item_index 二选一。 增量条目(increment)⛔ 不得填本键。 ref_subscription_id: type: string description: >- 增量合同引用的原订阅号(D-2):仅 item_mode=increment 时必填(且不得填 serves_*); 非增量条目带本键即 KLT-L216。订阅须属本客户、为 link 档、状态 ∈ active/pending。 生成的 service_open 单以增量合同 external_no 作为 carrier_order_no(D-11)。 line_exits: type: array maxItems: 1 description: >- 线路出口(2026-11-17 起**单选**:长度必须为 1)。新建/修改条目出现 2 个以上 由服务端回 KLT-L222;存量多出口条目**不迁移**(编辑合同须原样回传)。 items: type: string description: 出口标识 succession: type: object description: >- 契约内逐条替换(升降配,2026-11-17):本条目的新订阅顶替哪份原订阅。 **仅在新建合同受理**,编辑合同出现即 KLT-L222。只接受三键(价格/状态/ row_version 等只读派生列出现即点名)。候选须同客户、status ∈ active/pending、 同 line_exit_key、双方均 plan_family=link、未被替换过(KLT-M226); 同一 replaces_subscription_id 在本请求内至多一次;link 条目 quantity 须为 1。 替换与合同写入同一条 dml_batch(任一条失败=整批回滚),应答回 data.replacements[]。 properties: replaces_subscription_id: type: string description: 被替换的原订阅号(必填) start_date: type: string format: date description: 新订阅起日,缺省=max(业务当天, 合同生效日);须 ≤ 合同止期。结束日恒取合同止期 term: type: string description: 订阅方式(yearly/quarterly/monthly);缺省按档位与账期派生 required: - replaces_subscription_id required: - contract_amount_cents - service_months - start_date - end_date - agent_name - agent_mobile - agent_handover_on required: - data x-error-codes: [60001, 60201, 60207, 60209, 60210, 60211] responses: "200": description: 成功。统一信封 code/message/data /contract/update@v1: post: summary: 编辑合同 description: 编号与签约客户不可改;条目按 item_id 三向对比增删改。可改范围=bos-invariant::contract_edit_scope 的两条轴(billing:金额/服务期(月)/期间/服务构成;archive:合同类型/签署日期/外部单号/交接日期),两轴独立判定、source=operator_sync 全只读(KLT-L220)、已开通两轴全冻(KLT-L219)、录后 72 小时内两轴全开、未生效只放 billing、未到期只放 archive;经办人(created_by 与录入经办人机构/姓名/联系方式)建后恒只读(KLT-L221);agent_* 为运营商交接单上的经办人,受各自轴约束。⚠️ 2026-11-17:`ip_entries`/`has_fixed_ip` 已下线(视为未知键 ⇒ 11103,境外 IP 由套餐档位 × 订阅份数表达)。保存形态=只提交变了的字段(键缺席=保持现值);审计 INSERT 与业务语句同批提交。 operationId: contract_update tags: - 合同 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/contract/code' x-action: $ref: '#/components/x-actions/update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: contract_id: type: string description: 合同 ID row_version: type: integer description: 乐观锁版本 external_no: type: string description: 外部合同号 contract_type: type: string description: 合同类型(new/renew/expand/change);受 archive 轴约束 enum: - new - renew - expand - change sign_date: type: string description: 签署日期(受 archive 轴约束) format: date contract_amount_cents: type: integer description: 合同金额(分) service_months: type: integer description: 服务期(月,1~600);受 billing 轴约束,结束日按「生效日+服务期−1 天」重算 minimum: 1 maximum: 600 start_date: type: string description: 开始日期 format: date end_date: type: string description: 结束日期 format: date agent_name: type: string description: 运营商经办人姓名(交接单口径,不是录入账号 created_by);受 billing/archive 轴约束,冻结时提交改动值 ⇒ KLT-L219/L220 agent_mobile: type: string description: 运营商经办人联系方式(交接单三段之三;archive 轴) agent_handover_on: type: string description: 交接日期(archive 轴) agent_org: type: string description: 运营商经办人机构(交接单三段之一;选填,archive 轴) attachment_url: type: string maxLength: 512 description: >- 合同附件(单值,archive 轴):外部 http(s) 链接,或前缀为 klt/contract/attachment/ 的对象键;空串=清空附件。 service_items: type: array description: >- 服务构成条目(含 item_id 的增删改)。条目形态只含 plan_id/quantity/item_family/ line_exits/item_mode/serves_item_id/serves_item_index/ref_subscription_id(item_family 由档位带入,⛔ 自造);年价/账号数/带宽等旧字段已删列, 出现即视为未知键。D-7/D-9:普通叠加服务用 serves_item_id(或 0 基 serves_item_index) 声明从属,服务端按父子关系回树;增量条目用 item_mode=increment + ref_subscription_id 引用既有链路订阅(⛔ 再挂 serves_*)。订阅/工单/台账列表不扩散,仍平铺。 items: type: object properties: item_id: type: string description: 既有条目主键(三向对比:带=UPDATE/不带=INSERT/库有载荷无=DELETE) plan_id: type: string description: 档位 ID quantity: type: integer description: 份数:link 档恒 1;addon 档≥1 item_family: type: string description: 交付形态(只读确认位,可缺省):与档位 plan_family 不同即 KLT-L216 enum: - link - addon item_mode: type: string description: >- 条目模式(D-9):new=常规;increment=增量叠加服务(档位必须为 addon,且只引用 ref_subscription_id,⛔ 挂 serves_*)。读口按同一编码回传。 enum: - new - increment serves_item_index: type: integer minimum: 0 description: 父条目在本载荷 service_items 的 0 基下标(普通叠加服务、父条目为本次新建时用) serves_item_id: type: string description: >- 父条目 ID(普通叠加服务、父条目已存在时用);与 serves_item_index 二选一, 同时给即 11103;增量条目⛔ 不得填本键 ref_subscription_id: type: string description: >- 增量合同引用的原订阅号(D-2):item_mode=increment 时必填,须属本客户、为 link 档、 状态 ∈ active/pending;非增量条目带本键即 KLT-L216。 line_exits: type: array maxItems: 1 description: 线路出口(单选,长度 1) items: type: string required: - contract_id - row_version required: - data x-error-codes: [60001, 60201, 60207, 60209, 60210, 60211, 60228, 60229, 60230] responses: "200": description: 成功。统一信封 code/message/data /contract/get_list@v1: post: summary: 合同列表 description: >- 按客户/状态等筛选合同列表。每行随 `attachment_kind`(none/link/object/other)说明附件形态; `attachment_view_url` 在列表口恒 null(签名只在详情读口现签,不按行 N 次调平台)。 operationId: contract_get_list tags: - 合同 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/contract/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 列表筛选参数 properties: page: type: integer description: 页码(0 基索引,默认 0) minimum: 0 default: 0 page_size: type: integer description: 每页条数(默认 20,上限 200) minimum: 1 maximum: 200 default: 20 keyword: type: string description: 关键字筛选(可选) customer_id: type: string description: 客户 ID 筛选 status: type: string description: 状态筛选 opened: type: boolean description: 是否已开通筛选(三态:true/false/缺省不筛) required: - data x-error-codes: [60001, 60201, 60207, 60209, 60210, 60211] responses: "200": description: 成功。统一信封 code/message/data /contract/change_log@v1: post: summary: 合同修改记录 description: 本合同在 bos_audit_log 的 contract.* 流水(时间倒序+(occurred_at,id) 游标,不用 OFFSET)。先过合同可见性(与详情同一条谓词,越权=11104),再按 resource_type='contract' AND resource_id=$contract_id 取行——不复用 audit/get_list@v1(其对 TeamLead/Ops 按本团队成员过滤,会把可见合同的历史滤空)。行内含 detail.fields(字段级 {old,new})、items_diff(条目的三向增删改);`ip_diff` 仅 2026-11-17 之前的存量行才有(固定 IP 条目已下线)。 operationId: contract_change_log tags: - 合同 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/contract/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: contract_id: type: string description: 合同 ID page_size: type: integer description: 每页条数(默认 20,夹在 1~50) minimum: 1 maximum: 50 default: 20 cursor: type: string description: 游标,形态 occurred_at|id(与审计页同形态);由上一页响应的 next_cursor 原样带回 required: - contract_id required: - data x-error-codes: [60053, 60201, 60207] responses: "200": description: 成功。统一信封 code/message/data(items/page_size/next_cursor/cursor_usable) /contract/get@v1: post: summary: 合同详情 description: >- 按合同 ID 查询详情(含服务条目与 IP 条件)。出参含 edit_scope(billing/archive 两轴 editable+reason,判据=bos-invariant::contract_edit_scope)、created_by/created_by_name/created_by_org/created_by_mobile(录入经办人=录入账号的机构/姓名/联系方式,录入时由账号自动带入、建后只读;联系方式已按需求 §3.3 掩码)。 附件(单值):`attachment_url` 原值照回(外部链接或 klt/contract/attachment/ 下的对象键), `attachment_kind` 说明形态,`attachment_view_url`/`attachment_view_url_expires_at` 为读口现签的短时效下载地址(`link` 形态=原链接);对象键不得当作可直接打开的链接。 D-7:服务条目行额外带 `item_mode`(new/increment)/`serves_item_id`/`ref_subscription_id`, 前端据此把增量叠加服务以父子缩进树呈现;订阅/工单/台账仍为平铺列表,只标注「叠加于 SUB-xxx」。 operationId: contract_get tags: - 合同 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/contract/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: contract_id: type: string description: 合同 ID required: - contract_id required: - data x-error-codes: [60001, 60201, 60207, 60209, 60210, 60211] responses: "200": description: 成功。统一信封 code/message/data /contract/customer_lookup@v1: post: summary: 合同客户身份解析 description: 第3册§4.2 第 1 步:query_type=credit_code 主体号精确点查/identity 归一化精确点查/keyword 客户名称模糊联想;未命中=matched:false 成功响应(不报错),越权读单客户=11104。 operationId: contract_customer_lookup tags: - 合同 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/contract/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: query_type: type: string description: 查询通道 enum: - credit_code - identity - keyword value: type: string description: 查询值(主体号/识别号/客户名称关键字) required: - query_type - value required: - data x-error-codes: [60001, 60201, 60207, 60209, 60210, 60211] responses: "200": description: 成功。统一信封 code/message/data /contract/delete@v1: post: summary: 合同条件删除 description: 第3册§4.8:两类阻塞分栏(subscriptions/tickets),有阻塞⇒KLT-L213;工单取数失败⇒KLT-S406(不得中途放行)。 operationId: contract_delete tags: - 合同 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/contract/code' x-action: $ref: '#/components/x-actions/delete/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: contract_id: type: string description: 合同 ID required: - contract_id required: - data x-error-codes: [60001, 60201, 60207, 60209, 60210, 60211] responses: "200": description: 成功。统一信封 code/message/data /contract/attachment_discard@v1: post: summary: 回收无人引用的上传附件(孤儿对象) description: >- 还原 2026-11-16 定案的孤儿附件回收:浏览器直传是「先上传、后落库」,用户换文件/移除/ 取消编辑/保存被拦时会在桶里留下无引用对象。平台 unified-oss 明确「不做后台遍历删对象、 不按业务字段回收」,只有即时删除一条通道(object/delete@v1),故回收由本服务在引用面判定后发起。 三条安全线:object_key 必须是本服务前缀下无路径穿越的对象键;查库确认没有任何合同仍指向它; 角色限 Admin/OpsMain(与合同写口同一道闸)。referenced=true 与「对象已不在」都不算失败(幂等)。 operationId: contract_attachment_discard tags: - 合同 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/contract_attachment/code' x-action: $ref: '#/components/x-actions/delete/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: object_key: type: string description: 直传回报的对象键(klt/contract/attachment/ 前缀下) required: - object_key required: - data x-error-codes: [60001, 60004, 60006, 60058, 60201] responses: "200": description: 成功。统一信封 code/message/data /subscription/create@v1: post: summary: 新建订阅 description: 拒收 line_exits、sub_mode、order_no、新建时的 end_date、opened_at。 响应 data 附 delivery_ticket=交付侧建单结论(工单册§3.2.3):kind=open/service_open/ merged(并入既有未完成开户工单,工单册§7.5)/failed/skipped,另有 ticket_id、ticket_no、 items=本次落地服务清单项数、note=面向运营的说明。工单侧失败不回滚订阅(订阅仍已保存), 此时 failed=true,运营须按 note 人工补发工单。 operationId: subscription_create tags: - 订阅 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/subscription/code' x-action: $ref: '#/components/x-actions/create/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: customer_id: type: string description: 客户 ID plan_id: type: string description: 档位 ID contract_id: type: string description: 合同 ID contract_item_id: type: string description: 合同服务条目 ID(可空=该合同内一条匹配条目都没有,服务端按档位反查) start_date: type: string description: 订阅开始日期 format: date annual_price_cents: type: integer description: 不得传的只读派生列:按档位与账期折算落库(传值即 KLT-S20004 拒收) monthly_settle_cents: type: integer description: 不得传的只读派生列:由 `monthly_settle_of` 按年价折算落库(传值即 KLT-S20004 拒收) plan_family: type: string description: 交付形态(只读确认位,可缺省):只能与所选档位的 plan_family 相同,不同即 11103 enum: - link - addon term: type: string description: 账期(三态:yearly/quarterly/monthly) enum: - yearly - quarterly - monthly trial_months: type: integer description: 试用月数(默认 0,≥0) minimum: 0 discount_monthly_cents: type: integer description: 每月优惠金额(分,默认 0,≥0) minimum: 0 required: - customer_id - plan_id - contract_id - start_date required: - data x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222] responses: "200": description: 成功。统一信封 code/message/data /subscription/change@v1: post: summary: 订阅升降配 description: >- 升降配须填 replaces_subscription_id 与 contract_id(新合同,不得沿用原合同;缺省时回退原合同并在回执说明中提示)。 `contract_item_id` 给出时按其取条目并校验档位匹配,缺省时按新档位在合同内反查。 `customer_id` 仅做一致性校验(与原订阅客户不同即 60201/KLT-M221)。 年价、月结算标准、end_date、线路出口、用途分类为只读派生列,传即 11103。 ⚠️ 2026-11-17 起本口保留为「单订阅快捷通道」:常规路径是在合同新建页逐条带 service_items[].succession 一次提交(见 /contract/create@v1);两条路径共用同一份计划层与 截原谓词(已被替换过 ⇒ KLT-M226)。工单类型按交付态:已交付且客户在用 ⇒ 一张 updown (新档交付+原档回收,清单带原值/新值);未交付 ⇒ open/service_open。 operationId: subscription_change tags: - 订阅 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/subscription/code' x-action: $ref: '#/components/x-actions/update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: replaces_subscription_id: type: string description: 被替换的原订阅 ID customer_id: type: string description: 客户 ID plan_id: type: string description: 新档位 ID contract_id: type: string description: 新合同 ID(不得沿用原合同) contract_item_id: type: string description: 新合同服务条目 ID start_date: type: string description: 新订阅开始日期 format: date annual_price_cents: type: integer description: 只读派生列(服务端按档位与时长折算);传即 11103 readOnly: true monthly_settle_cents: type: integer description: 只读派生列(服务端按档位折算);传即 11103 readOnly: true plan_family: type: string description: 只读派生列(随新档位);传不同值即 11103 readOnly: true enum: - link - addon term: type: string description: 账期(三态:yearly/quarterly/monthly;缺省沿用原订阅或按年) enum: - yearly - quarterly - monthly trial_months: type: integer description: 试用月数(默认 0,≥0) minimum: 0 discount_monthly_cents: type: integer description: 每月优惠金额(分,默认 0,≥0) minimum: 0 row_version: type: integer description: 乐观锁版本号(可选,缺省不校验) required: - replaces_subscription_id - plan_id - contract_id required: - data x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222] responses: "200": description: 成功。统一信封 code/message/data /subscription/replacement_candidates@v1: post: summary: 替换候选探测(只读) description: >- 合同新建页逐条判定「是否已有可替换的原订阅」(契约内逐条替换=升降配,2026-11-17)。 交付形态唯一取档位 `plan_family`(D-15),按「同客户 × 同出口 × 双方均 link」 过滤(status ∈ active/pending、排除 addon 档、排除已被指过的 replaces_subscription_id), 与 /contract/create@v1 的保存期校验是**同一份函数**(succession::candidate_filter),前端不得自造候选范围。 index 与 service_items 的 0 基下标对齐;档位或出口判定不出 ⇒ KLT-L222 点名 probes[i]。 operationId: subscription_replacement_candidates tags: - 订阅 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/subscription/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: customer_id: type: string description: 签约客户 ID(候选范围限本客户) probes: type: array description: 探测项(至少 1 项,每项对应一个服务构成条目) items: type: object properties: index: type: integer description: 0 基条目下标(缺省=数组位置) plan_id: type: string description: 档位 ID(交付形态由档位带出) line_exits: type: array maxItems: 1 description: 线路出口(须恰 1 个;缺省时回落档位上的出口集合) items: type: string required: - line_exits required: - customer_id - probes required: - data x-error-codes: [60001, 60201, 60221, 60231] responses: "200": description: >- 成功。data.probes[] 每项回 index/plan_id/plan_family(后端按档位解析)/ line_exit_key/line_exits/candidates[];候选行含 subscription_id/plan_id/plan_name/ plan_kind/contract_id/contract_no/start_date/end_date/status/annual_price_cents/ monthly_settle_cents/customized(true=定制档,须用户显式勾选确认后才允许替换)。 /subscription/stack@v1: post: summary: 订阅叠加(已停用 · 请改走 create) description: D-03 起拒写。权威「叠加」=新建并存订阅,请走 `/subscription/create@v1`(客户在用时自动生成服务开通工单)。本口保留路由与入参形态,一律返回参数错误并点名 create。 operationId: subscription_stack tags: - 订阅 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/subscription/code' x-action: $ref: '#/components/x-actions/create/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: subscription_id: type: string description: 订阅 ID(更新场景) customer_id: type: string description: 客户 ID(叠加新建时) plan_id: type: string description: 档位 ID(叠加新建时) contract_id: type: string description: 合同 ID contract_item_id: type: string description: 合同服务条目 ID annual_price_cents: type: integer description: 年价(分,可改) monthly_settle_cents: type: integer description: 月结算金额(分,可改) end_date: type: string description: 结束日期(可改) format: date start_date: type: string description: 开始日期(叠加新建时) format: date row_version: type: integer description: 乐观锁版本号(可选,缺省不校验) required: - data x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222] responses: "200": description: 成功。统一信封 code/message/data /subscription/get_list@v1: post: summary: 订阅列表 description: >- 按客户等维度筛选订阅列表。D-2:叠加服务订阅行带 `parent_subscription_id`(所属链路订阅号), 列表面板保持平铺并标注「叠加于 SUB-xxx」,不把子订阅折叠进父行(不扩散)。 operationId: subscription_get_list tags: - 订阅 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/subscription/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog # 工单回件 §5.2 B1 点名的「订阅列表」(PG-4 空列表那条):列表行经客户维度收窄 # (subscription.rs:680 get_list → :687 customer_scope_pred),订阅在平台侧登记为 # klt.subscription 树叶 ⇒ 其可见集应由授权上界决定,故按 list 声明真源列举。 # 注意:同 L-2:本轮只打通「声明+上界落到 AuthContext」,运维分支仍走本地口径, # 且注入 id 与我方 subscription_id 对齐的前提=订阅已登记为资源树叶(待平台确认)。 x-enumeration-kind: list requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 列表筛选参数 properties: customer_id: type: string description: 客户 ID(常必填) page: type: integer description: 页码(0 基索引,默认 0) minimum: 0 default: 0 page_size: type: integer description: 每页条数(默认 20,上限 200) minimum: 1 maximum: 200 default: 20 keyword: type: string description: 关键字筛选(可选) status: type: string description: 状态筛选 contract_id: type: string description: 合同 ID 筛选 region_ids: type: array description: 区域 ID 集合(经客户挂载区域展开) items: type: string description: 区域 ID required: - data x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222] responses: "200": description: 成功。统一信封 code/message/data /subscription/get@v1: post: summary: 订阅详情 description: 按订阅 ID 查询详情。 operationId: subscription_get tags: - 订阅 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/subscription/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: subscription_id: type: string description: 订阅 ID required: - subscription_id required: - data x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222] responses: "200": description: 成功。统一信封 code/message/data /subscription/plan_options@v1: post: summary: 订阅档位候选 description: 第3册§5.2 第 3 步:本客户自定义档(含合同条目派生档)+全部固定档,不含他客户自定义档;行内带只读 sub_mode 与 available/unavailable_reason。 operationId: subscription_plan_options tags: - 订阅 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/subscription/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: customer_id: type: string description: 客户 ID(必填) keyword: type: string description: 套餐名称关键字(仅本口有) required: - customer_id required: - data x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222] responses: "200": description: 成功。统一信封 code/message/data /subscription/contract_options@v1: post: summary: 未开通合同与服务条目候选 description: 第3册§5.2 第 2 步:只出「未开通」合同及其尚未被订阅引用的条目;开通态取数失败⇒KLT-S406;无可选合同⇒KLT-M222。 operationId: subscription_contract_options tags: - 订阅 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/subscription/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: customer_id: type: string description: 客户 ID(必填) keyword: type: string description: 合同名称关键字(仅本口有) required: - customer_id required: - data x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222] responses: "200": description: 成功。统一信封 code/message/data /subscription/update@v1: post: summary: 订阅修改(白名单) description: 第3册§5.6:可改字段只有 trial_months/discount_monthly_cents;row_version 必填,落空⇒KLT-S407;换套餐/换合同⇒KLT-M229。 operationId: subscription_update tags: - 订阅 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/subscription/code' x-action: $ref: '#/components/x-actions/update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: subscription_id: type: string description: 订阅 ID row_version: type: integer description: 乐观锁版本号(必填,落空⇒KLT-S407) trial_months: type: integer description: 试用月数(白名单可改) minimum: 0 discount_monthly_cents: type: integer description: 每月优惠金额(分,白名单可改) minimum: 0 required: - subscription_id - row_version required: - data x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222] responses: "200": description: 成功。统一信封 code/message/data /subscription/delete_check@v1: post: summary: 订阅删除前阻塞检查 description: 第3册§5.6:两栏阻塞分列(账单明细⇒KLT-M227、升降配链原订阅⇒KLT-M230);账单只读口未接线⇒billing_state=unconfigured。 operationId: subscription_delete_check tags: - 订阅 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/subscription/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: subscription_id: type: string description: 订阅 ID required: - subscription_id required: - data x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222] responses: "200": description: 成功。统一信封 code/message/data /subscription/delete@v1: post: summary: 删除订阅并回退额度 description: 第3册§5.6:删除前复算阻塞;终态⇒11103;同事务回退 customer.quota_cents,档位 first_referred_at 打点不回滚。 operationId: subscription_delete tags: - 订阅 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/subscription/code' x-action: $ref: '#/components/x-actions/delete/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: subscription_id: type: string description: 订阅 ID required: - subscription_id required: - data x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222] responses: "200": description: 成功。统一信封 code/message/data /subscription/list_all@v1: post: summary: 全部订阅(跨客户) description: 第3册§5.8:跨客户订阅列表,customer_id 可选;region_ids 经客户挂载区域展开;不按客户名称/合同编号检索。 operationId: subscription_list_all tags: - 订阅 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/subscription/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 列表筛选参数 properties: page: type: integer description: 页码 minimum: 1 page_size: type: integer description: 每页条数 minimum: 1 maximum: 500 keyword: type: string description: 关键字筛选 customer_id: type: string description: 客户 ID 筛选(跨客户列表下可选) contract_id: type: string description: 合同 ID 筛选 status: type: string description: 状态筛选 region_ids: type: array description: 区域 ID 集合(经客户挂载区域展开) items: type: string description: 区域 ID required: - data x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222] responses: "200": description: 成功。统一信封 code/message/data /cost_item/save@v1: post: summary: 保存成本项定义 description: 仅 admin。增改成本项定义。拒收金额、客户、运营商、省份、cycle、is_system。 operationId: cost_item_save tags: - 成本与分成 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/cost_item/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: cost_item_id: type: string description: 成本项 ID(更新时必填) category: type: string description: 类别:intl_resource/device_purchase/project_fee enum: - intl_resource - device_purchase - project_fee item_name: type: string description: 成本项名称 billing_unit: type: string description: 计费单位:per_customer/per_account/per_copy enum: - per_customer - per_account - per_copy is_amortized: type: boolean description: 是否摊销 amortization_months: type: integer description: 摊销月数(勾选摊销时可空=每月摊销不结束) deduct_from_base: type: boolean description: 是否从基数扣除 remark: type: string description: 备注 row_version: type: integer description: 乐观锁版本(更新时) required: - category - item_name - billing_unit - is_amortized - deduct_from_base required: - data x-error-codes: [60001] responses: "200": description: 成功。统一信封 code/message/data /cost_item/delete@v1: post: summary: 删除成本项定义 description: 仅 admin。顺序固定「引用检查 → 真删」;按 plan_cost_item.item_name 名称弱引用反查, 命中 ⇒ KLT-E002 并在 data.referring_plan_count 回引用档位数(文案含「先在档位上解除引用」出路)。 无引用才真删:同一批清理该成本项名下全部 cost_amount 行(级联行数只进审计摘要、不进响应体)。 operationId: cost_item_delete tags: - 成本与分成 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/cost_item/code' x-action: $ref: '#/components/x-actions/delete/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: cost_item_id: type: string description: 成本项 ID(待删除的定义主键) required: - cost_item_id required: - data x-error-codes: [60005, 60302] responses: "200": description: 成功。统一信封 code/message/data /cost_item/get_list@v1: post: summary: 成本项列表 description: 全局成本项目录;可选类别/名称关键字;无客户过滤。 operationId: cost_item_get_list tags: - 成本与分成 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/cost_item/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 列表筛选参数 properties: page: type: integer description: 页码(0 基索引,默认 0) minimum: 0 default: 0 page_size: type: integer description: 每页条数(默认 20,上限 200) minimum: 1 maximum: 200 default: 20 keyword: type: string description: 关键字筛选(可选) category: type: string description: 类别筛选 required: - data x-error-codes: [60001] responses: "200": description: 成功。统一信封 code/message/data /cost_amount/save@v1: post: summary: 保存成本金额 description: 按「省份×运营商×成本项」只写差异金额;留空项表示删除该差异。 operationId: cost_amount_save tags: - 成本与分成 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/cost_amount/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: province_node_id: type: string description: 省份节点 ID operator_id: type: string description: 运营商 ID items: type: array description: 变更项列表;留空金额表示删除该差异行 items: type: object properties: cost_item_id: type: string description: 成本项 ID amount_cents: type: integer description: 金额(分);空/省略表示删除 row_version: type: integer description: 乐观锁版本 required: - cost_item_id required: - province_node_id - operator_id - items required: - data x-error-codes: [60001] responses: "200": description: 成功。统一信封 code/message/data /cost_amount/get_list@v1: post: summary: 成本金额一览 description: 透视表;admin 全量,区域运营按可见省/运营商收窄。 operationId: cost_amount_get_list tags: - 成本与分成 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/cost_amount/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 列表筛选参数 properties: province_node_id: type: string description: 省份筛选 operator_id: type: string description: 运营商筛选 page: type: integer description: 页码(0 基索引,默认 0) minimum: 0 default: 0 page_size: type: integer description: 每页条数(默认 20,上限 200) minimum: 1 maximum: 200 default: 20 keyword: type: string description: 关键字筛选(可选) required: - data x-error-codes: [60001] responses: "200": description: 成功。统一信封 code/message/data /share_rule/save@v1: post: summary: 保存分成规则 description: holder_type 仅 operator/ops_team(无 partner)。share_value 填 0/负表示删除该行。 operationId: share_rule_save tags: - 成本与分成 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/share_rule/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: holder_type: type: string description: 持有方类型:operator/ops_team enum: - operator - ops_team holder_id: type: string description: 持有方 ID rules: type: array description: 规则行列表 items: type: object properties: rule_id: type: string description: 规则 ID(更新/删除时) customer_id: type: string description: 客户 ID rule_level: type: string description: 规则层级:contract_addon/region_regular enum: - contract_addon - region_regular share_mode: type: string description: 分成方式:ratio_total/per_account/fixed_amount enum: - ratio_total - per_account - fixed_amount share_value: type: number description: 分成值:比例 (0,1];金额/每账号>0 分;0/负=删除该行 remark: type: string description: 备注 required: - holder_type - holder_id - rules required: - data x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data /share_rule/get_list@v1: post: summary: 分成规则列表 description: 按持有方等条件列出分成规则。 operationId: share_rule_get_list tags: - 成本与分成 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/share_rule/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 列表筛选参数 properties: holder_type: type: string description: 持有方类型 holder_id: type: string description: 持有方 ID page: type: integer description: 页码(0 基索引,默认 0) minimum: 0 default: 0 page_size: type: integer description: 每页条数(默认 20,上限 200) minimum: 1 maximum: 200 default: 20 keyword: type: string description: 关键字筛选(可选) required: - data x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data /share_rule/get@v1: post: summary: 分成规则详情 description: 按持有方一次返回四卡摘要与规则表。 operationId: share_rule_get tags: - 成本与分成 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/share_rule/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: holder_type: type: string description: 持有方类型:operator/ops_team holder_id: type: string description: 持有方 ID required: - holder_type - holder_id required: - data x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data /share_rule/delete@v1: post: summary: 删除分成规则 description: 按 rule_id 删除单条分成规则(亦可在 save 内以 0/负值删除)。 operationId: share_rule_delete tags: - 成本与分成 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/share_rule/code' x-action: $ref: '#/components/x-actions/delete/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: rule_id: type: string description: 规则 ID required: - rule_id required: - data x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data /opsview/home@v1: get: summary: 运维只读首页 description: 运维侧只读首页(U-60),返回工单/逾期等概览数据。 operationId: opsview_home tags: - 运维视图 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/opsview/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data /jobs/get_list@v1: get: summary: 定时作业清单 description: 返回第 10 册 13 行清单(注册位 11 +标注行 2)及运行态:启用态、可操作性位、最近执行、五格计数、累计轮次、KPI 五卡与待补跑轮次。运行态取数失败时仍返回 13 行,runtime_available=false。 operationId: jobs_get_list tags: - 定时作业 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/jobs/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data /jobs/toggle@v1: post: summary: 启停定时作业 description: 仅 admin。按作业 key 启停。 operationId: jobs_toggle tags: - 定时作业 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/jobs/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: key: type: string description: 作业键 enabled: type: boolean description: 是否启用 required: - key - enabled required: - data x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data /jobs/runs@v1: post: summary: 作业执行记录 description: 查询执行记录,支持任务、关键字(执行编号/任务/结果说明,不检索对象级明细)、触发方式、执行结果与日期区间筛选;分页 page 0 基、page_size 默认 50。标注行返回空流水并标记 annotation=true。 operationId: jobs_runs tags: - 定时作业 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/jobs/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: key: type: string description: 作业键(可省略=全部任务) job_key: type: string description: 作业键(契约字段名,可省略) keyword: type: string description: 关键字(执行编号/任务/结果说明;不检索对象级明细) trigger: type: string description: 触发方式 enum: - 定时 - 事件 - 人工 result: type: string description: 执行结果 enum: - 成功 - 部分成功 - 失败 - 异常 date_from: type: string description: 开始日期(YYYY-MM-DD,Asia/Shanghai 日界) pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}$' date_to: type: string description: 结束日期(YYYY-MM-DD,含当日) pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}$' page: type: integer description: 页码(0 基,默认 0) minimum: 0 default: 0 page_size: type: integer description: 每页条数(默认 50,上限 200) minimum: 1 maximum: 200 default: 50 required: - data x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data /jobs/run_once@v1: post: summary: 补跑作业一次 description: 触发一次指定作业。prod 环境仅总运营可补跑。可选 key:SUB-EFF/SNAPSHOT-FREEZE/DELEG-SYNC/STOP-GEN/OVERDUE/AUTO-CLOSE/RECON/ORPHAN-CLEAN/REGION-WARM/ONEDIR-CHECK/OSS-ORPHAN-CLEAN/CONTRACT-RENEW。执行轮次落 bos_job_run,返回本轮五格计数与对象级明细。`AUTO-CLOSE`=手册 P7「客户 7 天未确认则系统自动关闭」:扫停在 completed 的故障/售后**客户自报**单,完成日早于「业务日 − 7 天」的逐张置 settled(动作键 confirm_close、主体 AUTO-CLOSE);运维代建/系统生成单不进本作业(标记完成即结束)。`STOP-GEN`/`AUTO-CLOSE`/`CONTRACT-RENEW` 可选传 biz_date(YYYY-MM-DD,缺省=今天)补跑历史某日。 operationId: jobs_run_once tags: - 定时作业 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/jobs/code' x-action: $ref: '#/components/x-actions/manage/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: key: type: string description: 作业键 enum: - SUB-EFF - SNAPSHOT-FREEZE - DELEG-SYNC - STOP-GEN - OVERDUE - AUTO-CLOSE - RECON - ORPHAN-CLEAN - REGION-WARM - ONEDIR-CHECK - OSS-ORPHAN-CLEAN - CONTRACT-RENEW period: type: string description: 仅 RECON 用;指定已结束自然月(YYYY-MM)回填,前端传 1 基以外的月份格式即 11103 pattern: '^[0-9]{4}-[0-9]{2}$' biz_date: type: string description: 仅 STOP-GEN/AUTO-CLOSE/CONTRACT-RENEW 用;业务日(YYYY-MM-DD),缺省=当天。STOP-GEN 按「订阅结束日早于该业务日」扫描;CONTRACT-RENEW 按「合同结束日在 [业务日, 业务日+提前天数] 窗口内」扫描;幂等键含业务日 pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}$' required: - key required: - data x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data /share_rule/param_summary@v1: post: summary: 分成参数摘要 description: | 批量取分成方的分成方式/数值与覆盖客户数(分成管理页徽标);最多 500 项。 holders 必填且非空(null/缺键/[] ⇒ 60004);按 holder_type|holder_id 去重; holder_id 号段须匹配发号前缀(operator=OP-/partner=PT-/ops_team=OPS-),空串或前缀不符 ⇒ 11103; 未知主体逐项返回 configured=false+item_error(⛔ 整批 11104);share_value=十进制字符串(与档案 settle_value 同型)。 ⛔ 无 `share-rule/holder-options`(连字符)口;分成方候选=`operator`/`partner`/`ops_team` 的 `get_list`。 operationId: share_rule_param_summary tags: - 成本与分成 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/share_rule/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [11103, 11104] responses: "200": description: 成功。统一信封 code/message/data /billing/config_get@v1: get: summary: 出账配置读 description: 默认对账日、成本生效口径、行版本与运营商对账账号列表(仅总运营)。 operationId: billing_config_get tags: - 计费与对账 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/billing_config/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data /billing/config_update@v1: post: summary: 出账配置写 description: 乐观锁 row_version;提交同值 ⇒ changed=0 不写审计;运营商对账日只读(写口在 operator/update)。 operationId: billing_config_update tags: - 计费与对账 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/billing_config/code' x-action: $ref: '#/components/x-actions/update/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [11103, 60001] responses: "200": description: 成功。统一信封 code/message/data /recon/periods@v1: get: summary: 对账期次下拉 description: 有数据的自然月(倒序),不并入 get_list。 operationId: recon_periods tags: - 计费与对账 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/recon/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data /recon/get_list@v1: post: summary: 对账批次清单 description: 三统计卡与期次出账进度随同一响应下发;出账状态为派生筛选(settled/abnormal/unsettled)。 operationId: recon_get_list tags: - 计费与对账 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/recon/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [11103] responses: "200": description: 成功。统一信封 code/message/data /recon/detail@v1: get: summary: 对账批次详情 description: 批次头+活跃明细行+动作可用性布尔位(服务端算)。 operationId: recon_detail tags: - 计费与对账 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/recon/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [11103, 11104] responses: "200": description: 成功。统一信封 code/message/data /recon/rerun@v1: post: summary: 人工补跑出账 description: 仅总运营。四道前置依次返回 KLT-H20502/60503/60504/60506;作废旧 failed 批并回填 replaced_by_batch_no。 operationId: recon_rerun tags: - 计费与对账 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/recon/code' x-action: $ref: '#/components/x-actions/update/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [11103, 60502, 60503, 60504, 60506, 60001] responses: "200": description: 成功。统一信封 code/message/data /recon/export_list@v1: post: summary: 导出对账清单(B 表) description: 按当前筛选结果导出批次清单一行一批次,末行合计;行集与 /recon/get_list 同源;未加筛选=导出全部批次;每次导出写操作日志(记筛选条件与导出批数)。 operationId: recon_export_list tags: - 计费与对账 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/recon/code' x-action: $ref: '#/components/x-actions/export/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [11103] responses: "200": description: 成功。统一信封 code/message/data /recon/export_detail@v1: post: summary: 导出账单明细(A 表) description: 导出本批交给分成方核对的账单明细,一行一条末行本批合计;本批未执行或无明细返回 KLT-H20505(不产文件不写审计)。 operationId: recon_export_detail tags: - 计费与对账 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/recon/code' x-action: $ref: '#/components/x-actions/export/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [11103, 11104, 60505] responses: "200": description: 成功。统一信封 code/message/data /view/partner_recon@v1: get: summary: 合伙人与运维团队本方对账合并页 description: 第 8 册 V-I1。卡 1(分成方式与取值)+卡 2/3(批次数与明细条数)+表 1(本方对账清单)+表 2(本方账单明细)+卡 4(分成合计双值)+月份选项一次返回;行集恒等于「分成方=本方」,入参只有 month/keyword/page/page_size,任何范围类入参 ⇒ 11103。快照未建立 ⇒ snapshot_state=not_ready(整页态,仍回 200 与空骨架);月份选项取数失败 ⇒ month_options="failed"。 operationId: view_partner_recon tags: - 合伙人与运营商只读视图 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/view/code' x-action: $ref: '#/components/x-actions/partner_recon/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [11103, 11104] parameters: - name: month in: query required: false schema: type: string description: 自然月 YYYY-MM;省略=全部自然月 - name: keyword in: query required: false schema: type: string description: 对账单号/明细号模糊匹配(不分大小写) - name: page in: query required: false schema: type: integer minimum: 0 default: 0 description: 页码(0 基索引) - name: page_size in: query required: false schema: type: integer minimum: 1 maximum: 200 default: 20 responses: "200": description: 成功。统一信封 code/message/data /bill/get_list@v1: post: summary: 账单明细清单 description: 只含进入 executed 批次的 active 行。 operationId: bill_get_list tags: - 计费与对账 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/bill/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [11103] responses: "200": description: 成功。统一信封 code/message/data /bill/detail@v1: get: summary: 账单明细详情 description: 头+成本明细+在期分账号+同订阅其他分成方,七段同源一个接口。 operationId: bill_detail tags: - 计费与对账 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/bill/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [11103, 11104] responses: "200": description: 成功。统一信封 code/message/data /correction/create@v1: post: summary: 登记出账更正 description: 表单仅两字段(关联账单+错误内容);KLT-H20501 识别不到归属、KLT-H20507 候选未出账。不接受入参 `scope`/`severity`/`region_node_id`(三者皆为系统推导值),出现即 11103 且 `data.fields[]` 逐键给出原因。 operationId: correction_create tags: - 计费与对账 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/correction/code' x-action: $ref: '#/components/x-actions/create/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [11103, 11104, 60501, 60507, 60056] responses: "200": description: 成功。统一信封 code/message/data /correction/get_list@v1: post: summary: 出账更正列表 description: 自然月筛选不预选;无编辑/删除/导出入口。 operationId: correction_get_list tags: - 计费与对账 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/correction/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [11103] responses: "200": description: 成功。统一信封 code/message/data /correction/detail@v1: get: summary: 出账更正详情 description: 命中/未命中两种展示同源;越权与查无同码(11104)。 operationId: correction_detail tags: - 计费与对账 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/correction/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [11103, 11104] responses: "200": description: 成功。统一信封 code/message/data /correction/draft_save@v1: post: summary: 保存更正草稿 description: 按「admin × 本机」至多一份;表单整体 ≤64KB;不接受 user_id。 operationId: correction_draft_save tags: - 计费与对账 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/correction/code' x-action: $ref: '#/components/x-actions/update/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [11103] responses: "200": description: 成功。统一信封 code/message/data /correction/draft_get@v1: get: summary: 读取更正草稿 description: 无草稿 ⇒ 成功+空对象(不报 404/不报业务码)。 operationId: correction_draft_get tags: - 计费与对账 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/correction/code' x-action: $ref: '#/components/x-actions/view/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [] responses: "200": description: 成功。统一信封 code/message/data /ticket/list@v1: post: summary: 工单列表查询 description: 跨 6 类工单统一分页;行集=判权谓词+可见范围五档+数据权限;排序=是否已超期→优先级→提醒时限(TK-1)。出参每行带 row_version 与可执行动作集合(服务端计算,前端不自拼)。主要失败:网关 11104(缺权限)。 operationId: ticket_list tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: ticket_types: type: array description: 工单类型(英文码):开户、服务开通、到期停机、服务停用、故障处理、售后处理;缺省=全部。兼容单数写法 `ticket_type`(传单字符串或逗号分隔串同样生效) items: type: string statuses: type: array description: 工单状态(未分派/待处理/处理中/已满足闭环/待回执/已办结);缺省=全部。兼容单数写法 `status`(传单字符串或逗号分隔串同样生效) items: type: string sources: type: array description: 来源:self/cust_svc/ops/system;缺省=全部。兼容单数写法 `source`(传单字符串或逗号分隔串同样生效) items: type: string date_from: type: string description: 建单日期起(YYYY-MM-DD) date_to: type: string description: 建单日期止(YYYY-MM-DD) keyword: type: string description: 关键字:标题/客户名/工单号/关联单号/网络账号/工单 ID(雪花主键,纯数字关键字按**整值**精确命中——即审计日志「对象」列那串数字;不做前缀/模糊匹配,避免 1~4 位数字命中全表;不含报文原文) subscription_id: type: string description: 订单(订阅)过滤:只回本订单的工单(订单详情「关联工单」现查,P3-D6)。空串=不过滤 contract_id: type: string description: 合同过滤:服务端先把该合同下的订单解成集合再过滤,合同还没有订单时回空集(不退化成不过滤,P3-D7)。空串=不过滤 customer_id: type: string description: 客户过滤:只回本客户的工单。空串=不过滤 assignee: type: string description: 责任人过滤:**只接受 `me`**(服务端按会话解析成当前登录账号,与可见性谓词逐段取交);供「我的待办」把可见行集收窄到本人名下。⛔ 接受任意 user_id(按他人过滤不开放),其它取值回 11103。空串=不过滤 page: type: integer description: 页码,从 1 起(越界收敛,不报错) page_size: type: integer description: 每页条数,1–100,缺省 10 required: - data x-error-codes: [11104] responses: "200": description: 成功。统一信封 code/message/data /ticket/detail@v1: get: summary: 工单详情查询 description: >- 出参骨架+时间线+按类型子域块(回填、分账号、开停记录、竣工、报文、故障、材料)。 ✅ 2026-11-22:另回只读块 `construction_guide`(套餐/带宽/席位/份数/境外 IP 权益;停机/变更另含 `prior_activation` 最近成功开户回填线路与 IP 只读快照,PIN/CPID 仅「已登记」)与可选 `backfill_draft`(服务端暂存草稿摘要,不明文回 PIN/CPID)。`actions.check_and_backfill` 为真时变更协议走「核对并回填」合并口(同批清单+回填),独立 `check_done` 对 `updown` 关闭。 D-10:并行出单时另有 `subscriptions[]`。读事件:read_event 为真且当前人是责任人且态为待处理 ⇒ 同事务推进处理中并写首条处理记录。主要失败:60056(不可见)、KLT-G20401。 operationId: ticket_detail tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/detail/code' x-version: v1 x-permission-visibility: catalog parameters: - name: ticket_id in: query required: false description: 工单标识(内部主键)。注意:与 ticket_no 二者至少给一个,都给以本参数为准 schema: type: string - name: ticket_no in: query required: false description: 业务工单号(形如 T-20261114-5968)。客户门户不暴露内部主键,列表只回 ticket_no, 故详情口按本参数定位;反查**在可见性谓词之内**执行,查无与越权同回 60005 (与按主键查无同一口径,不说破「存在但你不能看」) schema: type: string - name: read_event in: query required: false description: 阅读推进开关:true 时才尝试待处理→处理中 schema: type: string x-error-codes: [11103, 60005] responses: "200": description: 成功。统一信封 code/message/data /ticket/pending_queue@v1: post: summary: 待分派队列查询 description: 运维主管/运维组负责人的分派工作台数据源;权限键与工单列表分列,不复用(TK-13)。行集=可见范围内未分派+待处理(注意:待处理入列理由待裁定,18册 U-13)。 operationId: ticket_pending_queue tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/pending_queue/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: ticket_types: type: array description: 工单类型;缺省=本人团队可受理全部类型(授权范围是上限) items: type: string assign_team_id: type: string description: 目标运维团队;缺省=本人所辖团队;指定时必须是本人所辖团队 keyword: type: string description: 关键字,含义同工单列表 page: type: integer description: 页码,从 1 起(越界收敛,不报错) page_size: type: integer description: 每页条数,1–100,缺省 10 required: - data x-error-codes: [11104] responses: "200": description: 成功。统一信封 code/message/data /ticket/todo_counts@v1: get: summary: 待办计数查询 description: 一次返回四个角标:未分派、超期、待回填、报文待处置。不做超期明细列表(超期明细走工单列表的已超期筛选)。 operationId: ticket_todo_counts tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/todo_counts/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [11104, 60201] responses: "200": description: 成功。统一信封 code/message/data /ticket/trace@v1: get: summary: 跨主体追溯查询 description: 按工单号/报文单号/竣工号任一单值精确定位,返回工单+开停记录+报文+竣工回传+回执的关联链。不支持关键字模糊(U-16)。主要失败:KLT-G20415(无法定位)。 operationId: ticket_trace tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/trace/code' x-version: v1 x-permission-visibility: catalog parameters: - name: ticket_no in: query required: false description: 恪澜通工单号 schema: type: string - name: carrier_order_no in: query required: false description: 运营商单号 schema: type: string - name: completion_no in: query required: false description: 竣工单号 schema: type: string - name: ticket_id in: query required: false description: 工单标识 schema: type: string x-error-codes: [11104] responses: "200": description: 成功。统一信封 code/message/data /message/pending@v1: post: summary: 报文待处置队列查询 description: 运维主管/运维组负责人的报文处置工作台数据源;不返回 raw_payload 正文(D7、U-51),只回动作/单号/归属态+归属失败原因码等已脱敏列。 operationId: message_pending tags: - 报文人工处置 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/message/code' x-action: $ref: '#/components/x-actions/pending/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: page: type: integer description: 页码,从 1 起(越界收敛,不报错) page_size: type: integer description: 每页条数,1–100,缺省 10 required: - data x-error-codes: [11104] responses: "200": description: 成功。统一信封 code/message/data /ticket/create@v1: post: summary: 新建工单 description: 6 类共用;一次原子提交:客户当前在办唯一性(KLT-G20405)→ 雪花发号 → 建单+状态历史+建单动作+首条处理记录+初始材料。入参不得出现金额/资费/带宽购买/对账字段;不得传 status/assign_*(传入报 11103)。主要失败:11103、60056、KLT-G20405、11112、KLT-G20416。角色闸门按类型选档(手册 P7「客户通过企业微信联系/客服转交后运维代建」):`fault`/`after_sale` 放行七档=admin、opsMain、opsSub、teamLead、enterprise、sub + **运维成员 ops(代客建单,落 submitter_type='ops',不冒充客户自建)**;`service_open`/`expiry_stop`/`open` 三类仍走六档,ops 建主线单报 11104。
**`service_stop`(运营人工发起,工单§3.2.1「运营人工发起(客户详情页/订阅详情页)」+手册 P6)=本入口受理的第 3 类**:档位从六档**收紧到运营三类**=admin、opsMain、opsSub(客户两档/团队主/运维成员发起报 11104,代客建单页不开放本类型选项),并须同时满足三条——① 带 `subscription_id` 且该订阅属于 `customer_id`;② 服务**未到期**(订阅落库态非 expired/replaced/cancelled,且到期日不早于当日;到期停机由 STOP-GEN 作业出 `expiry_stop`,不得人工补单);③ `confirm=true` 显式二次确认。三条任一不成立即不建单(分别报 11103/60001/11103);受理成功后 `submitter_type` 记 `ops`,并按工单§3.2.3 随单落一条 `exec_status='pending'` 的待执行开停记录(形态与 STOP-GEN 建的到期停机单一致,生效日期/回填号两栏留空,后续由 `ticket/handle@v1` 回填时写)。 operationId: ticket_create tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/create/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: ticket_type: type: string description: 工单类型(6 个英文码之一:开户、服务开通、到期停机、服务停用、故障处理、售后处理) customer_id: type: string description: 客户标识 title: type: string description: 工单标题 detail: type: string description: 工单详情(工单描述) subscription_id: type: string description: 关联订阅标识;服务开通类可不关联。**`ticket_type=service_stop` 时必填**,且该订阅必须属于 `customer_id` 那个客户、服务未到期(工单§3.2.1) confirm: type: boolean description: 提交时二次确认。客户两档发起 `fault`/`after_sale` 必须 `true`;运营发起 `service_stop` 必须 `true`(缺省或非 `true` 报 11103,工单§3.2.1/手册 P6) materials: type: array description: 初始材料(建单即随附),最多 5 个;超限报 11103 items: type: object properties: oss_key: type: string description: OSS 对象键 file_name: type: string description: 原始文件名 size_bytes: type: integer description: 文件字节数 required: - ticket_type - customer_id - title required: - data x-error-codes: [11103, 11104, 60001, 60108, 60804] responses: "200": description: 成功。统一信封 code/message/data /ticket/assign@v1: post: summary: 手动分派工单 description: 运维主管/组负责人在待分派队列指定处理人(TK-14)。目标处理人必须是在职人员∧本人团队∧持有该单类型;不改已完成/已办结单;不分给自己(自接单走创建即自assign 路径)。主要失败:11104、KLT-G20401、KLT-G20416、KLT-G20417。 operationId: ticket_assign tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/assign/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: ticket_id: type: string description: 工单标识(字符串下发,服务侧转 bigint) assignee_user_id: type: string description: 目标责任人标识 required: - ticket_id - assignee_user_id required: - data x-error-codes: [11103, 60401, 60402] responses: "200": description: 成功。统一信封 code/message/data /ticket/dispatch_auto@v1: post: summary: 自动分派(整批) description: 对目标团队队列内可见的未分派单逐单按负载量最少判定:唯一最少⇒分派到人(assign_type=auto);并列最少/目标团队零人持有该类型⇒不分派,该单留队列并在结果里给出原因。不接受队列筛选条件入参。 operationId: ticket_dispatch_auto tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/dispatch_auto/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: team_id: type: string description: 目标运维团队;缺省=本人所辖团队 required: - team_id required: - data x-error-codes: [11103, 60402] responses: "200": description: 成功。统一信封 code/message/data /ticket/delegate@v1: post: summary: 交接转派 description: 人员交接时把名下未闭环工单批量改派给承接人;不得改派已完成单(TK-10)。承接人必须在职∧同团队∧持有对应工单类型;出参逐单结果,未成功单保持未分派并给原因。 operationId: ticket_delegate tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/delegate/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: ticket_id: type: string description: 被转派的工单标识 trustee_user_id: type: string description: 承接人标识 required: - ticket_id - trustee_user_id required: - data x-error-codes: [60401, 60402, 60416] responses: "200": description: 成功。统一信封 code/message/data /ticket/start@v1: post: summary: 进入处理中(阅读推进) description: 落库入口是工单详情读事件,不是人工按钮(U-39)。分支:待处理→处理中;处理中幂等成功;未分派不推进回成功;已完成/已办结报 KLT-G20401。 operationId: ticket_start tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/start/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: ticket_id: type: string description: 工单标识(字符串下发,服务侧转 bigint) required: - ticket_id required: - data x-error-codes: [60401] responses: "200": description: 成功。统一信封 code/message/data /ticket/backfill@v1: post: summary: 回填竣工信息 description: >- 开户/到期停机/服务停用/变更协议(`updown`)共用,按类型分叉必填矩阵(工单§5.1.1)。 一次原子提交:回填头→明细→开停记录→分账号事实→客户状态+变更历史→订阅实际开通日→处理记录; `updown` 另同批勾选清单(`check_item_ids`)写核对留痕。境外 IP 的 PIN/CPID 经 Keybox 加密入库, 出参不出现明文。`pin_bind_mode`:`shared`(默认,PIN 挂 IP 行)/`per_account`(一账号一 PIN)。 可选 `evidence_material_ids`(`kind=backfill_evidence`)。正式提交成功后删除该单草稿。 ✅ 2026-11-17:不再与合同/订阅交叉比对。主要失败:11103、KLT-G20404、KLT-G20417、11112。 operationId: ticket_backfill tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/backfill/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: ticket_id: type: string description: 工单标识(字符串下发,服务侧转 bigint) exec_conclusion: type: string description: 执行结论:success/partial/fail;partial 存行不生效(工单§5.1.4) conclusion_note: type: string description: 结论说明;非成功时必填(KLT-G20404) actual_opened_date: type: string description: 实际开通日(YYYY-MM-DD,开户类三件套之一) stop_done_date: type: string description: 停机完成日(YYYY-MM-DD,停机类三件套之一) builder_user_id: type: string description: 施工人(可选) evidence_text: type: string description: 凭证说明 pin_bind_mode: type: string description: PIN 绑定模式;缺省 shared enum: - shared - per_account route_rows: type: array description: 组一+组二回填行(按分账号一行;条数比对基准=勾选开账号数) items: type: object properties: sub_account_id: type: string description: 分账号标识;未传⇒视为漏填 network_account_name: type: string description: 网络账号名 intranet_ip: type: string description: 内网 IP subnet_mask: type: string description: 子网掩码 gateway: type: string description: 网关 vlan: type: string description: VLAN vni: type: string description: VNI src_endpoint: type: string description: 源端 dst_endpoint: type: string description: 目的端 egress_pop: type: string description: 出口 POP down_mbps: type: number description: 下行带宽 Mbps(信息项,不参与计价) up_mbps: type: number description: 上行带宽 Mbps(信息项) open_this_time: type: boolean description: 「随本次开通」勾选位,缺省=已勾选 ip_rows: type: array description: >- 组三境外 IP 回填行。D-14:每行带 `action`(allocate/release)。 `per_account` 模式下每绑定账号独立 PIN(经 `sub_account_ids`)。 items: type: object properties: action: type: string description: 行动作:allocate(缺省)/release;其它值 11103 enum: - allocate - release egress: type: string description: 出口 overseas_ip: type: string description: 境外 IP 地址 ip_type: type: string description: IP 类型(fixed_ip/nat_forward) bandwidth_mbps: type: integer description: 带宽档位 Mbps(信息项) pin: type: string description: PIN(明文入参,服务端经 Keybox 加密入库,不明文落库) cpid: type: string description: CPID(同上) sub_account_ids: type: array description: 绑定分账号(per_account 时每账号须有独立 PIN) items: type: string check_item_ids: type: array description: 变更协议(updown)同批勾选的服务项;其它类型忽略 items: type: string check_note: type: string description: 变更协议核对说明(可选) evidence_material_ids: type: array description: 已登记的回填凭证材料 ID(kind=backfill_evidence) items: type: string ext: type: object description: 扩展表单(可选);无已发布模板时忽略 properties: template_id: type: string template_version: type: integer values: type: object additionalProperties: true expected_version: type: integer description: 乐观并发基线(读详情时的 row_version);缺省=不做并发校验 required: - ticket_id required: - data x-error-codes: [11103, 60401, 60403, 60404, 60417] responses: "200": description: 成功。统一信封 code/message/data /ticket/backfill_draft@v1: post: summary: 暂存施工回填草稿 description: >- 服务端暂存回填表单(方案 A)。鉴权同正式回填;⛔ 不调 open_stop_apply、⛔ 不改工单状态、 ⛔ 不递增 attempt_count。PIN/CPID 仅密文入库;读详情 `backfill_draft` 与本口应答均不回明文。 正式 `backfill@v1` 成功后删除该单草稿。乐观锁用草稿自有 `row_version`(与正式回填锁分离)。 operationId: ticket_backfill_draft tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/backfill_draft/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数(字段子集同 backfill,可缺省;中间态允许) properties: ticket_id: type: string description: 工单标识 exec_conclusion: type: string conclusion_note: type: string actual_opened_date: type: string stop_done_date: type: string evidence_text: type: string pin_bind_mode: type: string enum: - shared - per_account route_rows: type: array items: type: object additionalProperties: true ip_rows: type: array items: type: object additionalProperties: true check_item_ids: type: array items: type: string check_note: type: string evidence_material_ids: type: array items: type: string ext: type: object additionalProperties: true expected_version: type: integer description: 草稿 row_version;缺省=不做并发校验 required: - ticket_id required: - data x-error-codes: [11103, 60401, 60417] responses: "200": description: 成功。统一信封 code/message/data(含草稿 row_version;不含 PIN/CPID 明文) /ticket/check_done@v1: post: summary: 服务项完成直接闭环 description: >- 服务开通/故障处理/售后处理勾选服务项并直接闭环;不关联客户/订阅、不回填、不生成回传。 ✅ 2026-11-22:`updown`(变更协议)⛔ 经本口——须走 `backfill@v1` 的「核对并回填」合并提交 (`check_item_ids`+回填同事务),单独核对会与回填双入口死锁。主要失败:KLT-G20404、KLT-G20417。 operationId: ticket_check_done tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/check_done/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: ticket_id: type: string description: 工单标识(字符串下发,服务侧转 bigint) item_ids: type: array description: 本次勾选完成的服务项标识;不由服务端推导(U-15) items: type: string note: type: string description: 说明(故障/售后必填;服务开通可不填) expected_version: type: integer description: 乐观并发基线(读详情时的 row_version);缺省=不做并发校验 required: - ticket_id required: - data x-error-codes: [60401, 60404, 60417] responses: "200": description: 成功。统一信封 code/message/data /ticket/mark_done@v1: post: summary: 标记已处理(仅服务开通) description: 不走手选工单类型(U-04):只有未关联客户/订阅的服务开通工单可走通路 5。必填:未关联原因+说明+处理人(缺项报 KLT-G20404)。前置:服务开通∧客户为空∧订阅为空⇒已办结。注意:2026-11-14 校正代码口径+收口分岔(手册 P7):本口当前只受理 `fault`/`after_sale`(其余类型报 11103),推到 completed 后若该单是**运维代建/系统生成**(submitter_type != 'customer')⇒ 同批直达 settled 并补一条 confirm_close 处理记录,出参 `status='settled'`、`auto_settled=true`、`settled_at`;客户自报的故障/售后行为不变(停在 completed 等 `/ticket/confirm_close@v1`,客户 7 天未确认改由作业 `AUTO-CLOSE` 自动关闭)。 operationId: ticket_mark_done tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/mark_done/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: ticket_id: type: string description: 工单标识(字符串下发,服务侧转 bigint) note: type: string description: 说明(必填,含未关联原因) expected_version: type: integer description: 乐观并发基线(读详情时的 row_version);缺省=不做并发校验 required: - ticket_id - note required: - data x-error-codes: [11103, 60401, 60417] responses: "200": description: 成功。统一信封 code/message/data /ticket/close@v1: post: summary: 关闭工单 description: 仅未分派/待处理可关闭。不得把处理中的单直接关闭(必须先撤回)。主要失败:KLT-G20401、KLT-G20417。 operationId: ticket_close tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/close/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: ticket_id: type: string description: 工单标识(字符串下发,服务侧转 bigint) reason: type: string description: 关闭原因(必填) expected_version: type: integer description: 乐观并发基线(读详情时的 row_version);缺省=不做并发校验 required: - ticket_id - reason required: - data x-error-codes: [60401, 60409, 60413, 60417] responses: "200": description: 成功。统一信封 code/message/data /ticket/withdraw@v1: post: summary: 撤回工单 description: 撤回后状态回未分派、清空 assign_*、责任人写处理记录。不撤回已完成/已办结单。主要失败:KLT-G20401。 operationId: ticket_withdraw tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/withdraw/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: ticket_id: type: string description: 工单标识(字符串下发,服务侧转 bigint) reason: type: string description: 撤回原因(必填) required: - ticket_id - reason required: - data x-error-codes: [60401, 60409, 60414] responses: "200": description: 成功。统一信封 code/message/data /ticket/confirm_close@v1: post: summary: 确认闭环 description: 闭环方式=回执类且已回传未回执时的人工兜底:待回执→已办结。不得在闭环方式=完成后即闭环下调用(KLT-G20415)。 operationId: ticket_confirm_close tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/confirm_close/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: ticket_id: type: string description: 工单标识(字符串下发,服务侧转 bigint) expected_version: type: integer description: 乐观并发基线(读详情时的 row_version);缺省=不做并发校验 required: - ticket_id required: - data x-error-codes: [60401, 60414, 60417] responses: "200": description: 成功。统一信封 code/message/data /ticket/defer@v1: post: summary: 临时延期(延后提醒) description: 两条分支:开停记录提醒(执行结论待处理)与在办未回填提醒(服务开通且未回填)。延期目标日由服务端固定为「今天+超期提醒天数」,不得入参传天数。注意:设计正文的「天数非法 11103」在本实现不存在(无天数入参)。主要失败:KLT-G20415。 operationId: ticket_defer tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/defer/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: ticket_id: type: string description: 工单标识(字符串下发,服务侧转 bigint) defer_scope: type: string description: 延期对象:open_stop(开停记录提醒)/ticket(在办未回填提醒) required: - ticket_id required: - data x-error-codes: [11103, 60401, 60415] responses: "200": description: 成功。统一信封 code/message/data /ticket/urge@v1: post: summary: 站内催办(向「卡在别人手里」的对家发催办信) description: | 工单停在 `completed` 等待对家确认时,向**对家账号**投递一封站内催办信(`bos_inbox_message.kind='ticket_urge'`)。 * 对家=主线五类取承接团队的团队主账号(无主账号回落总运营),故障/售后取提交方账号;续签单没有对家。 * 前置:`status=completed` ∧ 距 `completed_at` 满 24 小时 ∧ 对家≠本人;不满足 ⇒ `KLT-G20424`。 * 收件人、信体、业务日一律服务端取(不收 `to_user_id`/`biz_date`)——收件人可入参就等于开了任意发信通路。 * **一单一天一封**:同一业务日重复调用是**幂等成功**(`created=false`,`reason=already_sent_today`), 由 `bos_inbox_message` 的 `n_recipient (kind, ref_id, user_id)` + `ON CONFLICT DO NOTHING` 兜并发。 * 只写审计(`action=urge`)、**不写处理记录**(工单§8.1:催办不进程客户可见的时间轴)。 operationId: ticket_urge tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/urge/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: ticket_id: type: string description: 工单标识(字符串下发,服务侧转 bigint) required: - ticket_id required: - data x-error-codes: [11103, 11104, 60424] responses: "200": description: 成功。统一信封 code/message/data /ticket/revert@v1: post: summary: 退回重办 description: 把「已完成待确认(completed)/竣工驳回(rejected)」退回「处理中(processing)」,判权=总运营(全平台)或该单承接团队的主账号(仅本团队,2026-11-22 改判),原因必填并写审计。⛔ 已办结(settled)与已关闭(terminated)不可退回——终态只读,改历史走人工数据变更+审计(2026-11-18 定案)。只重开工单,不回滚服务开通状态、实际开通日与已生成的竣工记录(U-46)。主要失败:KLT-G20409、KLT-G20417、KLT-G20418、11104(非总运营且非本团队主)。 operationId: ticket_revert tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/revert/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: ticket_id: type: string description: 工单标识(字符串下发,服务侧转 bigint) reason: type: string description: 退回原因(必填,写入审计) expected_version: type: integer description: 乐观并发基线(读详情时的 row_version);缺省=不做并发校验 required: - ticket_id - reason required: - data x-error-codes: [60409, 60417, 60418] responses: "200": description: 成功。统一信封 code/message/data /completion/generate@v1: post: summary: 生成竣工回传文件 description: 生成出参=文件元信息+可下载凭证;不同步返回文件字节流。回填未通过闸门(结论=成功∧明细齐∧比对通过)时不生成(KLT-G20401)。重复生成⇒作废旧版本、留最新并写处理记录。 operationId: completion_generate tags: - 竣工与回执 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/completion/code' x-action: $ref: '#/components/x-actions/generate/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: ticket_id: type: string description: 工单标识(字符串下发,服务侧转 bigint) required: - ticket_id required: - data x-error-codes: [60401, 60404, 60410, 60417] responses: "200": description: 成功。统一信封 code/message/data /completion/receipt@v1: post: summary: 录入运营商回执 description: 先判定完成日(TK-11):回填三件套齐全⇒取回填日期值;缺失⇒不取回执录入当日(KLT-G20418),须先补录。录入⇒待回执→已办结+AUTO-CLOSE;同事务写完成日与闭环方式来源=回执。主要失败:KLT-G20418、KLT-G20417。注意:该单已被 `completion/reject@v1` 登记驳回时本接口默认拒绝(KLT-G20423 互斥);唯一出口=总运营提交 `override_state_conflict=true`(设计方案§3.3 纠正窗口,以回执为准;非 admin 提交该参数同样落 KLT-G20423)。 operationId: completion_receipt tags: - 竣工与回执 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/completion/code' x-action: $ref: '#/components/x-actions/receipt/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: ticket_id: type: string description: 工单标识(字符串下发,服务侧转 bigint) completion_no: type: string description: 竣工单号;缺省取该单当前有效回传版本 external_order_no: type: string description: 运营商单号 receipt_remark: type: string description: 回执说明 expect_version: type: integer description: 乐观并发基线(读取口回传的 row_version);缺省=不做并发校验 override_state_conflict: type: boolean description: 纠正窗口(设计方案§3.3):仅 admin、仅当该单处于竣工驳回态有效;以回执为准闭环,审计记「驳回态冲突纠正」并引用被推翻的驳回序号,不改写原驳回行。非驳回态提交本参数不产生任何效果。 required: - ticket_id required: - data x-error-codes: [60401, 60410, 60411, 60417, 60423] responses: "200": description: 成功。统一信封 code/message/data /completion/reject@v1: post: summary: 登记竣工驳回 description: 待回执→竣工驳回(U-115 方案 (d));理由必填(枚举 1~3 个,归一化后首位=主原因;`其他` 不得与其它项混选)+补充说明 5~500 字;只可驳回该单**当前最新一次**回传,且工单须停在待回执态;不从已办结驳回(TK-7 同闸,落 KLT-G20423)。同事务写 ticket_completion_reject + 处理记录 `completion_reject` + 审计;不接受调用方传入驳回时刻(一律服务端时间)、不新发驳回号段(对外引用=ticket_id+reject_seq)。主要失败:KLT-G20421、KLT-G20422、KLT-G20423、KLT-G20417。 operationId: completion_reject tags: - 竣工与回执 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/completion/code' x-action: $ref: '#/components/x-actions/reject/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: ticket_id: type: string description: 工单标识(字符串下发,服务侧转 bigint) reason_codes: type: array description: 驳回原因码,1~3 个;「其他」不得与其它项混选;服务端按枚举定义序归一化后落库 items: type: string enum: - doc_mismatch - resource_unavailable - duplicate - out_of_scope - doc_missing - site_not_ready - other minItems: 1 maxItems: 3 reason_text: type: string description: 补充说明,5~500 字(按字符计) completion_no: type: string description: 期望驳回的竣工单号;与当前最新一次回传不一致 ⇒ KLT-G20421(兜住拿旧快照点按钮) external_reject_no: type: string description: 运营商内部编号;不在门户/合伙人回显 expect_version: type: integer description: 乐观并发基线(读取口回传的 row_version);缺省=不做并发校验 required: - ticket_id - reason_codes - reason_text required: - data x-error-codes: [60401, 60410, 60421, 60422, 60423, 60417] responses: "200": description: 成功。统一信封 code/message/data /message/attach@v1: post: summary: 挂接并生效 description: 人工侧只有「挂接并生效」一个动作(§5.6.4,A14 已关闭):一次原子提交⇒报文置已生效+工单侧生效链(与人工回填同一个函数)+回填头改写为报文内容+明细清空+处理记录【运营商反馈】前缀。不得人工指定生效日期(取报文实际日期)。报文动作与工单类型不符报 KLT-G20407(提示语逐字照抄§5.6.3)。主要失败:KLT-G20401、KLT-G20407、KLT-G20419、KLT-G20417。 operationId: message_attach tags: - 报文人工处置 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/message/code' x-action: $ref: '#/components/x-actions/attach/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: message_id: type: string description: 报文标识 ticket_id: type: string description: 拟挂接的工单标识 expect_version: type: integer description: 乐观并发基线(读取口回传的 row_version);缺省=不做并发校验 required: - message_id - ticket_id required: - data x-error-codes: [11104, 60401, 60407, 60419] responses: "200": description: 成功。统一信封 code/message/data /message/void@v1: post: summary: 作废报文 description: 置已作废+原因必填(缺原因报 11103)。不删除 raw_payload(§5.6.5:作废后仍可读)。主要失败:KLT-G20419。 operationId: message_void tags: - 报文人工处置 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/message/code' x-action: $ref: '#/components/x-actions/void/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: message_id: type: string description: 报文标识 void_reason: type: string description: 作废原因(必填) expect_version: type: integer description: 乐观并发基线(读取口回传的 row_version);缺省=不做并发校验 required: - message_id - void_reason required: - data x-error-codes: [60412, 60419] responses: "200": description: 成功。统一信封 code/message/data /message/confirm_conflict@v1: post: summary: 冲突确认 description: 处置方式二选一:维持当前值(仅记录不生效)/采用外部值(触发与挂接相同的生效逻辑)。主要失败:KLT-G20419。 operationId: message_confirm_conflict tags: - 报文人工处置 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/message/code' x-action: $ref: '#/components/x-actions/confirm_conflict/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: message_id: type: string description: 报文标识 disposition: type: string description: 处置方式:as_is(维持当前值)/apply_external(采用外部值并生效);缺省 as_is note: type: string description: 处置说明 expect_version: type: integer description: 乐观并发基线(读取口回传的 row_version);缺省=不做并发校验 required: - message_id required: - data x-error-codes: [60401, 60419] responses: "200": description: 成功。统一信封 code/message/data /message/rematch@v1: post: summary: 改挂归属工单 description: 改挂到另一张工单+写改挂审计;不触发生效(§5.6.4:生效仍走挂接口)。主要失败:KLT-G20407、KLT-G20419。 operationId: message_rematch tags: - 报文人工处置 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/message/code' x-action: $ref: '#/components/x-actions/rematch/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: message_id: type: string description: 报文标识 ticket_id: type: string description: 改挂目标工单标识 expect_version: type: integer description: 乐观并发基线(读取口回传的 row_version);缺省=不做并发校验 required: - message_id - ticket_id required: - data x-error-codes: [60407, 60419] responses: "200": description: 成功。统一信封 code/message/data /ticket/material_grant@v1: post: summary: 材料上传/下载凭证 description: 上传两段(申请凭证 → 直传 → material_attach 登记);下载一段(传 material_id 或 oss_key,服务端现签并直接回 download_url)。一次一凭证、短时效、绑定对象键;不出批量凭证、不开通用上传口。purpose=upload 需 file_name,purpose=download 需 material_id 或 oss_key。终态(settled/terminated)只拦上传,⛔ 拦下载——竣工材料事后仍可导出。不接受对象键上的任意路径。主要失败:11103、60056、KLT-G20401、KLT-G20420。 operationId: ticket_material_grant tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/material_grant/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: ticket_id: type: string description: 工单标识(字符串下发,服务侧转 bigint) kind: type: string description: 材料类别:backfill_evidence(回填凭证)/handover(开通准备资料)/completion_pdf(竣工回传)/construct_material(补充过程材料)/submit_evidence(客户提交材料)。前两类中的回填凭证与竣工回传由服务端在业务事务内登记,不经 material_attach file_name: type: string description: 原始文件名(purpose=upload 时必填) purpose: type: string description: 用途:upload(上传,缺省)/download(下载) material_id: type: string description: 材料主键(purpose=download 二选一,首选)。detail@v1 不下发对象键,列表页下载只能靠它 oss_key: type: string description: OSS 对象键(purpose=download 二选一,仅限刚由 material_attach 换回的同一次交互) required: - ticket_id - kind required: - data x-error-codes: [11103, 11104, 60401, 60804] responses: "200": description: 成功。统一信封 code/message/data /ticket/material_attach@v1: post: summary: 登记材料元信息 description: 登记文件名+大小+上传人+时间+可下载凭证。不把上传动作记进 ticket_process_log(D2)。数量上限:工单材料 5 份、故障处理材料 5 份(超限报 KLT-G20420)。主要失败:KLT-G20420、60056。 operationId: ticket_material_attach tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/material_attach/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: ticket_id: type: string description: 工单标识(字符串下发,服务侧转 bigint) kind: type: string description: 材料类别前缀:attachment/opening/alteration/return/other oss_key: type: string description: OSS 对象键 file_name: type: string description: 原始文件名 size_bytes: type: integer description: 文件字节数 required: - ticket_id - kind - oss_key required: - data x-error-codes: [11103, 11104, 60401] responses: "200": description: 成功。统一信封 code/message/data /ticket/config_get@v1: get: summary: 域配置查询(闭环方式) description: 出参=闭环方式当前值+版本+更新人/更新时间+生效说明;不暴露超期天数等系统参数(U-19)。 operationId: ticket_config_get tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/config_get/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [11104] responses: "200": description: 成功。统一信封 code/message/data /ticket/config_update@v1: post: summary: 域配置修改(闭环方式) description: 仅 admin;一次原子提交⇒配置更新+历史追加+审计;不改既有工单的闭环方式(工单§5.5.3)。主要失败:KLT-G20417。 operationId: ticket_config_update tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/config_update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object description: 统一信封请求体,业务字段放在 data 内 properties: data: type: object description: 业务参数 properties: closure_mode: type: string description: 闭环方式:receipt(回执闭环)/on_complete(完成后即闭环) expect_version: type: integer description: 乐观并发基线(读取口回传的 row_version);缺省=不做并发校验 reason: type: string description: 变更原因 required: - closure_mode required: - data x-error-codes: [11103, 11104, 60001] responses: "200": description: 成功。统一信封 code/message/data /ticket/form_template_get@v1: get: summary: 施工回填扩展模板查询 description: 运营侧可读;可选 ticket_type。回当前 published、draft(若有)、版本列表。权限档对齐 config_get。 operationId: ticket_form_template_get tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/config_get/code' x-version: v1 x-permission-visibility: catalog parameters: - name: ticket_type in: query required: false schema: type: string description: open/updown/expiry_stop/service_stop;缺省=四类全量 x-error-codes: [11103, 11104] responses: "200": description: 成功。统一信封 code/message/data /ticket/form_template_save@v1: post: summary: 施工回填扩展模板保存草稿 description: 仅 admin;每类型至多一个 draft;schema 非法 ⇒ KLT-G20425;并发 ⇒ KLT-S407。权限档对齐 config_update。 operationId: ticket_form_template_save tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/config_update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object properties: data: type: object properties: ticket_type: type: string schema: type: object expect_version: type: integer template_id: type: string required: - ticket_type - schema required: - data x-error-codes: [11103, 11104, 60001, 60425] responses: "200": description: 成功。统一信封 code/message/data /ticket/form_template_publish@v1: post: summary: 施工回填扩展模板发布 description: 仅 admin;旧 published→retired;新增/改 required 须 ack_required_change;失败 KLT-G20425/KLT-S407。权限档对齐 config_update。 operationId: ticket_form_template_publish tags: - 工单与开停交付 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/ticket/code' x-action: $ref: '#/components/x-actions/config_update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object properties: data: type: object properties: ticket_type: type: string template_id: type: string expect_version: type: integer ack_required_change: type: boolean required: - ticket_type required: - data x-error-codes: [11103, 11104, 60001, 60425] responses: "200": description: 成功。统一信封 code/message/data /contract/renewal_config@v1: post: summary: 合同续签提醒配置查询 description: | 续签提前天数(1..180,默认 7)与续签工单生成方式(manual 人工/auto 自动);运营侧三类身份可读。 网关对 klt-bos 一律 POST(与其它合同口同形);响应含 notice_days/generate_mode/row_version。 operationId: contract_renewal_config tags: - 合同 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/contract/code' x-action: $ref: '#/components/x-actions/renewal_config/code' x-version: v1 x-permission-visibility: catalog x-error-codes: [11104] requestBody: required: true description: JSON 请求体,业务字段置于 data(本口无必填业务字段,传空对象即可) content: application/json: schema: type: object properties: data: type: object required: - data responses: "200": description: 成功。统一信封 code/message/data;data 含 notice_days、generate_mode、generate_mode_name、row_version、updated_at、updated_by /contract/renewal_config_update@v1: post: summary: 合同续签提醒配置修改 description: 仅 admin;改提前天数与生成方式,写审计、即刻生效。同值不写库;并发版本不符回 KLT-S407。 operationId: contract_renewal_config_update tags: - 合同 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/contract/code' x-action: $ref: '#/components/x-actions/renewal_config_update/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object properties: data: type: object properties: notice_days: type: integer description: 提前提醒天数(1..180,默认 7) generate_mode: type: string description: 生成方式:manual(人工,先发站内提醒)/auto(自动生成续签工单) enum: [manual, auto] expect_version: type: integer description: 乐观并发基线(读取口回传的 row_version);缺省=不做并发校验 reason: type: string description: 变更原因 required: - notice_days - generate_mode required: - data x-error-codes: [11103, 11104, 60001] responses: "200": description: 成功。统一信封 code/message/data /inbox/list@v1: post: summary: 本人站内提醒箱 description: 未读优先、按时间倒序分页;仅回当前账号本人的消息(来源不可越权)。 operationId: inbox_list tags: - 站内提醒箱 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/inbox/code' x-action: $ref: '#/components/x-actions/list/code' x-version: v1 x-permission-visibility: catalog requestBody: required: false description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object properties: data: type: object properties: unread_only: type: boolean description: 只看未读 page: type: integer description: 页码(1 起) page_size: type: integer description: 每页条数(1..100) x-error-codes: [11104] responses: "200": description: 成功。统一信封 code/message/data /inbox/read@v1: post: summary: 标记站内提醒已读 description: 只能标记本人消息;已读时间只写首次。 operationId: inbox_read tags: - 站内提醒箱 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/inbox/code' x-action: $ref: '#/components/x-actions/read/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object properties: data: type: object properties: message_id: type: string description: 消息 ID(数字串) required: - message_id required: - data x-error-codes: [11103, 11104, 60401] responses: "200": description: 成功。统一信封 code/message/data /inbox/renewal_candidates@v1: post: summary: 续签工单可指派人员 description: 提醒所属客户当期运维团队内、可接 renewal 类型且负责范围覆盖该客户的成员。 operationId: inbox_renewal_candidates tags: - 站内提醒箱 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/inbox/code' x-action: $ref: '#/components/x-actions/renewal_candidates/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object properties: data: type: object properties: message_id: type: string description: 消息 ID(数字串) required: - message_id required: - data x-error-codes: [11103, 11104, 60401] responses: "200": description: 成功。统一信封 code/message/data /inbox/renewal_ticket@v1: post: summary: 读信人生成续签工单并指派 description: 从站内续签提醒一键生成 renewal 工单并分派;同一合同只出一张(已有则复用并改派),生成后同合同提醒全部置为已处理。 operationId: inbox_renewal_ticket tags: - 站内提醒箱 x-require-auth: true x-resource-type: $ref: '#/components/x-resource-types/inbox/code' x-action: $ref: '#/components/x-actions/renewal_ticket/code' x-version: v1 x-permission-visibility: catalog requestBody: required: true description: JSON 请求体,业务字段置于 data content: application/json: schema: type: object properties: data: type: object properties: message_id: type: string description: 提醒消息 ID(数字串) assignee_user_id: type: string description: 承接续签工单的运营人员账号 ID(须在客户当期团队、可接 renewal、负责范围覆盖客户) required: - message_id - assignee_user_id required: - data x-error-codes: [11103, 11104, 60001, 60401] responses: "200": description: 成功。统一信封 code/message/data components: x-resource-types: health: code: 'bos.health' ping: code: 'bos.ping' auth: code: 'bos.auth' region: code: 'bos.region' account: code: 'bos.account' ent_team: code: 'bos.ent_team' ops_team: code: 'bos.ops_team' audit: code: 'bos.audit' activation: code: 'bos.activation' operator: code: 'bos.operator' operator_recon_account: code: 'bos.operator.recon_account' partner: code: 'bos.partner' partner_scope: code: 'bos.partner.scope' ent_team_scope: code: 'bos.ent_team.scope' ops_team_scope: code: 'bos.ops_team.scope' ops_member_scope: code: 'bos.ops_member.scope' ops_team_dispatch_mode: code: 'bos.ops_team.dispatch_mode' ops_team_coverage: code: 'bos.ops_team.coverage' customer: code: 'bos.customer' customer_attribution: code: 'bos.customer.attribution' import_batch: code: 'bos.import_batch' sub_account: code: 'bos.sub_account' delivery: code: 'bos.delivery' catalog: code: 'bos.catalog' plan_cost_item: code: 'bos.plan_cost_item' contract: code: 'bos.contract' contract_attachment: code: 'bos.contract_attachment' subscription: code: 'bos.subscription' cost_item: code: 'bos.cost_item' cost_amount: code: 'bos.cost_amount' share_rule: code: 'bos.share_rule' opsview: code: 'bos.opsview' jobs: code: 'bos.jobs' billing_config: code: 'bos.billing_config' recon: code: 'bos.recon' bill: code: 'bos.bill' correction: code: 'bos.correction' ticket: code: 'bos.ticket' completion: code: 'bos.completion' message: code: 'bos.message' inbox: code: 'bos.inbox' view: code: 'bos.view' portal: code: 'bos.portal' x-actions: view: code: 'view' create: code: 'create' update: code: 'update' delete: code: 'delete' list: code: 'list' manage: code: 'manage' export: code: 'export' detail: code: 'detail' pending_queue: code: 'pending_queue' todo_counts: code: 'todo_counts' trace: code: 'trace' pending: code: 'pending' assign: code: 'assign' dispatch_auto: code: 'dispatch_auto' delegate: code: 'delegate' start: code: 'start' backfill: code: 'backfill' backfill_draft: code: 'backfill_draft' check_done: code: 'check_done' mark_done: code: 'mark_done' close: code: 'close' withdraw: code: 'withdraw' confirm_close: code: 'confirm_close' defer: code: 'defer' revert: code: 'revert' generate: code: 'generate' receipt: code: 'receipt' reject: code: 'reject' attach: code: 'attach' void: code: 'void' confirm_conflict: code: 'confirm_conflict' rematch: code: 'rematch' urge: code: 'urge' material_grant: code: 'material_grant' material_attach: code: 'material_attach' config_get: code: 'config_get' config_update: code: 'config_update' form_template_get: code: 'form_template_get' form_template_save: code: 'form_template_save' form_template_publish: code: 'form_template_publish' renewal_config: code: 'renewal_config' renewal_config_update: code: 'renewal_config_update' read: code: 'read' renewal_candidates: code: 'renewal_candidates' renewal_ticket: code: 'renewal_ticket' partner_recon: code: 'partner_recon' plan_board: code: 'plan_board' schemas: PortalPlanBoardRow: type: object description: | 门户 4 两表的一行(§4.3 七列)。⛔ 金额账目列(已出账/累计成本/分成)、 ⛔ 工单、⛔ 操作位(第 9 册 §4.6)。 properties: subscription_id: type: string description: 订阅 ID(详情入口预留) plan_name: type: string description: 列 1 上行=档位名(订阅快照列,⛔ 现取档位表) contract_id: type: string nullable: true contract_no: type: string nullable: true description: 列 1 下行=合同编号;合同缺失 ⇒「—」 contract_amount_cents: type: integer nullable: true description: 列 3=合同总额(分),来源 contract.amount_cents;缺失 ⇒「—」(⛔ 回落订阅价) sub_mode: type: string nullable: true description: 列 4=冻结方式原码(upgrade/stackable/customized) line_exits: type: array nullable: true description: 列 5=随合同冻结的线路出口集合;空集 ⇒「—」 items: type: string start_date: type: string nullable: true description: 列 6 起 end_date: type: string nullable: true description: 列 6 止 status: type: object description: 列 7=读侧三态结论 properties: key: type: string enum: [active, pending, expired, cancelled, replaced] label: type: string required: - subscription_id - plan_name - status ApiEnvelope: type: object description: 统一响应信封 properties: code: type: integer description: 业务/协议码,0 表示成功 message: type: string description: 提示信息 error_code: type: string description: 稳定错误码(失败时) data: description: 业务数据载荷 required: - code - message PageQuery: type: object description: 分页查询(0 基) properties: page: type: integer description: 页码(0 基索引,默认 0) minimum: 0 default: 0 page_size: type: integer description: 每页条数(默认 20,上限 200) minimum: 1 maximum: 200 default: 20 keyword: type: string description: 关键字筛选(可选)