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

# List Employees

<Info>
  Este endpoint retorna uma lista de <strong>funcionários</strong> (Employee).
  A resposta utiliza o schema `PublicApiEmployeeBaseResponse` em forma de lista.
</Info>

## Visão Geral

* **Método:** `GET`
* **Path:** `/v0/employee/`
* **OperationId:** `public_list_employees_v0_employee__get`
* **Autenticação:** header `x-api-key` (`APIKeyHeader` no OpenAPI)

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

### Parâmetros de consulta (principais)

* `page` (padrão: `0`)
* `limit` (padrão: `20`)
* `order_by` (padrão: `name,status`) — aceita múltiplos campos separados por vírgula
* `order_dir` (padrão: `asc,desc`) — direções correspondem aos campos em `order_by`
* `is_active` (padrão: `true`)
* `is_disabled` (opcional)
* `name`, `gov_id` (CPF), `email`
* `status[]` (lista de valores permitidos pelo schema `StatusEnumFilter`)
* `position_id`, `sector_id` (UUID)
* `branch_id[]`, `organization_id[]`, `id[]` (listas de UUID)
* `birth_date`, `admission_date`, `dismissal_date` (formato `YYYY-MM-DD`)
* `client_integration_code` (opcional)

<Note>
  Dicas e cuidados

  * <strong>Filtro de status</strong>: a API espera os valores de enum em <strong>português</strong> em `status[]` (ex.: <code>Ativo</code>, <code>Pendente</code>). <strong>Não</strong> envie palavras em inglês como <code>ACTIVE</code>.
  * <strong>Múltiplos valores</strong>: você pode repetir o parâmetro para enviar mais de um valor (ex.: <code>\&status=Ativo\&status=Pendente</code>) ou usar a notação de array conforme seu cliente HTTP.
  * <strong>Ordenação</strong>: `order_by` e `order_dir` são posicionais — a primeira direção corresponde ao primeiro campo, e assim por diante. Se enviar apenas uma direção, ela vale para todos os campos listados.
  * <strong>UUIDs</strong>: campos como `id`, `branch_id`, `sector_id`, `organization_id` devem ser UUIDs válidos; caso contrário, a API pode retornar <code>400 Bad Request</code>.
  * <strong>Paginação</strong>: combine `page` e `limit` para controlar a janela de resultados; os padrões estão acima.
</Note>

### Exemplo de requisição

```bash theme={null}
curl -X GET "https://public-api.salu.com.vc/dev/routes/v0/employee/?page=0&limit=20&order_by=name,status&order_dir=asc,desc&is_active=true&name=Maria&branch_id=11111111-1111-1111-1111-111111111111&status=ACTIVE&status=PENDING" \
  -H "Accept: application/json" \
  -H "x-api-key: $SALU_PUBLIC_API_KEY"
```


## OpenAPI

````yaml GET /v0/employee/
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/:
    get:
      tags:
        - Employee
        - Employee
      summary: Public List Employees
      operationId: public_list_employees_v0_employee__get
      parameters:
        - name: is_active
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - enum:
                  - 'true'
                  - 'false'
                  - ''
                type: string
              - type: 'null'
            default: true
            title: Is Active
        - name: order_by
          in: query
          required: false
          schema:
            type: string
            default: name,status
            title: Order By
        - name: order_dir
          in: query
          required: false
          schema:
            type: string
            default: asc,desc
            title: Order Dir
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 0
            title: Page
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 20
            title: Limit
        - name: name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Name
        - name: gov_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Gov Id
        - name: email
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Email
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/StatusEnumFilter'
              - type: 'null'
            title: Status
        - name: position_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Position Id
        - name: sector_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Sector Id
        - name: branch_id
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                  format: uuid
              - type: 'null'
            title: Branch Id
        - name: organization_id
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                  format: uuid
              - type: 'null'
            title: Organization Id
        - name: id
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                  format: uuid
              - type: 'null'
            title: Id
        - name: birth_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            title: Birth Date
        - name: admission_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            title: Admission Date
        - name: dismissal_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            title: Dismissal Date
        - name: client_integration_code
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Client Integration Code
        - name: updated_after
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Updated After
        - name: is_disabled
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Is Disabled
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPublicApiEmployeeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    StatusEnumFilter:
      type: string
      enum:
        - Ativo
        - Inativo
        - Afastado
        - Férias
        - Pendente
      title: StatusEnumFilter
    ListPublicApiEmployeeResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/PublicApiEmployeeBaseResponse'
          type: array
          title: Data
        cursor:
          anyOf:
            - $ref: '#/components/schemas/PaginateCursor'
            - type: 'null'
      type: object
      required:
        - data
        - cursor
      title: ListPublicApiEmployeeResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PublicApiEmployeeBaseResponse:
      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: PublicApiEmployeeBaseResponse
    PaginateCursor:
      properties:
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
        page_size:
          type: integer
          title: Page Size
        total_pages:
          type: integer
          title: Total Pages
          readOnly: true
        next_page:
          type: boolean
          title: Next Page
          readOnly: true
      type: object
      required:
        - total
        - page
        - page_size
        - total_pages
        - next_page
      title: PaginateCursor
    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
    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
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````