变更机构状态
POST
/web/v1/workspaces/{workspaceId}/institutions/{institutionBizId}/statusWEB变更指定机构的状态。用于生命周期管理,如激活、暂停或关闭等操作。
鉴权
需要有效的 JWT token。网关验证:enableJwtToken=true,enableTurnstile=false。
请求参数
路径参数
| Name | Type | Required | In | Description |
|---|---|---|---|---|
workspaceId | string | Yes | path | 工作空间业务 ID |
institutionBizId | string | Yes | path | 机构业务 ID |
请求体
InstitutionStatusChangeRequest:
| Name | Type | Required | In | Description |
|---|---|---|---|---|
status | string | Yes | body | 新状态:PENDING、REVIEWING、ACTIVE、REJECTED、SUSPENDED、CLOSED |
reason | string | No | body | 状态变更原因(最多 500 个字符) |
成功响应
成功200
{
"code": "2000",
"message": "SUCCESS",
"data": {
"bizId": "inst_abc123",
"institutionName": "Acme Corp",
"institutionDescription": "Main institution",
"institutionRemark": null,
"institutionType": "TENANT",
"institutionStatus": "SUSPENDED",
"extraConfig": null,
"createdAt": "2026-03-21T00:00:00Z",
"updatedAt": "2026-03-21T01:00:00Z"
}
}错误响应
| 错误码 | 描述 |
|---|---|
4000 | 验证错误(无效的状态值) |
4010 | 未授权(无效或缺少 JWT token) |
4040 | 机构未找到 |
4090 | 无效的状态转换 |
说明
- 并非所有状态转换都是有效的。系统对机构生命周期实施状态机约束。
CLOSED是终态,无法从该状态转出。