调用条件、权限、请求字段、响应字段与错误处理。
请求与权限
GEThttps://openapi.qwenwork.ai/v1/biz/seats/stats
鉴权:Authorization: Bearer <access_token>;使用用户 OAuth 授权获得的访问令牌。
所需业务 Scope:biz.seat.read
契约声明的授权方式:组织授权(organization)
Scope 需由平台为应用开通;用户须有相应业务权限,目标资源须在其可访问范围内。个人/组织方式是否为该应用开放,以控制台实际配置为准。
功能与限制
查询授权企业的席位总量和使用量,适用于展示企业席位使用情况。 应用需要 biz.seat.read 授权,操作者需要企业基本资料读取权限。统计范围为整个企业。 成功返回 seat_count(企业配置席位数)和 seat_used(占用席位的 active 成员数)。数字员工不计入 seat_used。请求体
公开契约未声明请求体。不要自行添加身份字段或未经声明的业务字段。成功响应
保持各业务接口原始响应结构,不统一添加code/msg/data 包装。
HTTP 200
查询企业席位统计成功 响应类型:application/json
Copy
{
"seat_count": 100,
"seat_used": 42
}
| 字段 | 类型 | 必含 | 说明及约束 |
|---|---|---|---|
seat_count | integer | 是 | 格式:"int64" |
seat_used | integer | 是 | 格式:"int64" |
错误响应
| HTTP | 说明及处理 |
|---|---|
400 | 请求或操作者身份资料不满足业务要求;primary_contact_phone_required / primary_contact_email_required 表示手机号与邮箱均缺失,补齐资料后重试。 |
401 | 令牌缺失或无效;检查企业授权访问令牌。 |
403 | Scope、操作者权限或企业授权检查失败;要求企业基本资料读取权限。 |
404 | 企业不存在;核对授权企业。 |
405 | Method Not Allowed |
409 | 保留的通用冲突响应;当前查询不定义成员创建或席位变更冲突。保留请求 ID 联系维护方。 |
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"
},
"SeatStats": {
"additionalProperties": false,
"properties": {
"seat_count": {
"format": "int64",
"type": "integer"
},
"seat_used": {
"format": "int64",
"type": "integer"
}
},
"required": [
"seat_count",
"seat_used"
],
"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/seats/stats": {
"get": {
"description": "查询授权企业的席位总量和使用量,适用于展示企业席位使用情况。\n\n应用需要 biz.seat.read 授权,操作者需要企业基本资料读取权限。统计范围为整个企业。\n\n成功返回 seat_count(企业配置席位数)和 seat_used(占用席位的 active 成员数)。数字员工不计入 seat_used。",
"operationId": "biz-get-seat-stats",
"responses": {
"200": {
"content": {
"application/json": {
"example": {
"seat_count": 100,
"seat_used": 42
},
"schema": {
"$ref": "#/components/schemas/SeatStats"
}
}
},
"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": "保留的通用冲突响应;当前查询不定义成员创建或席位变更冲突。保留请求 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"
}
}
}
},
"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"
}
]
}