> ## 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.

# Employee onboarding

> Register the employee and automatically generate the hiring exam.

Registering an employee does two things at once: it **positions the person in the hierarchy**
(branch × sector × position) and, by default, **generates the hiring exam pendency**.

<Info>
  Prerequisite: the [company structure](/public-api/en/flows/company-setup_en) (Branch, Sector
  and Position) must already exist, since you provide `branch_id`, `sector_id` and
  `position_id`.
</Info>

## Sequence

```mermaid theme={null}
sequenceDiagram
    participant C as Your system
    participant API as Salú API
    C->>API: POST /v0/employee (gov_id, branch_id, sector_id, position_id, admission_date, ...)
    API-->>API: Resolve/create the Hierarchy (branch × sector × position)
    API-->>API: create_exam=true → generate HIRING pendency
    API-->>C: 201 Created (employee + ids)
    Note over API,C: The hiring pendency is available at GET /v0/pendency
```

## Step by step

<Steps>
  <Step title="Build the employee payload">
    Provide the required fields: `name`, `gov_id` (CPF), `sex`, `is_disabled`,
    `organization_id`, `branch_id`, `sector_id`, `position_id`, `admission_date` and `status`.
    Add any complementary fields you have (contact, `hr_code`, eSocial data, etc.).
  </Step>

  <Step title="Create the employee">
    `POST /v0/employee`. The hierarchy is resolved from the three IDs; if the combination does
    not yet exist in the organization, it is created.
  </Step>

  <Step title="Automatic hiring exam">
    With `create_exam = true` (default), a [pendency](/public-api/en/concepts/exam-pendency_en)
    of type `HIRING` is generated. Use `send_email`/`send_date` to control the communication to
    the employee.
  </Step>

  <Step title="Track the pendency">
    List the employee's pendencies in
    [List pendencies](/public-api/en/endpoints/pendencies/public_list_pendencies_v0_pendency__get_en)
    and track the `status` until completion (ASO).
  </Step>
</Steps>

<Note>
  If the employee is **PCD** (`is_disabled = true`), you may need to associate a
  [PCD analysis](/public-api/en/flows/pcd-analysis_en) (`disability_analysis_id`).
</Note>

## Following events

Dismissal, return and risk change generate new pendencies automatically — see the
[Exam lifecycle](/public-api/en/flows/exam-lifecycle_en).
