调用条件、权限、请求字段、响应字段与错误处理。
请求与权限
POSThttps://openapi.qwenwork.ai/v1/biz/members/{user_id}:revoke-seat
鉴权:Authorization: Bearer <access_token>;使用用户 OAuth 授权获得的访问令牌。
所需业务 Scope:biz.seat.manage
契约声明的授权方式:组织授权(organization)
Scope 需由平台为应用开通;用户须有相应业务权限,目标资源须在其可访问范围内。个人/组织方式是否为该应用开放,以控制台实际配置为准。
功能与限制
回收一名企业成员占用的席位,将其状态从 active 改为 frozen。user_id 为成员 UUID,调用时无需请求体。 应用需要 biz.seat.manage 授权,操作者需要席位管理权限,成员须在其管理范围内。pending、removed 状态成员以及无需席位的数字员工会返回相应错误。 成功返回成员资料。成员已为 frozen 时,重复调用返回当前资料。此操作仅调整席位与成员状态,blocked 字段保持原值。路径参数
| 参数 | 类型 | 必填 | 说明及约束 |
|---|---|---|---|
user_id | string | 是 | 目标成员 UUID 格式:"uuid" |
请求体
公开契约未声明请求体。不要自行添加身份字段或未经声明的业务字段。成功响应
保持各业务接口原始响应结构,不统一添加code/msg/data 包装。
HTTP 200
回收成员席位成功 响应类型:application/json
Copy
{
"biz_org_id": "00000000-0000-4000-8000-000000000002",
"biz_team_id": "00000000-0000-4000-8000-000000000003",
"blocked": false,
"dingtalk_uid": null,
"email": "member@example.com",
"first_name": "示例成员",
"last_name": "",
"phone_number": null,
"status": "frozen",
"user_id": "00000000-0000-4000-8000-000000000001",
"username": "example-member"
}
| 字段 | 类型 | 必含 | 说明及约束 |
|---|---|---|---|
biz_org_id | string | 是 | — |
biz_team_id | string | 是 | — |
blocked | boolean | 是 | — |
dingtalk_uid | string | null | 是 | — |
email | string | null | 是 | — |
first_name | string | 是 | — |
last_name | string | 是 | — |
phone_number | string | null | 是 | — |
status | string | 是 | — |
user_id | string | 是 | — |
username | string | 是 | — |
错误响应
| HTTP | 说明及处理 |
|---|---|
400 | 请求或操作者身份资料不满足业务要求;primary_contact_phone_required / primary_contact_email_required 表示手机号与邮箱均缺失,补齐资料后重试。 |
401 | 令牌缺失或无效;检查企业授权访问令牌。 |
403 | Scope、操作者权限或企业/团队范围检查失败;核对目标成员范围及企业授权。 |
404 | 目标成员不存在;核对成员标识及授权范围。 |
405 | Method Not Allowed |
409 | member_seat_exempt 表示数字员工不占席位;seat_request_member_not_frozen 表示成员状态不支持操作;enterprise_seat_lock_busy 表示席位操作繁忙。核对成员状态后处理。 |
413 | Request Entity Too Large |
415 | Unsupported Media Type |
422 | 参数类型、UUID、必填性或长度不合法;按 detail 中的位置修正请求。 |
429 | Too Many Requests |
500 | 业务处理失败;保留 request_id/trace_id 联系维护方,写请求先核对实际结果再重试。 |
502 | Biz 服务调用失败;保留 request_id/trace_id 联系维护方,写请求先核对实际结果再重试。 |
503 | Biz 服务暂不可用;写请求先核对实际结果再重试。 |
504 | Biz 服务调用超时;写请求结果可能不确定,先核对实际结果再重试。 |
完整字段契约
下方 JSON 包含本接口完整请求、响应、错误 Schema、嵌套约束和公开扩展定义,可复制用于核对。未声明的成功示例不作推测。展开完整接口 OpenAPI JSON
展开完整接口 OpenAPI JSON
Copy
{
"components": {
"schemas": {
"BizDomainErrorResponse": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"detail": {
"type": "string"
},
"error": {
"type": "string"
},
"org_status_reason": {
"description": "企业状态原因的原始 JSON 值,可为 null"
},
"request_id": {
"type": "string"
},
"seat_count": {
"description": "领域错误提供时返回的企业配置席位数",
"format": "int64",
"type": "integer"
},
"seat_used": {
"description": "领域错误提供时返回的企业已用席位数",
"format": "int64",
"type": "integer"
},
"trace_id": {
"type": [
"string",
"null"
]
}
},
"required": [
"error",
"detail",
"request_id",
"trace_id"
],
"type": "object"
},
"BizGatewayErrorResponse": {
"additionalProperties": false,
"properties": {
"code": {
"type": "integer"
},
"data": {
"type": "null"
},
"error_code": {
"type": "string"
},
"msg": {
"type": "string"
},
"request_id": {
"type": "string"
},
"trace_id": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data",
"error_code"
],
"type": "object"
},
"MemberLookupRead": {
"additionalProperties": false,
"properties": {
"biz_org_id": {
"type": "string"
},
"biz_team_id": {
"type": "string"
},
"blocked": {
"type": "boolean"
},
"dingtalk_uid": {
"type": [
"string",
"null"
]
},
"email": {
"type": [
"string",
"null"
]
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone_number": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string"
},
"user_id": {
"type": "string"
},
"username": {
"type": "string"
}
},
"required": [
"user_id",
"username",
"first_name",
"last_name",
"email",
"phone_number",
"dingtalk_uid",
"biz_org_id",
"biz_team_id",
"status",
"blocked"
],
"type": "object"
},
"ValidationErrorResponse": {
"additionalProperties": false,
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationIssue"
},
"type": [
"array",
"null"
]
},
"error": {
"type": "string"
},
"request_id": {
"type": "string"
},
"trace_id": {
"type": [
"string",
"null"
]
}
},
"required": [
"error",
"detail",
"request_id",
"trace_id"
],
"type": "object"
},
"ValidationIssue": {
"additionalProperties": false,
"properties": {
"ctx": {
"additionalProperties": {},
"type": "object"
},
"input": {},
"loc": {
"items": {},
"type": [
"array",
"null"
]
},
"msg": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"type",
"loc",
"msg",
"input"
],
"type": "object"
}
},
"securitySchemes": {
"OpenPlatformBearer": {
"description": "企业授权应用访问令牌;Scope 不代替操作者权限与资源隔离",
"scheme": "bearer",
"type": "http"
}
}
},
"openapi": "3.1.0",
"paths": {
"/v1/biz/members/{user_id}:revoke-seat": {
"post": {
"description": "回收一名企业成员占用的席位,将其状态从 active 改为 frozen。user_id 为成员 UUID,调用时无需请求体。\n\n应用需要 biz.seat.manage 授权,操作者需要席位管理权限,成员须在其管理范围内。pending、removed 状态成员以及无需席位的数字员工会返回相应错误。\n\n成功返回成员资料。成员已为 frozen 时,重复调用返回当前资料。此操作仅调整席位与成员状态,blocked 字段保持原值。",
"operationId": "biz-revoke-member-seat",
"parameters": [
{
"description": "目标成员 UUID",
"in": "path",
"name": "user_id",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"example": {
"biz_org_id": "00000000-0000-4000-8000-000000000002",
"biz_team_id": "00000000-0000-4000-8000-000000000003",
"blocked": false,
"dingtalk_uid": null,
"email": "member@example.com",
"first_name": "示例成员",
"last_name": "",
"phone_number": null,
"status": "frozen",
"user_id": "00000000-0000-4000-8000-000000000001",
"username": "example-member"
},
"schema": {
"$ref": "#/components/schemas/MemberLookupRead"
}
}
},
"description": "回收成员席位成功",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"400": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "请求或操作者身份资料不满足业务要求;primary_contact_phone_required / primary_contact_email_required 表示手机号与邮箱均缺失,补齐资料后重试。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"401": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "令牌缺失或无效;检查企业授权访问令牌。",
"headers": {
"WWW-Authenticate": {
"schema": {
"type": "string"
}
},
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"403": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "Scope、操作者权限或企业/团队范围检查失败;核对目标成员范围及企业授权。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"404": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "目标成员不存在;核对成员标识及授权范围。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"405": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
}
},
"description": "Method Not Allowed",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"409": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "member_seat_exempt 表示数字员工不占席位;seat_request_member_not_frozen 表示成员状态不支持操作;enterprise_seat_lock_busy 表示席位操作繁忙。核对成员状态后处理。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"413": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
}
},
"description": "Request Entity Too Large",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"415": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
}
},
"description": "Unsupported Media Type",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"422": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ValidationErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "参数类型、UUID、必填性或长度不合法;按 detail 中的位置修正请求。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"429": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
}
},
"description": "Too Many Requests",
"headers": {
"Retry-After": {
"description": "Seconds to wait before retrying.",
"schema": {
"type": "string"
}
},
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"500": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "业务处理失败;保留 request_id/trace_id 联系维护方,写请求先核对实际结果再重试。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"502": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "Biz 服务调用失败;保留 request_id/trace_id 联系维护方,写请求先核对实际结果再重试。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"503": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "Biz 服务暂不可用;写请求先核对实际结果再重试。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"504": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "Biz 服务调用超时;写请求结果可能不确定,先核对实际结果再重试。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
}
},
"security": [
{
"OpenPlatformBearer": []
}
],
"summary": "回收成员席位",
"tags": [
"席位"
]
}
}
},
"info": {
"title": "回收成员席位",
"version": "2026-11-24"
},
"servers": [
{
"url": "https://openapi.qwenwork.ai"
}
]
}