Updates a medical condition type

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

Success: 200 OK

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

Two behaviours will surprise you:

Endpoint

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

{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.

Path parameters

NameTypeRequiredDescription
medicalTypeIdinteger (int32)YesThe medical condition type's identifier, as returned in [].id by List medical condition types. An id that matches nothing is rejected with 400 and The medical condition type ID {id} does not exist, not 404.

Request body

FieldTypeRequiredDescription
typeDescriptionstringYesThe 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.
isActivebooleanYesWhether 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

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

FieldTypeDescription
idinteger (int32)The condition type's identifier — the value you pass as medicalTypeId.
typeDescriptionstringThe condition type's name, unique across types.
isActivebooleanWhether the type is still offered for new records.

Sample response

200 OK
{
  "id": 12345,
  "typeDescription": "string",
  "isActive": true
}

Errors

StatusMeaningWhen
400Bad requestNo 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.
400Bad requesttypeDescription 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.
404Not foundNot returned by this endpoint — an unknown id returns 400 instead.
409ConflictAnother condition type already uses that typeDescription — The record updating contains a key already in use.
500Internal server errorAn unexpected server-side failure, including a storage error other than a duplicate typeDescription. The response body is empty.

This page as markdown · All pages · llms.txt