> ## Documentation Index
> Fetch the complete documentation index at: https://docs.salu.com.vc/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Employee

<Info>
  Updates an existing <strong>employee</strong>.
</Info>

<Note>
  This endpoint <strong>behaves like a real PATCH</strong>.

  * Send <strong>only</strong> the fields you want to update.
  * You <strong>do not</strong> need to resend all employee fields.
  * Omitted fields will <strong>not</strong> be changed.
</Note>

## Overview

### Fields

| Field                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| :----------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `gov_id` (CPF)                 | **Person / Employee identifier** <br /> In Brazil, every individual has a CPF (Cadastro de Pessoa Física), which is the national taxpayer ID for a person. It’s unique per person and typically does not change. In our API we expose it as `gov_id`. In practice, it plays a role similar to SSN (US) or a national personal tax ID in other countries. <br /> **Key point:** `gov_id` identifies the human being, not the employment relationship.                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `hr_code`                      | **“Matrícula RH” (internal company HR ID) — optional** <br /> `hr_code` corresponds to Matrícula RH, which is an internal employee code created by the company for HR/payroll/admin systems. Optional (not required by law). Used for internal controls and integrations with the company’s HRIS/payroll tools. Can vary by company and can change if the company migrates systems. Think of it as a typical Employee ID inside an organization.                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `employee_registration_number` | **“Matrícula eSocial” (government employment link ID) — required (when applicable)** <br /> `employee_registration_number` corresponds to Matrícula eSocial, which is an official identifier tied to the formal employment relationship under Brazilian labor law (CLT). Mandatory by law for formal employment reporting (eSocial). It is unique per employment relationship (per “job link”), not necessarily per person for life. It may not be available at onboarding, because it’s usually assigned/confirmed only after payroll/accounting formally registers the employee, including the CTPS registration. <br /> **Important nuance:** A person (`gov_id`) can exist in the system before the Matrícula eSocial is known. Once the employment is formalized, `employee_registration_number` becomes the official “government-side” reference for that employment link. |

* **Method:** `PATCH`
* **Path:** `/v0/employee/{employee_id}`
* **OperationId:** `public_update_employee_v0_employee__employee_id__patch`
* **Authentication:** header `x-api-key`

<OpenAPIPlayground openapi="/public-api/openapi.json" operationId="public_update_employee_v0_employee__employee_id__patch" />

### Example requests

#### 1) Minimal partial update (single field)

```bash theme={null}
curl -X PATCH "https://public-api.salu.com.vc/dev/routes/v0/employee/EMPLOYEE_ID_HERE" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $SALU_PUBLIC_API_KEY" \
  --data '{
    "employee_name": "Jane A. Doe"
  }'
```

In this example, only the `employee_name` field is changed; all other employee fields remain untouched.

#### 2) Multiple fields update (omitting the rest)

```bash theme={null}
curl -X PATCH "https://public-api.salu.com.vc/dev/routes/v0/employee/EMPLOYEE_ID_HERE" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $SALU_PUBLIC_API_KEY" \
  --data '{
    "employee_name": "Jane A. Doe",
    "is_active": true,
    "client_integration_code": "EMP-001-INT"
  }'
```

Only the fields present in the body (`employee_name`, `is_active`, `client_integration_code`) will be updated; everything else remains unchanged.


## OpenAPI

````yaml PATCH /v0/employee/{employee_id}
openapi: 3.1.0
info:
  title: Public API v0
  description: API publica da Salu para integracoes de SST.
  version: 0.1.0
servers:
  - url: https://public-api.salu.com.vc/dev/routes
    description: Development
  - url: https://public-api.salu.com.vc/prd/routes
    description: Production
security: []
paths:
  /v0/employee/{employee_id}:
    patch:
      tags:
        - Employee
        - Employee
      summary: Public Update Employee
      operationId: public_update_employee_v0_employee__employee_id__patch
      parameters:
        - name: employee_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Employee Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicApiUpdateEmployeeRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiEmployeeUpdateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    PublicApiUpdateEmployeeRequest:
      properties:
        address:
          anyOf:
            - type: string
            - type: 'null'
          title: Address
        address_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Address Number
        address_detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Address Detail
        zip_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Zip Code
        neighborhood:
          anyOf:
            - type: string
            - type: 'null'
          title: Neighborhood
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        social_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Social Name
        gov_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Gov Id
        birth_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Birth Date
        is_disabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Disabled
        status:
          anyOf:
            - $ref: '#/components/schemas/PublicApiStatusEnum'
            - type: 'null'
        sex:
          anyOf:
            - $ref: '#/components/schemas/PublicApiSexEnum'
            - type: 'null'
        gender:
          anyOf:
            - $ref: '#/components/schemas/PublicApiGenderIdentityEnum'
            - type: 'null'
        mother_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Mother Name
        marital_status:
          anyOf:
            - $ref: '#/components/schemas/PublicApiMaritalStatusEnum'
            - type: 'null'
        place_of_birth:
          anyOf:
            - type: string
            - type: 'null'
          title: Place Of Birth
        educational_stage:
          anyOf:
            - $ref: '#/components/schemas/PublicApiEducationalStageEnum'
            - type: 'null'
        human_skin_tone:
          anyOf:
            - $ref: '#/components/schemas/PublicApiHumanSkinToneEnum'
            - type: 'null'
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
        cell_phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Cell Phone
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        personal_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Personal Email
        admission_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Admission Date
        hr_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Hr Code
        employee_registration_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Employee Registration Number
        work_shift:
          anyOf:
            - type: string
            - type: 'null'
          title: Work Shift
        organization_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Organization Id
        branch_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Branch Id
        position_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Position Id
        sector_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Sector Id
        client_integration_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Integration Code
        dismissal_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Dismissal Date
      type: object
      title: PublicApiUpdateEmployeeRequest
    PublicApiEmployeeUpdateResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        social_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Social Name
        gov_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Gov Id
        birth_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Birth Date
        is_disabled:
          type: boolean
          title: Is Disabled
        status:
          type: string
          title: Status
        sex:
          type: string
          title: Sex
        gender:
          anyOf:
            - type: string
            - type: 'null'
          title: Gender
        mother_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Mother Name
        marital_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Marital Status
        place_of_birth:
          anyOf:
            - type: string
            - type: 'null'
          title: Place Of Birth
        educational_stage:
          anyOf:
            - type: string
            - type: 'null'
          title: Educational Stage
        human_skin_tone:
          anyOf:
            - type: string
            - type: 'null'
          title: Human Skin Tone
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
        cell_phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Cell Phone
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        personal_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Personal Email
        admission_date:
          type: string
          format: date
          title: Admission Date
        dismissal_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Dismissal Date
        hr_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Hr Code
        employee_registration_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Employee Registration Number
        work_shift:
          anyOf:
            - type: string
            - type: 'null'
          title: Work Shift
        is_active:
          type: boolean
          title: Is Active
        client_integration_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Integration Code
        organization:
          $ref: '#/components/schemas/SimpleEntity'
        branch:
          $ref: '#/components/schemas/SimpleEntity'
        position:
          $ref: '#/components/schemas/SimpleEntity'
        sector:
          $ref: '#/components/schemas/SimpleEntity'
        address:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
      type: object
      required:
        - id
        - name
        - is_disabled
        - status
        - sex
        - admission_date
        - is_active
        - organization
        - branch
        - position
        - sector
      title: PublicApiEmployeeUpdateResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PublicApiStatusEnum:
      type: string
      enum:
        - Ativo
        - Inativo
        - Afastado
        - Férias
        - Pendente
      title: PublicApiStatusEnum
    PublicApiSexEnum:
      type: string
      enum:
        - M
        - F
      title: PublicApiSexEnum
    PublicApiGenderIdentityEnum:
      type: string
      enum:
        - Cis
        - Trans
      title: PublicApiGenderIdentityEnum
    PublicApiMaritalStatusEnum:
      type: string
      enum:
        - Não informado
        - Solteiro
        - Casado
        - Separado
        - Desquitado
        - Viúvo
        - Outros
        - Divorciado
        - União Estável
      title: PublicApiMaritalStatusEnum
    PublicApiEducationalStageEnum:
      type: string
      enum:
        - Indefinida
        - Ensino Fundamental Incompleto
        - Ensino Fundamental Completo
        - Ensino Medio Incompleto
        - Ensino Medio Completo
        - Ensino Superior Incompleto
        - Ensino Superior Completo
        - Profissionalizante
        - Técnico Incompleto
        - Técnico Completo
        - Tecnólogo Incompleto
        - Tecnólogo Completo
        - Pós-graduação Incompleta
        - Pós-graduação Completo
        - Mestrado Incompleto
        - Mestrado Completo
        - Doutorado Incompleto
        - Doutorado Completo
        - PHD Incompleto
        - PHD Completo
        - Não Informado
        - Analfabeto
      title: PublicApiEducationalStageEnum
    PublicApiHumanSkinToneEnum:
      type: string
      enum:
        - Indefinido
        - Branca
        - Preta
        - Parda
        - Amarela
        - Indígena
        - Mulato
      title: PublicApiHumanSkinToneEnum
    SimpleEntity:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: SimpleEntity
    Address:
      properties:
        address:
          anyOf:
            - type: string
            - type: 'null'
          title: Address
        address_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Address Number
        address_detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Address Detail
        zip_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Zip Code
        neighborhood:
          anyOf:
            - type: string
            - type: 'null'
          title: Neighborhood
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
      type: object
      title: Address
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````