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

<Info>
  Lists <strong>pendencies</strong> (exams/processes) for your organization, with filters by status and period.
</Info>

## Overview

* **Method:** `GET`
* **Path:** `/v0/pendency/`
* **OperationId:** `public_list_pendencies_v0_pendency__get`
* **Authentication:** header `x-api-key`

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

### Enum fields and translations

<Note>
  Use exactly the enum values as defined by the API. The table below helps you understand the filters and the returned statuses.
</Note>

#### type\_exam

| Field (request) | Allowed values (API enum) | Meaning (EN)                    |
| --------------- | ------------------------- | ------------------------------- |
| `type_exam`     | `HIRING`                  | Pre-employment (admission) exam |
|                 | `DISMISSAL`               | Dismissal/termination exam      |
|                 | `PERIODIC`                | Periodic exam                   |
|                 | `RETURN`                  | Return-to-work exam             |
|                 | `RISK_CHANGE`             | Job risk change exam            |
|                 | `INTERN_HIRING`           | Intern hiring exam              |

#### Response enums (for reference)

| Field (response) | Allowed values  | Meaning (EN)   |
| ---------------- | --------------- | -------------- |
| `status`         | `ON_HOLD`       | On hold        |
|                  | `PENDING`       | Pending        |
|                  | `PRE_SCHEDULED` | Pre-scheduled  |
|                  | `SCHEDULED`     | Scheduled      |
|                  | `DONE`          | Done/Completed |
|                  | `CANCELED`      | Canceled       |
|                  | `ABSENT`        | Absent/no-show |
|                  | `MISSING_OHC`   | Missing OHC    |
|                  | `NO_RESPONSE`   | No response    |

### Example request

```bash theme={null}
curl -X GET "https://public-api.salu.com.vc/dev/routes/v0/pendency/?page=0&limit=20" \
  -H "Accept: application/json" \
  -H "x-api-key: $SALU_PUBLIC_API_KEY"
```


## OpenAPI

````yaml GET /v0/pendency/
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/pendency/:
    get:
      tags:
        - Pendency
        - Pendency
      summary: Public List Pendencies
      operationId: public_list_pendencies_v0_pendency__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: priority,due_date,sla,created_at
            title: Order By
        - name: order_dir
          in: query
          required: false
          schema:
            type: string
            default: desc,asc,asc,asc
            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: id
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                  format: uuid
              - type: 'null'
            title: Id
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/PendencyStatusEnum'
              - type: 'null'
            title: Status
        - name: type_exam
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/ExamsTypeEnum'
              - type: 'null'
            title: Type Exam
        - name: organization_id
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                  format: uuid
              - type: 'null'
            title: Organization Id
        - name: employee_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Employee Id
        - name: employee__admission_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            title: Employee  Admission Date
        - name: employee__dismissal_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            title: Employee  Dismissal Date
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - type: array
                  items:
                    type: string
                    format: uuid
                - type: 'null'
              title: Employee  Hierarchy  Branch Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPublicApiPendenciesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    PendencyStatusEnum:
      type: string
      enum:
        - ON_HOLD
        - PENDING
        - PRE_SCHEDULED
        - SCHEDULED
        - DONE
        - CANCELED
        - ABSENT
        - MISSING_OHC
        - NO_RESPONSE
      title: PendencyStatusEnum
    ExamsTypeEnum:
      type: string
      enum:
        - HIRING
        - DISMISSAL
        - PERIODIC
        - RETURN
        - RISK_CHANGE
        - INTERN_HIRING
        - PUNCTUAL
        - CRITICAL_ACTIVITY
        - APPOINTMENT
        - APPOINTMENT_RETURN
        - ANAMNESE
        - EMPLOYEE_ACTION
      title: ExamsTypeEnum
    ListPublicApiPendenciesResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/PublicApiPendencyBaseResponse'
          type: array
          title: Data
        cursor:
          anyOf:
            - $ref: '#/components/schemas/PaginateCursor'
            - type: 'null'
      type: object
      required:
        - data
        - cursor
      title: ListPublicApiPendenciesResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PublicApiPendencyBaseResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        status:
          $ref: '#/components/schemas/PendencyStatusEnum'
        type_exam:
          $ref: '#/components/schemas/ExamsTypeEnum'
        sla:
          type: string
          format: date-time
          title: Sla
        due_date:
          type: string
          format: date-time
          title: Due Date
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
        schedule_appointment_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Schedule Appointment Time
        organization_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Organization Id
        organization_display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization Display Name
        organization_soc_code:
          type: string
          title: Organization Soc Code
        employee_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Employee Id
        employee_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Employee Name
        employee_is_disabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Employee Is Disabled
        periodicity:
          anyOf:
            - type: integer
            - type: 'null'
          title: Periodicity
        next_exam_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Next Exam Date
        ohc_status:
          anyOf:
            - $ref: '#/components/schemas/ScheduleStatusEnum'
            - type: string
              const: WAITING_FOR_OHC
          title: Ohc Status
          readOnly: true
      type: object
      required:
        - id
        - created_at
        - status
        - type_exam
        - sla
        - due_date
        - organization_id
        - organization_soc_code
        - employee_id
        - ohc_status
      title: PublicApiPendencyBaseResponse
    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
    ScheduleStatusEnum:
      type: string
      enum:
        - PENDING
        - PRE_SCHEDULED
        - SCHEDULED
        - MISSING_OHC
        - DONE
        - ABSENT
        - CANCELED
        - IN_ANALYSIS
        - ATTACHED_OHC
      title: ScheduleStatusEnum
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````