Save the health profile of a patient
/care/v1/patient/{patient_id}/health-profile/update/documenthealth-profile:writeBAA requiredSaves the whole health profile of a patient, and answers it as get would. It creates the
profile the first time and replaces it every time after.
This is a full replace: send the whole profile; a field you leave out is cleared. To change
one thing, read the profile, change it and send all of it back. A flag you leave out is
false. has_diabetes, has_heart_condition and has_other_diseases set to true need
diabetes_information, heart_condition_information and other_diseases_notes
respectively, or the answer is 422; a block sent with its flag false is not refused and is
saved as sent.
general_health_data adds a new measurement (height, weight, activity, goal and more) to the
patient's history; get answers the latest one. It is required the first time, because a
profile cannot be created without one: without it a patient who has no profile yet answers
measurement_required. A patient can have one measurement every 24 hours: a
general_health_data sent sooner answers measurement_too_recent, and nothing is saved.
Leave general_health_data out
to change the profile alone.
The patient must have an active connection with your company that allows the health profile
(see get). A body that fails validation answers 422 and saves nothing. Needs the
health-profile:write scope, which needs a signed BAA.
Path parameters
patient_idstring (uuid)requiredThe ID of the patient, as
createanswered it.
Request body
additional_informationstringnullableNotes about the health profile, at most 1000 characters.
Min length 1 · Max length 1000
biological_sexenumrequiredThe biological sex.
MaleFemalePrefer not to say
date_of_birthstringrequiredThe date of birth, as
YYYY-MM-DD.Min length 10 · Max length 10 · Pattern ^\d{4}-\d{2}-\d{2}$
diabetes_informationHealthProfileDiabetesInputnullableThe diabetes information. Required when
has_diabetesis true; saved as sent when it is false.Show child attributesHide child attributes
additional_informationstringnullableNotes about the diabetes.
Min length 1 · Max length 500 · Pattern ^[a-zA-Z0-9\s.,!?;:'\"@#%^&*()_+=-]{1,500}$
diabetes_typeenumrequiredThe type of diabetes.
Type 1Type 2GestationalPrediabetesOther
diabetes_type_otherstringnullableThe type of diabetes. Required when
diabetes_typeisOther.Min length 1 · Max length 500 · Pattern ^[a-zA-Z0-9\s.,!?;:'\"@#%^&*()_+=-]{1,500}$
diabetic_complicationsstringnullableThe complications. Required when
does_user_have_diabetic_complicationsis true.Min length 1 · Max length 500 · Pattern ^[a-zA-Z0-9\s.,!?;:'\"@#%^&*()_+=-]{1,500}$
does_user_have_diabetic_complicationsbooleanrequiredWhether the patient has complications of diabetes.
does_user_have_family_history_of_diabetesbooleanrequiredWhether diabetes runs in the family.
general_health_dataHealthProfileGeneralHealthDataInputnullableA new measurement to add to the patient's history. Required the first time a health profile is saved. A patient can have one measurement every 24 hours.
Show child attributesHide child attributes
activity_levelenumrequiredHow active the patient is.
SedentaryLightModerateActiveExtractive
alcohol_consumption_frequencyenumnullableHow often the patient drinks alcohol.
Never drinksLight (up to 1 drink per day)Moderate (1-2 drinks per day)Heavy (more than 2 drinks per day)Binge Drinking (5+ drinks on a single occasion)
goalenumrequiredThe health goal.
Weight LossMaintainMuscle GainWeight Loss and Muscle GainManaged Condition
height_in_cmnumber | stringrequiredThe height in centimeters, above 0, with at most 10 digits and 4 decimal places.
managed_conditionenumnullableThe condition managed. Required when
goalisManaged Conditionand not allowed for any other goal.ObesityHeart DiseaseDiabetes [Weight Loss]Diabetes [Maintain]Diabetes [Muscle Gain]Prediabetes Reversal [Weight Loss]Prediabetes Reversal [Maintain]Prediabetes Reversal [Muscle Gain]Chronic Kidney Disease Stage 1Chronic Kidney Disease Stage 2Chronic Kidney Disease Stage 3Chronic Kidney Disease Stage 4Chronic Kidney Disease Stage 5 [Dialysis]Chronic Kidney Disease Stage 5 [Non-Dialysis]Neuroprotective Diet [Weight Loss]Neuroprotective Diet [Maintain]Neuroprotective Diet [Muscle Gain]
sleep_qualityenumnullableHow well the patient sleeps.
Low sleep qualityModerate sleep qualityHigh sleep qualityExcellent sleep quality
smoking_statusenumnullableThe smoking status.
Non-SmokerFormer SmokerOccasional SmokerRegular Smoker
stress_levelenumnullableHow stressed the patient is.
Low stress (relaxed throughout the day)Moderate stress (some stress throughout the day)High stress (stressed throughout the day)Extremely High stress (very stressed throughout the day)
weight_in_kgnumber | stringrequiredThe weight in kilograms, above 0, with at most 10 digits and 4 decimal places.
has_diabetesbooleanWhether the patient has diabetes. When true,
diabetes_informationis required. Defaults to false.Default false
has_heart_conditionbooleanWhether the patient has a heart condition. When true,
heart_condition_informationis required. Defaults to false.Default false
has_other_diseasesbooleanWhether the patient has other diseases. When true,
other_diseases_notesis required. Defaults to false.Default false
heart_condition_informationHealthProfileHeartConditionInputnullableThe heart condition information. Required when
has_heart_conditionis true; saved as sent when it is false.Show child attributesHide child attributes
additional_informationstringnullableNotes about the heart condition.
Min length 1 · Max length 500 · Pattern ^[a-zA-Z0-9\s.,!?;:'\"@#%^&*()_+=-]{1,500}$
does_user_have_heart_condition_family_historybooleanrequiredWhether heart conditions run in the family.
heart_condition_typeenumrequiredThe type of heart condition.
Coronary Artery DiseaseHeart FailureHypertensionArrhythmiaOther
heart_condition_type_otherstringnullableThe type of heart condition. Required when
heart_condition_typeisOther.Min length 1 · Max length 500 · Pattern ^[a-zA-Z0-9\s.,!?;:'\"@#%^&*()_+=-]{1,500}$
medicationsarray of HealthProfileMedicationInputThe medications the patient takes, at most 10, each with its own name. Empty when there are none.
Show child attributesHide child attributes
dosage_amountnumber | stringrequiredThe amount of one dose, at least 0, with at most 10 digits and 4 decimal places.
dosage_unitenumrequiredThe unit of the dose.
gmgmcgIUunitstabletsmlother
dosage_unit_otherstringnullableThe unit of the dose. Required when
dosage_unitisother.Min length 1 · Max length 500
frequencyenumrequiredHow often it is taken.
Once dailyTwice dailyThree times dailyFour times dailyWith mealsBefore mealsAfter mealsAt bedtimeEvery other dayAs neededOther
frequency_otherstringnullableHow often it is taken. Required when
frequencyisOther.Min length 1 · Max length 500
medication_namestringrequiredThe name of the medication or supplement.
Min length 1 · Max length 500 · Pattern ^[a-zA-Z0-9\s.,!?;:'\"@#%^&*()_+=-]{1,500}$
other_diseases_notesstringnullableThe other diseases of the patient, at most 1000 characters. Required when
has_other_diseasesis true; saved as sent when it is false.Min length 1 · Max length 1000
supplementsarray of HealthProfileMedicationInputThe supplements the patient takes, at most 10, each with its own name. Empty when there are none.
Show child attributesHide child attributes
dosage_amountnumber | stringrequiredThe amount of one dose, at least 0, with at most 10 digits and 4 decimal places.
dosage_unitenumrequiredThe unit of the dose.
gmgmcgIUunitstabletsmlother
dosage_unit_otherstringnullableThe unit of the dose. Required when
dosage_unitisother.Min length 1 · Max length 500
frequencyenumrequiredHow often it is taken.
Once dailyTwice dailyThree times dailyFour times dailyWith mealsBefore mealsAfter mealsAt bedtimeEvery other dayAs neededOther
frequency_otherstringnullableHow often it is taken. Required when
frequencyisOther.Min length 1 · Max length 500
medication_namestringrequiredThe name of the medication or supplement.
Min length 1 · Max length 500 · Pattern ^[a-zA-Z0-9\s.,!?;:'\"@#%^&*()_+=-]{1,500}$
Response 200
additional_informationstringnullableNotes about the health profile.
biological_sexenumrequiredThe biological sex.
MaleFemalePrefer not to say
created_atstring (date-time)requiredWhen the health profile was created, in UTC.
date_of_birthstringrequiredThe date of birth, as
YYYY-MM-DD.diabetes_informationHealthProfileDiabetesOutputnullableThe diabetes information.
nullwhen none was saved.Show child attributesHide child attributes
additional_informationstringnullableNotes about the diabetes.
diabetes_typeenumrequiredThe type of diabetes.
Type 1Type 2GestationalPrediabetesOther
diabetes_type_otherstringnullableThe type of diabetes, when
diabetes_typeisOther.diabetic_complicationsstringnullableThe complications, when there are any.
does_user_have_diabetic_complicationsbooleanrequiredWhether the patient has complications of diabetes.
does_user_have_family_history_of_diabetesbooleanrequiredWhether diabetes runs in the family.
general_health_dataHealthProfileGeneralHealthDataOutputnullableThe latest measurement.
nullwhen there is none.Show child attributesHide child attributes
activity_levelenumrequiredHow active the patient is.
SedentaryLightModerateActiveExtractive
alcohol_consumption_frequencyenumnullableHow often the patient drinks alcohol.
Never drinksLight (up to 1 drink per day)Moderate (1-2 drinks per day)Heavy (more than 2 drinks per day)Binge Drinking (5+ drinks on a single occasion)
date_of_measurementstring (date-time)requiredWhen the measurement was taken, in UTC.
goalenumrequiredThe health goal.
Weight LossMaintainMuscle GainWeight Loss and Muscle GainManaged Condition
height_in_cmnumberrequiredThe height in centimeters.
managed_conditionenumnullableThe condition managed, when the goal is
Managed Condition.ObesityHeart DiseaseDiabetes [Weight Loss]Diabetes [Maintain]Diabetes [Muscle Gain]Prediabetes Reversal [Weight Loss]Prediabetes Reversal [Maintain]Prediabetes Reversal [Muscle Gain]Chronic Kidney Disease Stage 1Chronic Kidney Disease Stage 2Chronic Kidney Disease Stage 3Chronic Kidney Disease Stage 4Chronic Kidney Disease Stage 5 [Dialysis]Chronic Kidney Disease Stage 5 [Non-Dialysis]Neuroprotective Diet [Weight Loss]Neuroprotective Diet [Maintain]Neuroprotective Diet [Muscle Gain]
sleep_qualityenumnullableHow well the patient sleeps.
Low sleep qualityModerate sleep qualityHigh sleep qualityExcellent sleep quality
smoking_statusenumnullableThe smoking status.
Non-SmokerFormer SmokerOccasional SmokerRegular Smoker
stress_levelenumnullableHow stressed the patient is.
Low stress (relaxed throughout the day)Moderate stress (some stress throughout the day)High stress (stressed throughout the day)Extremely High stress (very stressed throughout the day)
weight_in_kgnumberrequiredThe weight in kilograms.
has_diabetesbooleanrequiredWhether the patient has diabetes.
has_heart_conditionbooleanrequiredWhether the patient has a heart condition.
has_other_diseasesbooleanrequiredWhether the patient has other diseases.
heart_condition_informationHealthProfileHeartConditionOutputnullableThe heart condition information.
nullwhen none was saved.Show child attributesHide child attributes
additional_informationstringnullableNotes about the heart condition.
does_user_have_heart_condition_family_historybooleanrequiredWhether heart conditions run in the family.
heart_condition_typeenumrequiredThe type of heart condition.
Coronary Artery DiseaseHeart FailureHypertensionArrhythmiaOther
heart_condition_type_otherstringnullableThe type of heart condition, when
heart_condition_typeisOther.
medicationsarray of HealthProfileMedicationOutputThe medications the patient takes.
Show child attributesHide child attributes
dosage_amountnumberrequiredThe amount of one dose.
dosage_unitenumrequiredThe unit of the dose.
gmgmcgIUunitstabletsmlother
dosage_unit_otherstringnullableThe unit of the dose, when
dosage_unitisother.frequencyenumrequiredHow often it is taken.
Once dailyTwice dailyThree times dailyFour times dailyWith mealsBefore mealsAfter mealsAt bedtimeEvery other dayAs neededOther
frequency_otherstringnullableHow often it is taken, when
frequencyisOther.medication_namestringrequiredThe name of the medication or supplement.
other_diseases_notesstringnullableThe other diseases of the patient.
nullwhen none were saved.supplementsarray of HealthProfileMedicationOutputThe supplements the patient takes.
Show child attributesHide child attributes
dosage_amountnumberrequiredThe amount of one dose.
dosage_unitenumrequiredThe unit of the dose.
gmgmcgIUunitstabletsmlother
dosage_unit_otherstringnullableThe unit of the dose, when
dosage_unitisother.frequencyenumrequiredHow often it is taken.
Once dailyTwice dailyThree times dailyFour times dailyWith mealsBefore mealsAfter mealsAt bedtimeEvery other dayAs neededOther
frequency_otherstringnullableHow often it is taken, when
frequencyisOther.medication_namestringrequiredThe name of the medication or supplement.
updated_atstring (date-time)requiredWhen the health profile last changed, in UTC.
userstring (uuid)requiredThe ID of the patient.
Errors
Every error has this shape. Branch on code, not on message. request_id equals the X-Request-Id response header.
{
"error": {
"code": "not_found",
"message": "The object does not exist.",
"request_id": "req_0123456789abcdef0123456789abcdef"
}
}| Status | Code | Meaning |
|---|---|---|
401 | invalid_api_key | The API key is missing or not valid. |
403 | company_archived | This company is archived. |
403 | company_not_live | The company must be live to use prod keys. |
403 | company_suspended | This company is suspended. |
403 | connection_scope_not_granted | The connection does not hold the care.health-profile scope. |
403 | scope_not_granted | This API key does not have the health-profile:write scope. |
404 | not_found | The requested resource was not found. |
409 | connection_not_active | The connection is not active. |
409 | measurement_too_recent | The patient already has a measurement from the last 24 hours. Save the profile without a measurement, or send the next one later. |
422 | measurement_required | The first save of a health profile needs a measurement. |
422 | validation_error | body.biological_sex: Field required |
429 | rate_limited | Too many requests. Wait before calling again. |
500 | internal_error | Something went wrong on our side. Please try again later. |
502 | upstream_error | A Nurish'd service could not complete the request. |
503 | upstream_unavailable | A Nurish'd service is unavailable. Please try again later. |
504 | upstream_timeout | A Nurish'd service did not answer in time. Please try again. |