# Deletes a medical condition type

`DELETE /api/configuration/medical-types/{all}`

- **Success:** `204 No Content`
- **Products:** Operator (`FOH`)
- **Features:** Front of House Generic Access (`FOHGENERIC`)

HTML version: [Deletes a medical condition type](https://support.gladstonesoftware.cloud/reference/configuration/deletes-a-medical-condition-type)

## Overview

Deletes a medical condition type — an entry in the system-wide catalogue that member medical records are classified against. The type is removed permanently.

**The delete is refused while any member holds a condition of this type.** If any member condition records use it, the endpoint returns `409` rather than cascading the delete: `MedicalConditionType {id} cannot be deleted as MembersMedicalConditions records exist`. Member medical data is never removed as a side effect of this call. If the type is obsolete but still referenced, set `isActive` to `false` with [Update a medical condition type](updates-a-medical-condition-type.md) instead, which keeps existing records intact while removing the type from selection lists.

Deleting a type that does not exist returns `404`, so a repeated delete gives you `404` rather than a no-op. A successful call returns `204 No Content` with an empty body.

## Endpoint

`DELETE {base_url}/api/configuration/medical-types/{all}`

`{base_url}` is the environment URL issued to your integration. See [Authenticating with Gladstone APIs](../../guides/authenticating-with-gladstone-apis.md).

## Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `medicalTypeId` | integer (int32) | Yes | The medical condition type to delete, matching the `id` returned by [Retrieve all medical condition types](returns-all-medical-condition-types.md). |

## Sample request

```bash title="cURL"
curl -X DELETE '{base_url}/api/configuration/medical-types/{all}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'
```

## Sample response

```http title="204 No Content"
HTTP/1.1 204 No Content
```

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `400` | Bad request | The id path segment is empty. The body is the literal string `Id cannot be null or empty`. |
| `404` | Not found | No medical condition type exists with that id, including when you repeat a delete that has already succeeded. The body is empty. |
| `409` | Conflict | `MedicalConditionType {id} cannot be deleted as MembersMedicalConditions records exist` — one or more members still have a condition recorded against this type. |
| `500` | Internal server error | Any other unexpected server-side failure. |
