# Delete a member's medical condition record

`DELETE /api/members/medical-details/{medicalDetailId}`

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

HTML version: [Delete a member's medical condition record](https://support.gladstonesoftware.cloud/reference/members/delete-a-members-medical-condition-record)

## Overview

Removes one medical condition record from a member — the counterpart to
[Create a medical condition record for a member](create-a-medical-condition-record-for-a-member.md).
Use it when a member says a condition no longer applies, when a record was entered in error, or
when you are honouring an erasure request. On success you get `204 No Content` with no body.

The deletion is permanent. The record is removed rather than flagged as deleted, so
there is no archive to read it back from and no way to undo it. Because the record is genuinely
gone, deleting the same id again returns `404` with an empty body rather than succeeding quietly —
if you are retrying after a timeout, treat that `404` as "already done".

Note what the path takes: the **record's own id**, not the member id and not the condition type
id. Get it from `medicalConditions[].id` in
[Retrieve a member's medical information](retrieve-a-members-medical-information.md).
There is no member id anywhere in this route, which has a second consequence worth planning for:
unlike creating or reading medical details, this endpoint performs **no check that the record
belongs to the caller**. Any caller holding a valid token for the tenant can delete any medical
condition record in that tenant, including another member's, provided they know or guess its id.
If you expose deletion to end users, enforce ownership yourself before calling — read the member's
records first and only delete ids that came back in that response.

There is no bulk form of this call. To clear a member's medical history, read their records and
delete them one at a time.

## Endpoint

`DELETE {base_url}/api/members/medical-details/{medicalDetailId}`

`{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 |
|------|------|----------|-------------|
| `medicalDetailId` | integer (int32) | Yes | The medical condition record to remove, as `medicalConditions[].id` from [Retrieve a member's medical information](retrieve-a-members-medical-information.md). This is the id of the record itself — not the member id, and not `medicalConditionTypeId`. All three are plain integers, so sending the wrong one is not rejected as malformed: it either deletes some other member's record that happens to carry that id, or returns `404`. |

## Sample request

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

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `404` | Not found | No medical condition record has that id — either it never existed, or a previous delete already removed it. The response body is empty. |
| `500` | Internal server error | An unexpected server-side failure. The response has no body, and the record may or may not have been removed — re-read the member's records with [Retrieve a member's medical information](retrieve-a-members-medical-information.md) rather than assuming. |
