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

# Cancel Pendency

<Info>
  Cancels an existing <strong>pendency</strong>, when applicable.
</Info>

## Overview

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

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

### Example Request

```bash theme={null}
curl -X POST "https://public-api.salu.com.vc/dev/routes/v0/pendency/cancel" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $SALU_PUBLIC_API_KEY" \
  --data '{
    "pendency_id": "PENDENCY_UUID",
    "note": "Cancellation requested by the client"
  }'
```


## OpenAPI

````yaml POST /v0/pendency/cancel
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/cancel:
    post:
      tags:
        - Pendency
        - Pendency
      summary: Public Cancel Pendency
      operationId: public_cancel_pendency_v0_pendency_cancel_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicApiCancelPendencyRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiPendencyBaseResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    PublicApiCancelPendencyRequest:
      properties:
        pendency_id:
          type: string
          format: uuid
          title: Pendency Id
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
      additionalProperties: false
      type: object
      required:
        - pendency_id
      title: PublicApiCancelPendencyRequest
    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
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
    ScheduleStatusEnum:
      type: string
      enum:
        - PENDING
        - PRE_SCHEDULED
        - SCHEDULED
        - MISSING_OHC
        - DONE
        - ABSENT
        - CANCELED
        - IN_ANALYSIS
        - ATTACHED_OHC
      title: ScheduleStatusEnum
    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

````