Revise a job
Code Mode: praxis.workforce.jobs.update
HTTP: PATCH /workforce/v1/jobs/{id}
Changes the name, duties, methods or allowed levels of a job; send expected_revision and at least one of those fields. Positions already opened keep their own copy and level, and only positions opened afterwards use the revised text. level_ids replaces the whole list. Each success raises the job revision by one. Requires an organization owner or admin. Errors: 400 INVALID_PARAMS when no field is given or a value breaks its limits; 403 PERMISSION_DENIED; 404 JOB_NOT_FOUND; 404 JOB_LEVEL_NOT_FOUND when a level id does not exist; 409 REVISION_CONFLICT when the job moved on, so get the job again and retry with its revision.
Signature
praxis.workforce.jobs.update(args:{path:{id:string};body:{/** The job revision you last read; a mismatch returns REVISION_CONFLICT. */ expected_revision:number;/** New job name, 1 to 100 characters. */ name?:string;/** New duties text, at most 4000 characters; replaces the old text. */ duties?:string;/** New methods text, at most 4000 characters; replaces the old text. */ methods?:string;/** The complete new list of allowed job level ids (lvl_...); an empty array allows any level. */ level_ids?:Array<string>}}):Promise<{/** Job id (jpr_...); use it as job_id when opening positions. */ id:string;/** Id of the organization that owns the job. */ organization_id:string;/** Your own key for the job; unique inside the organization and fixed after creation. */ code:string;/** Job name, 1 to 100 characters; becomes the default title of positions opened from it. */ name:string;/** What the job is responsible for; copied onto positions when they are opened, at most 4000 characters. */ duties:string;/** How the work is done; copied onto positions when they are opened, at most 4000 characters. */ methods:string;/** Ids of the job levels (lvl_...) positions of this job may carry; an empty array allows any level. */ level_ids:Array<string>;/** Revision number, starting at 1 and rising on every revise; send it as expected_revision. */ revision:number;/** Whether the job can open new positions. */ status:"active"|"retired";/** UTC instant (RFC 3339) when the job was defined. */ create_time:string;/** UTC instant (RFC 3339) of the latest change to the job. */ update_time:string}>;Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes | Job id (jpr_…) to revise, from the jobs list. |
Request body
| Required | Content types | Description |
|---|---|---|
| yes | application/json |
Responses
| Status | Content types | Description |
|---|---|---|
| 200 | application/json | The job after the revision. |
| 400 | application/problem+json | INVALID_PARAMS; send expected_revision and at least one valid field. |
| 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 | JOB_NOT_FOUND or JOB_LEVEL_NOT_FOUND; list jobs for the id, and read ladders for valid level ids. |
| 409 | application/problem+json | REVISION_CONFLICT; get the job again, merge your change and retry with its current revision. |