openapi: 3.0.0 info: title: klt-bos version: 0.1.0 description: | 恪澜通运营支撑扩展微服务(klt-bos)。 统一请求信封:`{ "data": { … } }`;统一响应信封:`{ code, message, error_code?, data }`。 业务错误码段 20000–20999。 经网关对外前缀:`/api/klt/bos/{resource}/{action}@v1`(本文件路径不含 namespace 前缀)。 分页约定:请求页码 0 基;呈现时再转为 1 基。 x-error-code-range: start: 20000 end: 20999 servers: - url: / paths: /health: get: summary: 健康检查 description: 服务存活探测,无需登录。 x-require-auth: false x-resource-type: bos.health x-action: view x-version: v1 x-permission-visibility: catalog responses: "200": description: 成功。统一信封 code/message/data /health@v1: get: summary: 健康检查(v1) description: 服务存活探测,无需登录。 x-require-auth: false x-resource-type: bos.health x-action: view x-version: v1 x-permission-visibility: catalog responses: "200": description: 成功。统一信封 code/message/data /ping@v1: get: summary: 存活探测 description: 需登录的轻量探测,返回服务状态与绑定信息。 x-require-auth: true x-resource-type: bos.ping x-action: view x-version: v1 x-permission-visibility: catalog responses: "200": description: 成功。统一信封 code/message/data /auth/context@v1: get: summary: 当前登录上下文 description: 返回当前登录身份、业务角色、主体类型/ID、可见形态等;首次业务请求在此完成未激活/已过期拦截。 x-require-auth: true x-resource-type: bos.auth x-action: view x-version: v1 x-permission-visibility: catalog responses: "200": description: 成功。统一信封 code/message/data /region/create@v1: post: summary: 新建区域节点 description: 在区域树下新建省/市/区县节点。admin 任意层级;区域运营主/子账号仅限本团队负责范围内已有省份下建市/区县。 x-require-auth: true x-resource-type: bos.region x-action: create 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 description: 层级提示(省/市/区县等,业务侧自持,可选) required: - node_name required: - data responses: "200": description: 成功。统一信封 code/message/data /region/rename@v1: post: summary: 重命名区域节点 description: 仅修改节点名称 node_name,不改层级与父子关系。 x-require-auth: true x-resource-type: bos.region x-action: update 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 responses: "200": description: 成功。统一信封 code/message/data /region/delete@v1: post: summary: 删除区域节点 description: 仅 admin。须提交 confirm_name(与当前区域名逐字一致)并通过三重守卫(无下级/无挂载客户/无引用)。 x-require-auth: true x-resource-type: bos.region x-action: delete 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 responses: "200": description: 成功。统一信封 code/message/data /region/tree@v1: get: summary: 查询可见区域树 description: 按操作人可见范围返回区域节点集合/树;运营主/子账号只见本范围及下级。 x-require-auth: true x-resource-type: bos.region x-action: view x-version: v1 x-permission-visibility: catalog responses: "200": description: 成功。统一信封 code/message/data /region/subtree@v1: post: summary: 查询区域子树 description: 挂载弹窗左树、区域钻取共用;按可见范围裁剪。 x-require-auth: true x-resource-type: bos.region x-action: view 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(可选;空则按可见根展开) required: - data responses: "200": description: 成功。统一信封 code/message/data /region/change_log@v1: get: summary: 区域变更流水 description: 仅 admin 可见;运营子账号可见节点但不可见变更流水。 x-require-auth: true x-resource-type: bos.region x-action: view x-version: v1 x-permission-visibility: catalog responses: "200": description: 成功。统一信封 code/message/data /region/orphans@v1: get: summary: 悬空区域节点 description: 查询悬空/孤儿节点;按节点所在区域分派可见性,admin 全量。 x-require-auth: true x-resource-type: bos.region x-action: view x-version: v1 x-permission-visibility: catalog responses: "200": description: 成功。统一信封 code/message/data /account/provision@v1: post: summary: 开通账号 description: 四入口共用开通管线。唯一性守卫(登录名/手机号)先于平台调用;角色与主体须一致。 x-require-auth: true x-resource-type: bos.account x-action: create 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 responses: "200": description: 成功。统一信封 code/message/data /account/update_status@v1: post: summary: 停用或恢复账号 description: 停用/恢复账号状态;不可操作当前登录账号。 x-require-auth: true x-resource-type: bos.account x-action: manage 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 responses: "200": description: 成功。统一信封 code/message/data /account/reset_code@v1: post: summary: 重置激活码 description: 仅未激活账号可重置;已激活拒绝。新码仅当次返回。 x-require-auth: true x-resource-type: bos.account x-action: manage 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/export_codes@v1: post: summary: 导出激活码 description: 导出未设密账号激活码明文。必传收窄后的 user_ids,以及与令牌一致的 scope_type/scope_id;validity=expired/all 为写操作(先作废再换新码)。 x-require-auth: true x-resource-type: bos.account x-action: export 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 列表(禁止空列表全量) items: type: string description: 用户 ID scope_type: type: string description: 作用域类型,须与所用令牌一致 scope_id: type: string description: 作用域 ID,须与所用令牌一致 validity: type: string description: 导出口径:active=仍有效;expired=已过期(写);all=全部(写) enum: - active - expired - all required: - user_ids - scope_type - scope_id - validity required: - data responses: "200": description: 成功。统一信封 code/message/data /account/change_password@v1: post: summary: 自助修改密码 description: 已登录用户修改本人密码;新旧相同不保存。 x-require-auth: true x-resource-type: bos.account x-action: manage 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 responses: "200": description: 成功。统一信封 code/message/data /activation/verify@v1: post: summary: 激活并设置密码 description: 免登录豁免接口。校验激活码后设置新密码;按来源 IP+码窗口限流,不设失败计数锁死。 x-require-auth: false x-resource-type: bos.activation x-action: manage 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 responses: "200": description: 成功。统一信封 code/message/data /operator/create@v1: post: summary: 新建运营商 description: 运营商建档。所属区域必须是省级节点;同省份×品牌唯一;可写结算口径。 x-require-auth: true x-resource-type: bos.operator x-action: create 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 responses: "200": description: 成功。统一信封 code/message/data /operator/update@v1: post: summary: 编辑运营商 description: 编辑运营商档案;改品牌/省份不得绕过省份×品牌唯一与省级节点校验。 x-require-auth: true x-resource-type: bos.operator x-action: update 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 responses: "200": description: 成功。统一信封 code/message/data /operator/delete@v1: post: summary: 删除运营商 description: 删除前六项检查并级联注销对账账号。 x-require-auth: true x-resource-type: bos.operator x-action: delete 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 responses: "200": description: 成功。统一信封 code/message/data /operator/get_list@v1: post: summary: 运营商列表 description: 卡片口径:建档区域或下挂客户落在本可见范围。 x-require-auth: true x-resource-type: bos.operator x-action: list 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 responses: "200": description: 成功。统一信封 code/message/data /operator/recon_account/create@v1: post: summary: 创建对账账号 description: 一家运营商至多一个对账账号;初始密码仅当次显示。 x-require-auth: true x-resource-type: bos.operator.recon_account x-action: create 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 responses: "200": description: 成功。统一信封 code/message/data /operator/recon_account/get@v1: post: summary: 查询对账账号 description: 只回状态提示(如「未发送,线下告知本人」),不回密码。 x-require-auth: true x-resource-type: bos.operator.recon_account x-action: view 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 responses: "200": description: 成功。统一信封 code/message/data /partner/create@v1: post: summary: 新建合伙人 description: 合伙人建档并同步开通账号;名称全站唯一;结算字段仅 admin 可写。 x-require-auth: true x-resource-type: bos.partner x-action: create 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 responses: "200": description: 成功。统一信封 code/message/data /partner/update@v1: post: summary: 编辑合伙人 description: 编辑合伙人资料;登录名不可改。 x-require-auth: true x-resource-type: bos.partner x-action: update 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 responses: "200": description: 成功。统一信封 code/message/data /partner/delete@v1: post: summary: 删除合伙人 description: 删除合伙人档案及相关授权。 x-require-auth: true x-resource-type: bos.partner x-action: delete 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 responses: "200": description: 成功。统一信封 code/message/data /partner/get_list@v1: post: summary: 合伙人列表 description: 卡片口径:建档区域落在本范围(含下级)。 x-require-auth: true x-resource-type: bos.partner x-action: list 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 responses: "200": description: 成功。统一信封 code/message/data /partner/scope/get@v1: get: summary: 读取合伙人负责范围 description: 返回该合伙人的 region/customer 两类 scope_grant。 x-require-auth: true x-resource-type: bos.partner.scope x-action: view x-version: v1 x-permission-visibility: catalog responses: "200": description: 成功。统一信封 code/message/data /partner/scope/save@v1: post: summary: 保存合伙人负责范围 description: 写入 scope_grant(holder_type=partner);允许保存为空;保存即 bump epoch。 x-require-auth: true x-resource-type: bos.partner.scope x-action: manage 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 responses: "200": description: 成功。统一信封 code/message/data /ent_team/create@v1: post: summary: 新建运营团队 description: 仅 admin。新建运营团队,负责范围初始为空。 x-require-auth: true x-resource-type: bos.ent_team x-action: create 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: 主账号手机号(可选) required: - team_name required: - data responses: "200": description: 成功。统一信封 code/message/data /ent_team/update@v1: post: summary: 编辑运营团队 description: 仅 admin。编辑团队资料。 x-require-auth: true x-resource-type: bos.ent_team x-action: update 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 responses: "200": description: 成功。统一信封 code/message/data /ent_team/delete@v1: post: summary: 删除运营团队 description: 仅 admin。内置「总部·不限区域」团队不可删。 x-require-auth: true x-resource-type: bos.ent_team x-action: delete 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 responses: "200": description: 成功。统一信封 code/message/data /ent_team/member_add@v1: post: summary: 添加运营团队成员 description: 每团队有且仅有一个主账号;不可删除当前登录账号。 x-require-auth: true x-resource-type: bos.ent_team x-action: manage 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: 成员登录名 mobile: type: string description: 手机号(可选) is_primary: type: boolean description: 是否设为主账号(可选) required: - team_id - username required: - data responses: "200": description: 成功。统一信封 code/message/data /ent_team/member_remove@v1: post: summary: 移除运营团队成员 description: 内置主账号不可删不可转交;不可删除当前登录账号。 x-require-auth: true x-resource-type: bos.ent_team x-action: manage 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 responses: "200": description: 成功。统一信封 code/message/data /ent_team/transfer_primary@v1: post: summary: 转交运营团队主账号 description: 仅 admin。同事务切换 is_primary 标记并同步 role_code(opsMain↔opsSub)。 x-require-auth: true x-resource-type: bos.ent_team x-action: manage 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 responses: "200": description: 成功。统一信封 code/message/data /ent_team/scope/get@v1: get: summary: 读取运营团队负责范围 description: 仅 admin。返回团队区域负责范围。 x-require-auth: true x-resource-type: bos.ent_team.scope x-action: view x-version: v1 x-permission-visibility: catalog responses: "200": description: 成功。统一信封 code/message/data /ent_team/scope/save@v1: post: summary: 保存运营团队负责范围 description: 仅 admin。勾选区域写入 scope_grant(holder=ent_team),成为区域删除的引用来源。 x-require-auth: true x-resource-type: bos.ent_team.scope x-action: manage 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 responses: "200": description: 成功。统一信封 code/message/data /ops_team/create@v1: post: summary: 新建运维团队 description: 须指定所属区域、可派工单类型≥1、分派方式与结算口径。⚠️ 2026-11-05 起团队不分类型(无 team_type 键)。 x-require-auth: true x-resource-type: bos.ops_team x-action: create 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 项) 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_mobile: type: string description: 主账号手机号(可选) required: - team_name - region_node_id - ticket_types - dispatch_mode required: - data responses: "200": description: 成功。统一信封 code/message/data /ops_team/update@v1: post: summary: 编辑运维团队 description: 编辑团队资料。⚠️ 2026-11-05 起团队不分类型,请求体无 team_type 键。 x-require-auth: true x-resource-type: bos.ops_team x-action: update 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: 可派工单类型列表 items: type: string description: 工单类型码 settle_mode: type: string description: 结算方式 settle_value: type: number description: 结算值 row_version: type: integer description: 乐观锁版本(若启用) required: - team_id required: - data responses: "200": description: 成功。统一信封 code/message/data /ops_team/delete@v1: post: summary: 删除运维团队 description: 删除前校验引用与未办完工单等守卫。 x-require-auth: true x-resource-type: bos.ops_team x-action: delete 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 responses: "200": description: 成功。统一信封 code/message/data /ops_team/scope/save@v1: post: summary: 保存运维团队负责范围 description: 三个范围写入口之一。同事务校验范围包含关系与未办完工单守卫;失败两侧都不落库。 x-require-auth: true x-resource-type: bos.ops_team.scope x-action: manage 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 responses: "200": description: 成功。统一信封 code/message/data /ops_team/member_add@v1: post: summary: 添加运维成员 description: 新建成员档案并开通运维子账号(`role_code=ops`)。⚠️ 2026-11-05 起成员不分类型,服务侧只校验 `ticket_types` 是团队可分配类型的子集(`KLT-I105`,可为空=不接单)。 x-require-auth: true x-resource-type: bos.ops_team x-action: manage 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: 该成员可处理的工单类型(须为团队可分配类型的子集;空数组=不接单,如录入人员) items: type: string description: 工单类型码 username: type: string description: 登录名 mobile: type: string description: 手机号(可选) required: - team_id - username required: - data responses: "200": description: 成功。统一信封 code/message/data /ops_team/member_update@v1: post: summary: 更新运维成员 description: 可改手机号与可处理工单类型。⚠️ 2026-11-05 起成员不分类型,⛔ 不因类型变更改写 role_code;可接类型落 ops_member_ticket_type。 x-require-auth: true x-resource-type: bos.ops_team x-action: manage 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: 该成员可处理的工单类型(整体替换;须为团队可分配类型的子集;空数组=不接单) items: type: string description: 工单类型码 member_id: type: string description: 成员 ID mobile: type: string description: 手机号(可选) required: - team_id - member_id required: - data responses: "200": description: 成功。统一信封 code/message/data /ops_team/member_remove@v1: post: summary: 移除运维成员 description: 删除前五项检查并注销账号。 x-require-auth: true x-resource-type: bos.ops_team x-action: manage 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 responses: "200": description: 成功。统一信封 code/message/data /ops_member/scope/save@v1: post: summary: 保存运维成员负责范围 description: 三个范围写入口之二。scope_mode∈follow_team/region/customer;越界报错不保存。 x-require-auth: true x-resource-type: bos.ops_member.scope x-action: manage 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 responses: "200": description: 成功。统一信封 code/message/data /ops_team/dispatch_mode/update@v1: post: summary: 更新分派方式 description: 与运营侧改同一字段,后写入者生效;默认补记审计。 x-require-auth: true x-resource-type: bos.ops_team.dispatch_mode x-action: update 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 responses: "200": description: 成功。统一信封 code/message/data /ops_team/coverage/get@v1: get: summary: 运维团队覆盖客户 description: 覆盖客户=团队区域范围(Tree) ∩ 本类型归属(Owner),与列表分页同源。 x-require-auth: true x-resource-type: bos.ops_team.coverage x-action: view x-version: v1 x-permission-visibility: catalog responses: "200": description: 成功。统一信封 code/message/data /customer/create@v1: post: summary: 新建客户 description: 客户建档。须指定归属运营商;可选合伙人、挂载申请、父区域节点。完整弹窗字段还可含识别号、联系人、地址、运维团队、主账号、证照等。 x-require-auth: true x-resource-type: bos.customer x-action: create 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: type: string description: 所挂区域父节点 ID(可选) id_code: type: string description: 识别号(可选) contact_name: type: string description: 联系人(可选) contact_mobile: type: string description: 联系电话(可选) address: type: string description: 地址(可选) ops_team_ids: type: array description: 所挂运维团队 ID 列表(可选;至少一支时须在操作人负责范围内,多支之间允许可分配类型重叠) items: type: string description: 运维团队 ID primary_username: type: string description: 客户主账号登录名(可选) primary_mobile: type: string description: 客户主账号手机号(可选) required: - customer_name - subject_type - operator_id required: - data responses: "200": description: 成功。统一信封 code/message/data /customer/get_list@v1: post: summary: 客户列表 description: 按可见范围返回客户列表,支持筛选与分页。 x-require-auth: true x-resource-type: bos.customer x-action: list 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: 关键字筛选(可选) region_node_id: type: string description: 区域筛选(可选) operator_id: type: string description: 运营商筛选(可选) partner_id: type: string description: 合伙人筛选(可选) status: type: string description: 状态筛选(可选) required: - data responses: "200": description: 成功。统一信封 code/message/data /customer/get@v1: post: summary: 客户详情 description: 按客户 ID 查询档案详情。 x-require-auth: true x-resource-type: bos.customer x-action: view 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 responses: "200": description: 成功。统一信封 code/message/data /customer/update@v1: post: summary: 编辑客户 description: 编辑客户资料。拒收改写 customer_id/region_node_id/operator_id/partner_id;改识别号须带 change_basis。 x-require-auth: true x-resource-type: bos.customer x-action: update 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: 联系电话 address: type: string description: 地址 ops_team_ids: type: array description: 所挂运维团队 ID 列表(整体替换当前归属;多支之间允许可分配类型重叠) items: type: string description: 运维团队 ID row_version: type: integer description: 乐观锁版本(若启用) required: - customer_id required: - data responses: "200": description: 成功。统一信封 code/message/data /customer/delete_precheck@v1: post: summary: 客户删除前置检查 description: 返回 can_delete 与 reasons,供删除确认弹窗使用。 x-require-auth: true x-resource-type: bos.customer x-action: view 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 responses: "200": description: 成功。统一信封 code/message/data /customer/delete@v1: post: summary: 删除客户 description: 删除客户;须携带删除前置检查时的阻塞快照版本。 x-require-auth: true x-resource-type: bos.customer x-action: delete 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 responses: "200": description: 成功。统一信封 code/message/data /customer/history@v1: post: summary: 客户变更历史 description: 查询客户档案变更流水。 x-require-auth: true x-resource-type: bos.customer x-action: view 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 responses: "200": description: 成功。统一信封 code/message/data /customer/mount_candidates@v1: get: summary: 改挂候选客户 description: 返回操作人可见范围内可作为改挂目标的候选客户列表。 x-require-auth: true x-resource-type: bos.customer x-action: view x-version: v1 x-permission-visibility: catalog responses: "200": description: 成功。统一信封 code/message/data /customer/influence@v1: post: summary: 改挂影响面 description: 改挂前必做前置:未办完工单数、当前责任人与团队、当期是否已出账等。 x-require-auth: true x-resource-type: bos.customer x-action: view 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 responses: "200": description: 成功。统一信封 code/message/data /customer/move_region@v1: post: summary: 客户改挂区域 description: 复合事务改挂区域;新区域省份须等于归属运营商档案省份。 x-require-auth: true x-resource-type: bos.customer x-action: update 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: 所挂运维团队 ID 列表(可选,随改挂重绑) items: type: string description: 运维团队 ID required: - customer_id - new_region_node_id required: - data responses: "200": description: 成功。统一信封 code/message/data /customer/attribution/update@v1: post: summary: 更新客户归属 description: 改归属运营商/合伙人;改运营商时档案省份须等于客户所挂区域省份。 x-require-auth: true x-resource-type: bos.customer.attribution x-action: update 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 responses: "200": description: 成功。统一信封 code/message/data /import_batch/template_download@v1: get: summary: 下载导入模板 description: 返回 14 列 xlsx 模板说明(format/columns/max_rows)。 x-require-auth: true x-resource-type: bos.import_batch x-action: export x-version: v1 x-permission-visibility: catalog responses: "200": description: 成功。统一信封 code/message/data /import_batch/submit@v1: post: summary: 提交客户批量导入 description: 提交导入行对象列表,单批上限 500 行。列含客户名称、识别号、主体类型、联系人、电话、地址、区域、运营商、合伙人、运维团队、主账号等。 x-require-auth: true x-resource-type: bos.import_batch x-action: create 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: 所挂运维团队名称列表(多支时逐项列出) items: type: string description: 运维团队名称 primary_username: type: string description: 主账号登录名 primary_mobile: type: string description: 主账号手机号 required: - rows required: - data responses: "200": description: 成功。统一信封 code/message/data /import_batch/get_list@v1: post: summary: 导入批次列表 description: 查询本人可见范围内的导入批次。 x-require-auth: true x-resource-type: bos.import_batch x-action: list 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 responses: "200": description: 成功。统一信封 code/message/data /import_batch/get@v1: post: summary: 导入批次详情 description: 按批次 ID/编号查询详情与行状态。 x-require-auth: true x-resource-type: bos.import_batch x-action: view 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 responses: "200": description: 成功。统一信封 code/message/data /import_batch/resume@v1: post: summary: 失败行续传 description: 针对失败行提交续传数据,行号对应原 row_no。 x-require-auth: true x-resource-type: bos.import_batch x-action: update 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 responses: "200": description: 成功。统一信封 code/message/data /import_batch/export_codes@v1: post: summary: 按批次导出激活码 description: 语义同账号导出;须传收窄后的 user_ids 与 scope。 x-require-auth: true x-resource-type: bos.import_batch x-action: export 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 列表 items: type: string description: 用户 ID scope_type: type: string description: 作用域类型 scope_id: type: string description: 作用域 ID validity: type: string description: 导出口径:active/expired/all enum: - active - expired - all required: - batch_id - user_ids - scope_type - scope_id - validity required: - data responses: "200": description: 成功。统一信封 code/message/data /import_batch/export_customers@v1: post: summary: 按批次导出客户 description: 按导入批次导出客户 15 列结果。 x-require-auth: true x-resource-type: bos.import_batch x-action: export 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 responses: "200": description: 成功。统一信封 code/message/data /sub_account/get_list@v1: post: summary: 分账号列表 description: 查询客户下属分账号列表。 x-require-auth: true x-resource-type: bos.sub_account x-action: list 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 responses: "200": description: 成功。统一信封 code/message/data /sub_account/update@v1: post: summary: 更新分账号 description: 运营可改 display_name 与 network_account_name;客户主账号只许改 display_name。 x-require-auth: true x-resource-type: bos.sub_account x-action: update 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 responses: "200": description: 成功。统一信封 code/message/data /catalog/create@v1: post: summary: 新建套餐档位 description: 新建固定/自定义档位。拒收 monthly_settle_cents、sub_mode、first_referred_at。自定义档必填 customer_id。 x-require-auth: true x-resource-type: bos.catalog x-action: create 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: 档位名称 use_category: type: string description: 用途分类:office/live/ai/value_add/customized annual_price_cents: type: integer description: 年价(分) sub_account_quota: type: integer description: 分账号配额 bandwidth_committed: type: boolean description: 是否承诺带宽(界面「是否承诺带宽」开关):true=承诺(缺省,同列 DEFAULT TRUE);false=该档「不承诺带宽」,此时上行/下行两字段一律不传 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 - use_category - annual_price_cents required: - data responses: "200": description: 成功。统一信封 code/message/data /catalog/update@v1: post: summary: 编辑套餐档位 description: 编辑档位;use_category 建后不可改;被订阅引用冻结后多数字段只读。 x-require-auth: true x-resource-type: bos.catalog x-action: update 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: 档位名称 annual_price_cents: type: integer description: 年价(分) sub_account_quota: type: integer description: 分账号配额 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 responses: "200": description: 成功。统一信封 code/message/data /catalog/get_list@v1: post: summary: 套餐档位列表 description: 按 plan_kind 等条件筛选档位列表。 x-require-auth: true x-resource-type: bos.catalog x-action: list 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 use_category: type: string description: 用途分类筛选 customer_id: type: string description: 自定义档客户筛选 required: - data responses: "200": description: 成功。统一信封 code/message/data /catalog/get@v1: post: summary: 套餐档位详情 description: 按档位 ID 查询详情。 x-require-auth: true x-resource-type: bos.catalog x-action: view 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 responses: "200": description: 成功。统一信封 code/message/data /contract/create@v1: post: summary: 新建合同 description: 客户段+合同段+服务构成条目+IP 条件一次提交。拒收 source(服务端定)。 x-require-auth: true x-resource-type: bos.contract x-action: create 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(或改用内联建档字段) contract_no: type: string description: 合同编号(空则服务端发号) external_no: type: string description: 外部合同号(可选) contract_amount_cents: type: integer description: 合同金额(分,可选) pay_cycle: type: string description: 付款周期:yearly/quarterly/monthly enum: - yearly - quarterly - monthly start_date: type: string description: 合同开始日期(YYYY-MM-DD) format: date end_date: type: string description: 合同结束日期(YYYY-MM-DD) format: date agent_name: type: string description: 经办人姓名 agent_mobile: type: string description: 经办人手机 agent_handover_on: type: string description: 经办交接日期(可选) format: date agent_org: type: string description: 经办组织(可选) attachment_url: type: string description: 附件地址(可选) service_items: type: array description: 服务构成条目列表 items: type: object description: 服务条目 properties: item_kind: type: string description: 条目类型:plan_based/custom_spec plan_id: type: string description: 档位 ID(plan_based) quantity: type: integer description: 数量 account_count: type: integer description: 账号数(custom_spec) bandwidth_up_mbps: type: integer description: 上行带宽(Mbps,整数 1~1000,custom_spec);与下行至少填一侧,只填一侧时按上下行对称填同一值 bandwidth_down_mbps: type: integer description: 下行带宽(Mbps,整数 1~1000,custom_spec);两值原样投影到派生自定义档,⛔ 不折算(2026-11-05 D8 关闭) line_exits: type: array description: 线路出口列表 items: type: string description: 出口标识 ip_entries: type: array description: IP 条件条目(可选) items: type: object description: IP 条目 required: - pay_cycle - start_date - end_date required: - data responses: "200": description: 成功。统一信封 code/message/data /contract/update@v1: post: summary: 编辑合同 description: 编号与签约客户不可改;条目按 item_id 三向对比增删改。 x-require-auth: true x-resource-type: bos.contract x-action: update 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_amount_cents: type: integer description: 合同金额(分) pay_cycle: type: string description: 付款周期 start_date: type: string description: 开始日期 format: date end_date: type: string description: 结束日期 format: date agent_name: type: string description: 经办人姓名 agent_mobile: type: string description: 经办人手机 agent_handover_on: type: string description: 经办交接日期 agent_org: type: string description: 经办组织 attachment_url: type: string description: 附件地址 service_items: type: array description: 服务构成条目(含 item_id 的增删改) items: type: object ip_entries: type: array description: IP 条件条目 items: type: object required: - contract_id - row_version required: - data responses: "200": description: 成功。统一信封 code/message/data /contract/get_list@v1: post: summary: 合同列表 description: 按客户/状态等筛选合同列表。 x-require-auth: true x-resource-type: bos.contract x-action: list 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: 状态筛选 required: - data responses: "200": description: 成功。统一信封 code/message/data /contract/get@v1: post: summary: 合同详情 description: 按合同 ID 查询详情(含服务条目与 IP 条件)。 x-require-auth: true x-resource-type: bos.contract x-action: view 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 responses: "200": description: 成功。统一信封 code/message/data /subscription/create@v1: post: summary: 新建订阅 description: 拒收 line_exits、sub_mode、order_no、新建时的 end_date、opened_at。 x-require-auth: true x-resource-type: bos.subscription x-action: create 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: 年价(分) monthly_settle_cents: type: integer description: 月结算金额(分) use_category: type: string description: 派生档用途分类(需要时填写) required: - customer_id - plan_id - contract_id - contract_item_id - start_date - annual_price_cents - monthly_settle_cents required: - data responses: "200": description: 成功。统一信封 code/message/data /subscription/change@v1: post: summary: 订阅升降配 description: 升降配须填 replaces_subscription_id,且须使用新的 contract_id(不得沿用原合同)。 x-require-auth: true x-resource-type: bos.subscription x-action: update 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: 年价(分) monthly_settle_cents: type: integer description: 月结算金额(分) use_category: type: string description: 派生档用途分类(需要时填写) required: - replaces_subscription_id - customer_id - plan_id - contract_id - contract_item_id - start_date - annual_price_cents - monthly_settle_cents required: - data responses: "200": description: 成功。统一信封 code/message/data /subscription/stack@v1: post: summary: 订阅叠加或白名单更新 description: 叠加开通或更新白名单字段(两金额+end_date);其余只读键拒绝。 x-require-auth: true x-resource-type: bos.subscription x-action: create 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 required: - data responses: "200": description: 成功。统一信封 code/message/data /subscription/get_list@v1: post: summary: 订阅列表 description: 按客户等维度筛选订阅列表。 x-require-auth: true x-resource-type: bos.subscription x-action: list 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: 关键字筛选(可选) status: type: string description: 状态筛选 required: - data responses: "200": description: 成功。统一信封 code/message/data /subscription/get@v1: post: summary: 订阅详情 description: 按订阅 ID 查询详情。 x-require-auth: true x-resource-type: bos.subscription x-action: view 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 responses: "200": description: 成功。统一信封 code/message/data /cost_item/save@v1: post: summary: 保存成本项定义 description: 仅 admin。增改成本项定义。拒收金额、客户、运营商、省份、cycle、is_system。 x-require-auth: true x-resource-type: bos.cost_item x-action: manage 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 responses: "200": description: 成功。统一信封 code/message/data /cost_item/get_list@v1: post: summary: 成本项列表 description: 全局成本项目录;可选类别/名称关键字;无客户过滤。 x-require-auth: true x-resource-type: bos.cost_item x-action: list 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 responses: "200": description: 成功。统一信封 code/message/data /cost_amount/save@v1: post: summary: 保存成本金额 description: 按「省份×运营商×成本项」只写差异金额;留空项表示删除该差异。 x-require-auth: true x-resource-type: bos.cost_amount x-action: manage 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 responses: "200": description: 成功。统一信封 code/message/data /cost_amount/get_list@v1: post: summary: 成本金额一览 description: 透视表;admin 全量,区域运营按可见省/运营商收窄。 x-require-auth: true x-resource-type: bos.cost_amount x-action: list 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 responses: "200": description: 成功。统一信封 code/message/data /share_rule/save@v1: post: summary: 保存分成规则 description: holder_type 仅 operator/ops_team(无 partner)。share_value 填 0/负表示删除该行。 x-require-auth: true x-resource-type: bos.share_rule x-action: manage 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 responses: "200": description: 成功。统一信封 code/message/data /share_rule/get_list@v1: post: summary: 分成规则列表 description: 按持有方等条件列出分成规则。 x-require-auth: true x-resource-type: bos.share_rule x-action: list 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 responses: "200": description: 成功。统一信封 code/message/data /share_rule/get@v1: post: summary: 分成规则详情 description: 按持有方一次返回四卡摘要与规则表。 x-require-auth: true x-resource-type: bos.share_rule x-action: view 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 responses: "200": description: 成功。统一信封 code/message/data /share_rule/delete@v1: post: summary: 删除分成规则 description: 按 rule_id 删除单条分成规则(亦可在 save 内以 0/负值删除)。 x-require-auth: true x-resource-type: bos.share_rule x-action: delete 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 responses: "200": description: 成功。统一信封 code/message/data /opsview/home@v1: get: summary: 运维只读首页 description: 运维侧只读首页(U-60),返回工单/逾期等概览数据。 x-require-auth: true x-resource-type: bos.opsview x-action: view x-version: v1 x-permission-visibility: catalog responses: "200": description: 成功。统一信封 code/message/data /jobs/get_list@v1: get: summary: 定时作业清单 description: 返回已注册作业规格列表(key/name/cron_hint 等)。 x-require-auth: true x-resource-type: bos.jobs x-action: list x-version: v1 x-permission-visibility: catalog responses: "200": description: 成功。统一信封 code/message/data /jobs/toggle@v1: post: summary: 启停定时作业 description: 仅 admin。按作业 key 启停。 x-require-auth: true x-resource-type: bos.jobs x-action: manage 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 responses: "200": description: 成功。统一信封 code/message/data /jobs/runs@v1: post: summary: 作业执行记录 description: 查询指定作业的执行记录。 x-require-auth: true x-resource-type: bos.jobs x-action: view 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: 作业键 required: - key required: - data responses: "200": description: 成功。统一信封 code/message/data /jobs/run_once@v1: post: summary: 补跑作业一次 description: 触发一次指定作业。prod 环境仅总运营可补跑。可选 key:SUB-EFF/STOP-GEN/OVERDUE/DELEGATION-SYNC/OPEN-GEN/SVC-GEN/RECON。 x-require-auth: true x-resource-type: bos.jobs x-action: manage 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 - STOP-GEN - OVERDUE - DELEGATION-SYNC - OPEN-GEN - SVC-GEN - RECON required: - key required: - data responses: "200": description: 成功。统一信封 code/message/data components: schemas: 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: 关键字筛选(可选)