Close a period
Code Mode: praxis.workforce.periods.close.create
HTTP: POST /workforce/v1/periods/{id}/close
Closes a period once its objectives are graded: closed is the only status you set yourself, and it never reverts. After it, objectives and key results of the period can no longer be set or revised. Closing does not grade or change any objective. Closing a period that is already closed returns it unchanged. Takes no body. Requires an organization owner or admin. Errors: 403 PERMISSION_DENIED; 404 PERIOD_NOT_FOUND.
签名
praxis.workforce.periods.close.create(args:{path:{id:string}}):Promise<{/** Period id (prd_...); use it as period_id and parent_id. */ id:string;/** Id of the organization that owns the period. */ organization_id:string;/** Period name, 1 to 100 characters, such as 2026 Q4. */ name:string;/** Level of the calendar this period sits on; periods of one cadence never overlap. e.g. "quarter" */ cadence:"year"|"half"|"quarter";/** Id of the coarser period (prd_...) that contains this one; null for a period with no parent. */ parent_id:string|null;/** First day of the period as a calendar date (YYYY-MM-DD). e.g. "2026-10-01" */ start_on:string;/** Last day of the period as a calendar date (YYYY-MM-DD), inclusive. e.g. "2026-12-31" */ end_on:string;/** Derived from the dates and today's UTC date, except closed, which only close sets. */ status:"planning"|"active"|"grading"|"closed";/** UTC instant (RFC 3339) when the period was opened. */ create_time:string;/** UTC instant (RFC 3339) of the latest change to the period. */ update_time:string}>;参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| id | path | string | 是 | Period id (prd_…) to close, from the periods list. |
响应
| 状态码 | 内容类型 | 说明 |
|---|---|---|
| 200 | application/json | The period with status closed. |
| 401 | Missing or invalid credential; provide a valid organization API key or sign in to the Console. | |
| 403 | application/problem+json | PERMISSION_DENIED; an organization owner or admin may call this, and machine tokens are always refused (an agent’s session token may read the organization, never change it). Use an API key or Console session of an allowed role. |
| 404 | application/problem+json | PERIOD_NOT_FOUND; list periods and copy an id of your organization. |