Health profiles
Read a connected patient's health profile and replace it, with the measurement rules and the errors.
You will read the health profile of a connected patient, replace it with an update, and handle the measurement rules.
What you need#
- A signed BAA on your company.
health-profile:readandhealth-profile:writeboth need it. See BAA handling. - A patient whose connection is
activeand carriescare.health-profile. The patient approves it on the connect page. - A patient who did not approve that scope makes calls answer
403 connection_scope_not_granted. Asking for the scope on an existing connection puts it back topendinguntil the patient approves again.
Read a profile#
GET /care/v1/patient/{patient_id}/health-profile/get/document returns the profile with the latest measurement. patient_id is the id that creating the patient answered.
curl https://api.dev.nurishd.ca/care/v1/patient/6f1c0d2e-0000-4000-8000-000000000101/health-profile/get/document \
-H "X-Partner-API-Key: $NURISHD_API_KEY"const res = await fetch(
'https://api.dev.nurishd.ca/care/v1/patient/6f1c0d2e-0000-4000-8000-000000000101/health-profile/get/document',
{ headers: { 'X-Partner-API-Key': process.env.NURISHD_API_KEY } },
);
const profile = await res.json();import os
import requests
res = requests.get(
"https://api.dev.nurishd.ca/care/v1/patient/6f1c0d2e-0000-4000-8000-000000000101/health-profile/get/document",
headers={"X-Partner-API-Key": os.environ["NURISHD_API_KEY"]},
)
profile = res.json(){
"user": "6f1c0d2e-0000-4000-8000-000000000101",
"biological_sex": "Female",
"date_of_birth": "1990-12-10",
"medications": [
{
"medication_name": "Metformin",
"dosage_amount": 500,
"dosage_unit": "mg",
"frequency": "Twice daily"
}
],
"supplements": [],
"has_diabetes": true,
"diabetes_information": {
"diabetes_type": "Type 2",
"does_user_have_family_history_of_diabetes": true,
"does_user_have_diabetic_complications": false
},
"has_heart_condition": false,
"heart_condition_information": null,
"has_other_diseases": false,
"other_diseases_notes": null,
"additional_information": "Prefers vegetarian meals.",
"general_health_data": {
"height_in_cm": 165.5,
"weight_in_kg": 70.25,
"activity_level": "Moderate",
"goal": "Managed Condition",
"managed_condition": "Diabetes [Weight Loss]",
"date_of_measurement": "2026-11-30T15:04:05Z"
},
"created_at": "2026-11-30T15:04:05Z",
"updated_at": "2026-11-30T15:04:05Z"
}has_diabetes, has_heart_condition and has_other_diseases say whether the patient has the condition. diabetes_information and heart_condition_information are null when none was saved. other_diseases_notes holds the other diseases. general_health_data is the latest measurement, and is null when there is none. A patient with no profile yet answers 404 health_profile_not_found. Create it with the update route.
Update a profile#
PUT /care/v1/patient/{patient_id}/health-profile/update/document saves the profile. It creates the profile the first time and replaces it every time after. The answer is the profile, as the read route gives it.
| Field | Required | Notes |
|---|---|---|
biological_sex | Yes | Male, Female or Prefer not to say. |
date_of_birth | Yes | YYYY-MM-DD. |
medications, supplements | No | At most 10 each, each with medication_name. Send an empty list when there are none. |
has_diabetes, has_heart_condition, has_other_diseases | No | Whether the patient has the condition. A flag you leave out is false. |
diabetes_information, heart_condition_information, other_diseases_notes | No | The details. Required when the flag is true. See below. |
additional_information | No | At most 1000 characters. |
general_health_data | No | A new measurement. Required on the first save. See below. |
Each condition has a flag and a block of details. has_diabetes: true needs diabetes_information, has_heart_condition: true needs heart_condition_information, and has_other_diseases: true needs other_diseases_notes (at most 1000 characters). Otherwise the answer is 422 validation_error. A block sent with its flag false is not refused and is saved as sent. Enum values are listed for each field in the API reference.
The first save needs a measurement:
curl -X PUT https://api.dev.nurishd.ca/care/v1/patient/6f1c0d2e-0000-4000-8000-000000000101/health-profile/update/document \
-H "X-Partner-API-Key: $NURISHD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"biological_sex": "Female",
"date_of_birth": "1990-12-10",
"medications": [{"medication_name": "Metformin", "dosage_amount": 500, "dosage_unit": "mg", "frequency": "Twice daily"}],
"has_diabetes": true,
"diabetes_information": {
"diabetes_type": "Type 2",
"does_user_have_family_history_of_diabetes": true,
"does_user_have_diabetic_complications": false
},
"additional_information": "Prefers vegetarian meals.",
"general_health_data": {
"height_in_cm": 165.5,
"weight_in_kg": 70.25,
"activity_level": "Moderate",
"goal": "Managed Condition",
"managed_condition": "Diabetes [Weight Loss]"
}
}'const res = await fetch(
'https://api.dev.nurishd.ca/care/v1/patient/6f1c0d2e-0000-4000-8000-000000000101/health-profile/update/document',
{
method: 'PUT',
headers: {
'X-Partner-API-Key': process.env.NURISHD_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
biological_sex: 'Female',
date_of_birth: '1990-12-10',
medications: [
{
medication_name: 'Metformin',
dosage_amount: 500,
dosage_unit: 'mg',
frequency: 'Twice daily',
},
],
has_diabetes: true,
diabetes_information: {
diabetes_type: 'Type 2',
does_user_have_family_history_of_diabetes: true,
does_user_have_diabetic_complications: false,
},
additional_information: 'Prefers vegetarian meals.',
general_health_data: {
height_in_cm: 165.5,
weight_in_kg: 70.25,
activity_level: 'Moderate',
goal: 'Managed Condition',
managed_condition: 'Diabetes [Weight Loss]',
},
}),
},
);import os
import requests
res = requests.put(
"https://api.dev.nurishd.ca/care/v1/patient/6f1c0d2e-0000-4000-8000-000000000101/health-profile/update/document",
headers={"X-Partner-API-Key": os.environ["NURISHD_API_KEY"]},
json={
"biological_sex": "Female",
"date_of_birth": "1990-12-10",
"medications": [
{"medication_name": "Metformin", "dosage_amount": 500, "dosage_unit": "mg", "frequency": "Twice daily"}
],
"has_diabetes": True,
"diabetes_information": {
"diabetes_type": "Type 2",
"does_user_have_family_history_of_diabetes": True,
"does_user_have_diabetic_complications": False,
},
"additional_information": "Prefers vegetarian meals.",
"general_health_data": {
"height_in_cm": 165.5,
"weight_in_kg": 70.25,
"activity_level": "Moderate",
"goal": "Managed Condition",
"managed_condition": "Diabetes [Weight Loss]",
},
},
)Change one field: read, modify, write#
To change the notes and keep everything else, read the profile and send it back. Drop user, created_at, updated_at and general_health_data from what you read: they are not input fields. Leaving general_health_data out keeps the measurement history as it is.
const getUrl =
'https://api.dev.nurishd.ca/care/v1/patient/6f1c0d2e-0000-4000-8000-000000000101/health-profile/get/document';
const putUrl =
'https://api.dev.nurishd.ca/care/v1/patient/6f1c0d2e-0000-4000-8000-000000000101/health-profile/update/document';
const headers = {
'X-Partner-API-Key': process.env.NURISHD_API_KEY,
'Content-Type': 'application/json',
};
const current = await (await fetch(getUrl, { headers })).json();
const { user, created_at, updated_at, general_health_data, ...profile } =
current;
const res = await fetch(putUrl, {
method: 'PUT',
headers,
body: JSON.stringify({
...profile,
additional_information: 'Prefers vegetarian meals, no nuts.',
}),
});import os
import requests
get_url = "https://api.dev.nurishd.ca/care/v1/patient/6f1c0d2e-0000-4000-8000-000000000101/health-profile/get/document"
put_url = "https://api.dev.nurishd.ca/care/v1/patient/6f1c0d2e-0000-4000-8000-000000000101/health-profile/update/document"
headers = {"X-Partner-API-Key": os.environ["NURISHD_API_KEY"]}
current = requests.get(get_url, headers=headers).json()
profile = {k: v for k, v in current.items() if k not in ("user", "created_at", "updated_at", "general_health_data")}
profile["additional_information"] = "Prefers vegetarian meals, no nuts."
res = requests.put(put_url, headers=headers, json=profile)Measurement rules#
general_health_data is a measurement. It adds one entry to the patient's history, and the read route answers the latest one, with date_of_measurement. It holds height_in_cm, weight_in_kg, activity_level, goal, managed_condition and the lifestyle fields alcohol_consumption_frequency, sleep_quality, smoking_status and stress_level.
- The first save needs
general_health_data. Without it the answer is422 measurement_required. - A patient can have one measurement every 24 hours. A
general_health_datasent sooner answers409 measurement_too_recent, and nothing is saved, not even the rest of the profile. - To change the profile alone, leave
general_health_dataout. managed_conditionis required ingeneral_health_datawhengoalisManaged Condition, and not allowed for any other goal.
Errors#
See Errors for the shape. Do not retry a 4xx unchanged.
| Status and code | What it means for you |
|---|---|
403 scope_not_granted | The key lacks health-profile:read or health-profile:write. |
403 connection_scope_not_granted | The patient did not approve care.health-profile. |
404 not_found | The patient does not exist, or belongs to another company or environment. |
404 health_profile_not_found | The patient has no profile yet. Create it with an update that has a measurement. |
409 connection_not_active | The connection is pending or was revoked. Read the connection. |
409 measurement_too_recent | The patient has a measurement from the last 24 hours. Send the update without general_health_data. |
422 measurement_required | A first save has no general_health_data. Add it. |
422 validation_error | A field is missing or invalid. Nothing was saved. |
Handling the data#
A health profile is patient data. Do not log it, do not send it to support, and do not paste it into an AI prompt. See Support.
Next#
- Connecting a patient: get a connection.
- BAA handling: the rules.
- Scopes: all ten scopes.
Something wrong on this page? Email hello@nurishd.io with the page address.