Revise a job ladder
Code Mode: praxis.workforce.ladders.update
HTTP: PUT /workforce/v1/ladders/{id}
Replaces all levels of a ladder with the array you send. A level with an id keeps that id and takes the new name and order, a level without an id is created, and an existing level you leave out is deleted. A level cannot be deleted while an open position or a job’s level_ids still refers to it; first regrade those positions or revise those jobs. Send name to rename the ladder; leave it out to keep the name. Requires an organization owner or admin. Errors: 400 INVALID_PARAMS for an empty levels array, duplicate order values, a level id sent twice or a level that is still referenced; 403 PERMISSION_DENIED; 404 LADDER_NOT_FOUND; 404 JOB_LEVEL_NOT_FOUND when a level id does not belong to this ladder.
Signature
praxis.workforce.ladders.update(args:{path:{id:string};body:{/** The ladder's new name; omit it to keep the current name. */ name?:string;/** The complete new set of levels; existing levels you leave out are deleted if nothing refers to them. */ levels:Array<{/** Id of an existing level of this ladder (lvl_...) to keep and update; omit to create a new level. */ id?:string;/** Level name, 1 to 100 characters. */ name:string;/** Rank inside the ladder; distinct per level. */ order:number}>}}):Promise<{/** Ladder id (ldr_...). */ id:string;/** Id of the organization that owns the ladder. */ organization_id:string;/** Ladder name, 1 to 100 characters. */ name:string;/** Levels of the ladder in ascending order. */ levels:Array<{/** Job level id (lvl_...); use it as job_level_id and in a job's level_ids. */ id:string;/** Id of the ladder (ldr_...) the level belongs to. */ ladder_id:string;/** Level name, 1 to 100 characters, such as Senior. */ name:string;/** Rank inside the ladder; unique per ladder, and levels are returned in ascending order. */ order:number}>;/** UTC instant (RFC 3339) when the ladder was defined. */ create_time:string;/** UTC instant (RFC 3339) of the latest change to the ladder. */ update_time:string}>;Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes | Ladder id (ldr_…) to revise, from the ladders list. |
Request body
| Required | Content types | Description |
|---|---|---|
| yes | application/json |
Responses
| Status | Content types | Description |
|---|---|---|
| 200 | application/json | The ladder with its new levels. |
| 400 | application/problem+json | INVALID_PARAMS; send a non-empty levels array with distinct order values, and keep every level that a position or job still uses. |
| 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 | LADDER_NOT_FOUND or JOB_LEVEL_NOT_FOUND; list ladders for the ids, and send only level ids that belong to this ladder. |