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

# Dismiss Employee

<Info>
  Marks an <strong>employee</strong> as dismissed (terminated), recording the dismissal date.
</Info>

<Note>
  <strong>Business rules</strong>

  * <code>dismissal\_date</code> is <strong>required</strong>. The dismissal will be recorded on this date.
  * <code>send\_email</code> (optional): when <code>true</code>, the dismissal notice will be sent on the date provided in <code>send\_date</code>. If <code>send\_date</code> is not provided, the <strong>current date</strong> will be used to send the notice.
  * The dismissal process <strong>inactivates</strong> the employee in the database and <strong>creates a dismissal medical exam</strong> for them.

  <strong>Date format</strong>

  * Field: <code>dismissal\_date</code>
  * Accepted format: <strong>ISO 8601</strong>
  * Valid examples:
    * <code>YYYY-MM-DD</code> — e.g., <code>2025-01-31</code> (date only)
    * <code>YYYY-MM-DD HH:MM:SS</code> — e.g., <code>2025-01-31 00:00:00</code> (with time in UTC)
  * If you use <code>send\_date</code>, adopt the same format.
</Note>

## Overview

* **Method:** `PATCH`
* **Path:** `/v0/employee/{employee_id}/dismiss`
* **OperationId:** `public_dismiss_employee_v0_employee__employee_id__dismiss_patch`
* **Authentication:** header `x-api-key`

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

### Example request

```bash theme={null}
curl -X PATCH "https://public-api.salu.com.vc/dev/routes/v0/employee/EMPLOYEE_ID_HERE/dismiss" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $SALU_PUBLIC_API_KEY" \
  --data '{
  "dismissal_date": "2023-12-25",
  "send_email": false,
  "send_date": null
}'
```

#### Example: email notification enabled

```bash theme={null}
curl -X PATCH "https://public-api.salu.com.vc/dev/routes/v0/employee/EMPLOYEE_ID_HERE/dismiss" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $SALU_PUBLIC_API_KEY" \
  --data '{
  "dismissal_date": "2023-12-25",
  "send_email": true,
  "send_date": "2023-11-07 05:31:56"
}'
```


## OpenAPI

````yaml PATCH /v0/employee/{employee_id}/dismiss
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/{employee_id}/dismiss:
    patch:
      tags:
        - Employee
        - Employee
      summary: Public Dismiss Employee
      operationId: public_dismiss_employee_v0_employee__employee_id__dismiss_patch
      parameters:
        - name: employee_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Employee Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicDismissEmployeeRequest'
      responses:
        '206':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicDismissEmployeeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    PublicDismissEmployeeRequest:
      properties:
        dismissal_date:
          type: string
          format: date
          title: Dismissal Date
        send_email:
          type: boolean
          title: Send Email
        send_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Send Date
      type: object
      required:
        - dismissal_date
        - send_email
      title: PublicDismissEmployeeRequest
    PublicDismissEmployeeResponse:
      properties:
        sucess:
          type: boolean
          title: Sucess
      type: object
      required:
        - sucess
      title: PublicDismissEmployeeResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````