Replace position by employee identifier (CPF or Email)

Finds a position by the current occupant's CPF or email, then performs a COMPLETE replacement of that position. The identifier parameter automatically detects if the value is an email (contains @) or a CPF.

Parent Position (Leader):

• For ROOT positions: omit all three parent fields (externalCodeParent, parentEmail, parentTaxpayerRegistry)

• For NON-ROOT positions: you MUST provide ONE of:

  • externalCodeParent: External code of the parent position
  • parentEmail: Email of the leader (will find their active position)
  • parentTaxpayerRegistry: CPF of the leader (will find their active position)

This is a PUT operation - all required fields must be provided.

Examples:

• identifier: "[email protected]" (email)

• identifier: "13306708792" (CPF)

• externalCodeParent: "POS-123" (traditional way)

• parentEmail: "[email protected]" (sets the position leader by email)

• parentTaxpayerRegistry: "987.654.321-00" (sets the position leader by CPF)

Business Rules:

• The identifier (CPF or email) must match an existing employee

• The employee must have an active position

• For non-root positions, ONE parent identifier must be provided (externalCodeParent OR parentEmail OR parentTaxpayerRegistry)

• If parentEmail/parentTaxpayerRegistry is provided, the leader must exist and have an active position

• All required fields (name, externalCodeRole, externalCodeArea) must be provided

• This operation replaces all position data

• Set nullable fields to null to remove them

• Role and Area must exist

• New employee can only be assigned to one position at a time

• When additionalParents is provided, it completely replaces any existing additional leaders

• An empty array for additionalParents removes all additional leaders

• When additionalParents is not provided (undefined), existing additional leaders remain unchanged

• Maximum of 5 additional parents allowed

• Additional parents cannot include the position itself (self-reference)

• Additional parents cannot include the direct parent position

• All additional parent positions must exist

Use Cases:

• Complete position replacement

• Update all position fields at once including the leader

• Change the occupant with full position update

• Make a position vacant by setting employeeEmail to null

• Create or update root positions by omitting parent fields

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Employee identifier to find the current position occupant. Can be either an email address or a CPF (taxpayer registry). The API will automatically detect the type based on the format.

Body Params

Complete position data to replace the existing position

string
required
length ≤ 255

Human-readable name for the position

string
length ≤ 50

External code identifier for the position. If not provided, keeps the current externalCode.

string | null

Detailed description of the position. Set to null to remove description.

string
required
length ≤ 50

External code of the role to associate with this position

string
required
length ≤ 50

External code of the area to associate with this position

string
length ≤ 50

External code of the parent position in the organizational hierarchy. Required for non-root positions. Use this OR parentEmail OR parentTaxpayerRegistry (only one is needed). Omit all three to create a root position.

string | null

External code of the cost center to associate with this position. Set to null to remove cost center.

string | null

External code of the operation unit to associate with this position. Set to null to remove operation unit.

string

Email da nova líder (alternativo ao externalCodeParent). Required for non-root positions if externalCodeParent and parentTaxpayerRegistry are not provided. Será usado para localizar a posição ativa da líder.

string

CPF da nova líder (alternativo ao externalCodeParent). Required for non-root positions if externalCodeParent and parentEmail are not provided. Será usado para localizar a posição ativa da líder.

string | null

Email address of the new employee to assign to this position. Set to null to unassign employee.

string | null

Tax payer registry (CPF) of the new employee to assign to this position. Set to null to unassign employee. Must be a valid CPF format.

string | null

Internal company identification number of the new employee to assign to this position. Set to null to unassign employee.

additionalParents
array of strings | null

Optional list of external codes of additional parent positions (additional leaders) for this position. When provided, this list will completely replace any existing additional leaders. An empty array or null will remove all additional leaders. If not provided (undefined), existing additional leaders will be kept unchanged. Maximum of 5 items allowed.

additionalParents
Responses

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json