Designate a department head position
Code Mode: praxis.workforce.positions.designateHead.create
HTTP: POST /workforce/v1/positions/{id}/designate_head
Makes this position the head of its department; the previous head position stays an ordinary position. The head is a position, not a person, and positions in the department with no explicit manager report to it. Takes no body. Requires an organization owner or admin. Errors: 400 REPORTING_CYCLE when the change would make a position report into its own line; 403 PERMISSION_DENIED; 404 POSITION_NOT_FOUND; 409 POSITION_CLOSED or POSITION_FROZEN, because only an active position can be head.
Signature
praxis.workforce.positions.designateHead.create(args:{path:{id:string}}):Promise<{/** Department id (dept_...); use it as department_id and parent_id. */ id:string;/** Id of the organization that owns the department. */ organization_id:string;/** Id of the parent department; null for the root department, which every organization has exactly once. */ parent_id:string|null;/** Department name, 1 to 100 characters; unique among the active departments under one parent; the root department carries the organization's name. */ name:string;/** Sort position among siblings; lower values come first. */ order:number;/** Id of the position that heads the department; null while no position has been designated head; the root department's head position is created with the organizat */ head_position_id:string|null;/** Whether the department is part of the tree or was dissolved. */ status:"active"|"dissolved";/** UTC instant (RFC 3339) when the department was established. */ create_time:string;/** UTC instant (RFC 3339) of the latest change to the department. */ update_time:string}>;Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes | Position id (pos_…) to make head of its department, from the positions list. |
Responses
| Status | Content types | Description |
|---|---|---|
| 200 | application/json | The department with its new head_position_id. |
| 400 | application/problem+json | REPORTING_CYCLE; first reassign the managers that would loop through this position. |
| 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 | POSITION_NOT_FOUND; list positions and copy an id of your organization. |
| 409 | application/problem+json | POSITION_CLOSED or POSITION_FROZEN; designate an active position, unfreezing it first if needed. |