> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.taigabilling.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.taigabilling.com/_mcp/server.

# Pre Encounter Appointments V 1 Deactivate

DELETE https://api.taigabilling.com/appointments/v1/{id}/{version}

Sets an appointment as deactivated.  The path must contain the most recent version to prevent race conditions.  Deactivating historic versions is not supported. Subsequent updates via PUT to the appointment will "reactivate" the appointment, set the deactivated flag to false, and clear the cancellation reason.

Reference: https://docs.taigabilling.com/api-reference/pre-encounter-appointments-v-1/pre-encounter-appointments-v-1-deactivate

## Authentication

- `Authorization` header (bearer token, required) — Send your Taiga API key as a Bearer token. Create and manage keys in the Taiga developer portal.

## Servers

- `https://api.taigabilling.com` (Production, default)
- `https://api-staging.taigabilling.com` (Staging)

## Request

### Path parameters

- `id` (string, required) — The unique identifier for an Appointment.
- `version` (string, required)

### Query parameters

- `cancellation_reason` (string, optional) — The reason the appointment is being cancelled.

## Errors

### 404 Not Found Error

- `PreEncounter_appointments_v1_deactivateRequestNotFoundError`
  - PreEncounterAppointmentsV1DeactivateRequestNotFoundError0

### 409 Conflict Error

- `PreEncounter_appointments_v1_deactivateRequestConflictError`
  - PreEncounterAppointmentsV1DeactivateRequestConflictError0

## Types

### PreEncounterAppointmentsV1DeactivateRequestNotFoundError0

- `errorName` (enum, optional)
  - Allowed values: `VersionConflictError`
- `content` (pre-encounterErrorBase4xx, optional)

### PreEncounterAppointmentsV1DeactivateRequestConflictError0

- `errorName` (enum, optional)
  - Allowed values: `VersionConflictError`
- `content` (pre-encounterVersionConflictErrorBody, optional)

### pre-encounterErrorBase4xx

- `message` (string, required)
- `data` (any, optional, nullable)

### pre-encounterVersionConflictErrorBody

- `message` (string, required)
- `data` (any, optional, nullable)
- `latest_version` (integer, optional, nullable)

## Examples

**SDK Code**

```python
import requests

url = "https://api.taigabilling.com/appointments/v1/id/version"

headers = {"Authorization": "Bearer <token>"}

response = requests.delete(url, headers=headers)

print(response.json())
```