# Updates a medical condition type

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

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

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

## Overview

Updates a medical condition type — one of the categories staff choose from when recording a health condition against a member, such as "Asthma" or "Epilepsy".

**This is a full replacement, not a partial update**, though in practice that costs you nothing: both body fields are required, so every call states the complete new state. There is no way to change the description without also restating whether the type is active, or the other way round.

Renaming a type renames it for every member record already using it — conditions reference the type rather than storing a copy of its text. If you need the old wording to survive on historic records, deactivate this type with `isActive: false` and create a new one with [Create medical condition type](creates-a-medical-condition-type.md) instead.

**Two behaviours will surprise you:**

- **A `medicalTypeId` that does not exist returns `400`, not `404`.** The message is `The medical condition type ID {id} does not exist`. Do not treat a `400` from this endpoint as necessarily meaning your body was malformed.
- A successful update returns **`204 No Content` with an empty body**, not the updated type. Fetch the type again with [Get medical condition type by ID](returns-a-specific-medical-condition-type-based-on-the-id.md) if you need to see the result.

## Endpoint

`PUT {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's identifier, as returned in `[].id` by [List medical condition types](returns-all-medical-condition-types.md). An id that matches nothing is rejected with `400` and `The medical condition type ID {id} does not exist`, not `404`. |

## Request body

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `typeDescription` | string | Yes | The condition type's name, as staff see it when recording a member's medical information. Required — omitting it or sending null fails with `A medical condition type description is required in this request` — and limited to 50 characters, beyond which it fails with `The medical condition type description cannot be more than 50 characters`. It must be unique across all condition types: reusing another type's description returns `409`. |
| `isActive` | boolean | Yes | Whether the type is offered when recording new conditions. Set `false` to retire it — existing member records that use it are left intact, they simply cannot be added to any longer. Genuinely required: sending null or leaving it out fails with `The IsActive flag is required in this request` rather than defaulting. |

## Sample request

```bash title="cURL"
curl -X PUT '{base_url}/api/configuration/medical-types/{all}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true' \
  -H 'Content-Type: application/json' \
  -d '{
  "typeDescription": "string",
  "isActive": true
}'
```

## Response fields

| Field | Type | Description |
|-------|------|-------------|
| `id` | integer (int32) | The condition type's identifier — the value you pass as `medicalTypeId`. |
| `typeDescription` | string | The condition type's name, unique across types. |
| `isActive` | boolean | Whether the type is still offered for new records. |

## Sample response

```json title="200 OK"
{
  "id": 12345,
  "typeDescription": "string",
  "isActive": true
}
```

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `400` | Bad request | No condition type has that `medicalTypeId` — `The medical condition type ID {id} does not exist`. This is the response for an unknown id; this endpoint does not return `404` for it. |
| `400` | Bad request | `typeDescription` is missing (`A medical condition type description is required in this request`) or over 50 characters (`The medical condition type description cannot be more than 50 characters`), or `isActive` is missing (`The IsActive flag is required in this request`). The body is a validation error object keyed by field name. |
| `404` | Not found | Not returned by this endpoint — an unknown id returns `400` instead. |
| `409` | Conflict | Another condition type already uses that `typeDescription` — `The record updating contains a key already in use`. |
| `500` | Internal server error | An unexpected server-side failure, including a storage error other than a duplicate `typeDescription`. The response body is empty. |
