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

# Create Pendency

<Info>
  Creates a new <strong>pendency</strong> (exam/process) for an employee.
</Info>

## Overview

* **Method:** `POST`
* **Path:** `/v0/pendency/`
* **OperationId:** `public_create_pendency_v0_pendency__post`
* **Authentication:** header `x-api-key`

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

### Enum fields and translations

<Note>
  Use exactly the enum values as defined by the API. The values below must be sent exactly as shown.
</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 POST "https://public-api.salu.com.vc/dev/routes/v0/pendency/" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $SALU_PUBLIC_API_KEY" \
  --data '{
    "employee_id": "EMPLOYEE_UUID",
    "type_exam": "HIRING",
    "send_email": true,
    "send_date": null
  }'
```


## OpenAPI

````yaml POST /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/:
    post:
      tags:
        - Pendency
        - Pendency
      summary: Public Create Pendency
      operationId: public_create_pendency_v0_pendency__post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicApiCreatePendencyRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiCreatePendencyResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    PublicApiCreatePendencyRequest:
      properties:
        employee_id:
          type: string
          format: uuid
          title: Employee Id
        send_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Send Date
        type_exam:
          $ref: '#/components/schemas/ExamsTypeEnum'
        send_email:
          type: boolean
          title: Send Email
        exam_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Exam Date
      additionalProperties: false
      type: object
      required:
        - employee_id
        - type_exam
        - send_email
      title: PublicApiCreatePendencyRequest
    PublicApiCreatePendencyResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        employee_id:
          type: string
          format: uuid
          title: Employee Id
        type_exam:
          $ref: '#/components/schemas/ExamsTypeEnum'
        status:
          $ref: '#/components/schemas/PendencyStatusEnum'
        priority:
          type: boolean
          title: Priority
        block_status:
          anyOf:
            - $ref: '#/components/schemas/PendencyBlockStatusEnum'
            - type: 'null'
        created_at:
          type: string
          format: date-time
          title: Created At
        created_by:
          type: string
          title: Created By
        updated_at:
          type: string
          format: date-time
          title: Updated At
        updated_by:
          type: string
          title: Updated By
        organization_id:
          type: string
          format: uuid
          title: Organization Id
        organization_display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization Display Name
        employee_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Employee Name
      type: object
      required:
        - id
        - employee_id
        - type_exam
        - status
        - priority
        - created_at
        - created_by
        - updated_at
        - updated_by
        - organization_id
        - organization_display_name
        - employee_name
      title: PublicApiCreatePendencyResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ExamsTypeEnum:
      type: string
      enum:
        - HIRING
        - DISMISSAL
        - PERIODIC
        - RETURN
        - RISK_CHANGE
        - INTERN_HIRING
        - PUNCTUAL
        - CRITICAL_ACTIVITY
        - APPOINTMENT
        - APPOINTMENT_RETURN
        - ANAMNESE
        - EMPLOYEE_ACTION
      title: ExamsTypeEnum
    PendencyStatusEnum:
      type: string
      enum:
        - ON_HOLD
        - PENDING
        - PRE_SCHEDULED
        - SCHEDULED
        - DONE
        - CANCELED
        - ABSENT
        - MISSING_OHC
        - NO_RESPONSE
      title: PendencyStatusEnum
    PendencyBlockStatusEnum:
      type: string
      enum:
        - EXAM_EXTENSION
        - FINDING_CLINIC
        - BLOCKED_CLINIC
        - WAITING_FOR_HR_RESPONSE
        - WAITING_FOR_EMPLOYEE_RESPONSE
        - WAITING_FOR_HEALTH_TEAM_RESPONSE
        - WAITING_FOR_ENGINEERING_TEAM_RESPONSE
        - ARCHIVED
        - UNDER_MANAGEMENT
        - HR_RETURNED_PENDENCY
        - EMPLOYEE_ATTENDANCE_CONFIRMED
      title: PendencyBlockStatusEnum
    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

````