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

# Overview and data model

> The core entities of the Salú public API and how they relate.

Salú is an **occupational health and safety (OHS)** platform. The public API lets client
systems (ERP, payroll, HR) maintain the company structure and employees in a secure,
traceable way — and, from there, the **occupational exam** lifecycle (ASO, the Brazilian
Occupational Health Certificate).

<Info>
  If you haven't yet, start with [How to use](/public-api/en/how-to-use): environments,
  `x-api-key` authentication, pagination and errors.
</Info>

## Core entities

| Entity                                                    | What it is                                        | Public endpoint        |
| --------------------------------------------------------- | ------------------------------------------------- | ---------------------- |
| [Organization](/public-api/en/concepts/organization_en)   | The client company (root CNPJ) that owns the data | List                   |
| [Branch](/public-api/en/concepts/branch_en)               | Physical/legal site where people work             | CRUD                   |
| [Sector](/public-api/en/concepts/sector_en)               | Area/department within the company                | CRUD                   |
| [Position](/public-api/en/concepts/position_en)           | Role performed by the employee                    | CRUD                   |
| [Hierarchy](/public-api/en/concepts/hierarchy_en)         | The Branch × Sector × Position combination        | — (derived)            |
| [Employee](/public-api/en/concepts/employee_en)           | A person (CPF) linked to the organization         | CRUD                   |
| [Exam pendency](/public-api/en/concepts/exam-pendency_en) | An occupational exam obligation                   | List / create / cancel |
| [PCD analysis](/public-api/en/concepts/pcd-analysis_en)   | Disability analysis (person with a disability)    | Create / read          |

## How they relate

```mermaid theme={null}
erDiagram
    ORGANIZATION ||--o{ BRANCH : "has"
    ORGANIZATION ||--o{ SECTOR : "has"
    ORGANIZATION ||--o{ POSITION : "has"
    BRANCH ||--o{ HIERARCHY : "composes"
    SECTOR ||--o{ HIERARCHY : "composes"
    POSITION ||--o{ HIERARCHY : "composes"
    HIERARCHY ||--o{ EMPLOYEE : "positions"
    PERSON ||--o{ EMPLOYEE : "CPF (gov_id)"
    ORGANIZATION ||--o{ EMPLOYEE : "employs"
    EMPLOYEE ||--o{ PENDENCY : "generates"
    EMPLOYEE ||--o{ PCD_ANALYSIS : "has"
    PENDENCY ||--o{ SCHEDULE : "has"
    CLINIC ||--o{ SCHEDULE : "performs"
```

In words:

* An **Organization** owns **Branches**, **Sectors** and **Positions**.
* A Branch + a Sector + a Position form a **Hierarchy** — the "position" an employee is
  assigned to. This combination defines the **occupational risks** and therefore the required
  exams.
* An **Employee** links a **Person** (identified by **CPF**) to the organization, in a
  Hierarchy. Each action on the employee (hiring, dismissal, periodic, return, risk change)
  **generates an exam pendency**.
* The **Pendency** tracks the exam until completion (ASO issued) or cancellation. Scheduling
  at a clinic and performing the exam are orchestrated internally by Salú.

<Note>
  **Schedule** and **Clinic** appear in the diagram to explain the exam lifecycle, but they
  have **no public endpoints** — they are managed inside the Salú platform. The public API
  exposes the resources marked in the table above.
</Note>

## Next steps

<CardGroup cols={2}>
  <Card title="Set up the company structure" icon="sitemap" href="/public-api/en/flows/company-setup_en">
    Create Branches, Sectors and Positions before registering employees.
  </Card>

  <Card title="Employee onboarding" icon="user-plus" href="/public-api/en/flows/employee-onboarding_en">
    Register the employee and generate the hiring exam.
  </Card>
</CardGroup>
