Developers

Search the docs

Search guides and headings.

Save the health profile of a patient

PUT/care/v1/patient/{patient_id}/health-profile/update/document
Scope: health-profile:writeBAA required

Saves 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)required

    The ID of the patient, as create answered it.

Request body

  • additional_informationstringnullable

    Notes about the health profile, at most 1000 characters.

    Min length 1 · Max length 1000

  • biological_sexenumrequired

    The biological sex.

    • Male
    • Female
    • Prefer not to say
  • date_of_birthstringrequired

    The date of birth, as YYYY-MM-DD.

    Min length 10 · Max length 10 · Pattern ^\d{4}-\d{2}-\d{2}$

  • diabetes_informationHealthProfileDiabetesInputnullable

    The diabetes information. Required when has_diabetes is true; saved as sent when it is false.

    Show child attributesHide child attributes
    • additional_informationstringnullable

      Notes about the diabetes.

      Min length 1 · Max length 500 · Pattern ^[a-zA-Z0-9\s.,!?;:'\"@#%^&*()_+=-]{1,500}$

    • diabetes_typeenumrequired

      The type of diabetes.

      • Type 1
      • Type 2
      • Gestational
      • Prediabetes
      • Other
    • diabetes_type_otherstringnullable

      The type of diabetes. Required when diabetes_type is Other.

      Min length 1 · Max length 500 · Pattern ^[a-zA-Z0-9\s.,!?;:'\"@#%^&*()_+=-]{1,500}$

    • diabetic_complicationsstringnullable

      The complications. Required when does_user_have_diabetic_complications is true.

      Min length 1 · Max length 500 · Pattern ^[a-zA-Z0-9\s.,!?;:'\"@#%^&*()_+=-]{1,500}$

    • does_user_have_diabetic_complicationsbooleanrequired

      Whether the patient has complications of diabetes.

    • does_user_have_family_history_of_diabetesbooleanrequired

      Whether diabetes runs in the family.

  • general_health_dataHealthProfileGeneralHealthDataInputnullable

    A 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_levelenumrequired

      How active the patient is.

      • Sedentary
      • Light
      • Moderate
      • Active
      • Extractive
    • alcohol_consumption_frequencyenumnullable

      How often the patient drinks alcohol.

      • Never drinks
      • Light (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)
    • goalenumrequired

      The health goal.

      • Weight Loss
      • Maintain
      • Muscle Gain
      • Weight Loss and Muscle Gain
      • Managed Condition
    • height_in_cmnumber | stringrequired

      The height in centimeters, above 0, with at most 10 digits and 4 decimal places.

    • managed_conditionenumnullable

      The condition managed. Required when goal is Managed Condition and not allowed for any other goal.

      • Obesity
      • Heart Disease
      • Diabetes [Weight Loss]
      • Diabetes [Maintain]
      • Diabetes [Muscle Gain]
      • Prediabetes Reversal [Weight Loss]
      • Prediabetes Reversal [Maintain]
      • Prediabetes Reversal [Muscle Gain]
      • Chronic Kidney Disease Stage 1
      • Chronic Kidney Disease Stage 2
      • Chronic Kidney Disease Stage 3
      • Chronic Kidney Disease Stage 4
      • Chronic Kidney Disease Stage 5 [Dialysis]
      • Chronic Kidney Disease Stage 5 [Non-Dialysis]
      • Neuroprotective Diet [Weight Loss]
      • Neuroprotective Diet [Maintain]
      • Neuroprotective Diet [Muscle Gain]
    • sleep_qualityenumnullable

      How well the patient sleeps.

      • Low sleep quality
      • Moderate sleep quality
      • High sleep quality
      • Excellent sleep quality
    • smoking_statusenumnullable

      The smoking status.

      • Non-Smoker
      • Former Smoker
      • Occasional Smoker
      • Regular Smoker
    • stress_levelenumnullable

      How 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 | stringrequired

      The weight in kilograms, above 0, with at most 10 digits and 4 decimal places.

  • has_diabetesboolean

    Whether the patient has diabetes. When true, diabetes_information is required. Defaults to false.

    Default false

  • has_heart_conditionboolean

    Whether the patient has a heart condition. When true, heart_condition_information is required. Defaults to false.

    Default false

  • has_other_diseasesboolean

    Whether the patient has other diseases. When true, other_diseases_notes is required. Defaults to false.

    Default false

  • heart_condition_informationHealthProfileHeartConditionInputnullable

    The heart condition information. Required when has_heart_condition is true; saved as sent when it is false.

    Show child attributesHide child attributes
    • additional_informationstringnullable

      Notes about the heart condition.

      Min length 1 · Max length 500 · Pattern ^[a-zA-Z0-9\s.,!?;:'\"@#%^&*()_+=-]{1,500}$

    • does_user_have_heart_condition_family_historybooleanrequired

      Whether heart conditions run in the family.

    • heart_condition_typeenumrequired

      The type of heart condition.

      • Coronary Artery Disease
      • Heart Failure
      • Hypertension
      • Arrhythmia
      • Other
    • heart_condition_type_otherstringnullable

      The type of heart condition. Required when heart_condition_type is Other.

      Min length 1 · Max length 500 · Pattern ^[a-zA-Z0-9\s.,!?;:'\"@#%^&*()_+=-]{1,500}$

  • medicationsarray of HealthProfileMedicationInput

    The medications the patient takes, at most 10, each with its own name. Empty when there are none.

    Show child attributesHide child attributes
    • dosage_amountnumber | stringrequired

      The amount of one dose, at least 0, with at most 10 digits and 4 decimal places.

    • dosage_unitenumrequired

      The unit of the dose.

      • g
      • mg
      • mcg
      • IU
      • units
      • tablets
      • ml
      • other
    • dosage_unit_otherstringnullable

      The unit of the dose. Required when dosage_unit is other.

      Min length 1 · Max length 500

    • frequencyenumrequired

      How often it is taken.

      • Once daily
      • Twice daily
      • Three times daily
      • Four times daily
      • With meals
      • Before meals
      • After meals
      • At bedtime
      • Every other day
      • As needed
      • Other
    • frequency_otherstringnullable

      How often it is taken. Required when frequency is Other.

      Min length 1 · Max length 500

    • medication_namestringrequired

      The name of the medication or supplement.

      Min length 1 · Max length 500 · Pattern ^[a-zA-Z0-9\s.,!?;:'\"@#%^&*()_+=-]{1,500}$

  • other_diseases_notesstringnullable

    The other diseases of the patient, at most 1000 characters. Required when has_other_diseases is true; saved as sent when it is false.

    Min length 1 · Max length 1000

  • supplementsarray of HealthProfileMedicationInput

    The supplements the patient takes, at most 10, each with its own name. Empty when there are none.

    Show child attributesHide child attributes
    • dosage_amountnumber | stringrequired

      The amount of one dose, at least 0, with at most 10 digits and 4 decimal places.

    • dosage_unitenumrequired

      The unit of the dose.

      • g
      • mg
      • mcg
      • IU
      • units
      • tablets
      • ml
      • other
    • dosage_unit_otherstringnullable

      The unit of the dose. Required when dosage_unit is other.

      Min length 1 · Max length 500

    • frequencyenumrequired

      How often it is taken.

      • Once daily
      • Twice daily
      • Three times daily
      • Four times daily
      • With meals
      • Before meals
      • After meals
      • At bedtime
      • Every other day
      • As needed
      • Other
    • frequency_otherstringnullable

      How often it is taken. Required when frequency is Other.

      Min length 1 · Max length 500

    • medication_namestringrequired

      The name of the medication or supplement.

      Min length 1 · Max length 500 · Pattern ^[a-zA-Z0-9\s.,!?;:'\"@#%^&*()_+=-]{1,500}$

Response 200

  • additional_informationstringnullable

    Notes about the health profile.

  • biological_sexenumrequired

    The biological sex.

    • Male
    • Female
    • Prefer not to say
  • created_atstring (date-time)required

    When the health profile was created, in UTC.

  • date_of_birthstringrequired

    The date of birth, as YYYY-MM-DD.

  • diabetes_informationHealthProfileDiabetesOutputnullable

    The diabetes information. null when none was saved.

    Show child attributesHide child attributes
    • additional_informationstringnullable

      Notes about the diabetes.

    • diabetes_typeenumrequired

      The type of diabetes.

      • Type 1
      • Type 2
      • Gestational
      • Prediabetes
      • Other
    • diabetes_type_otherstringnullable

      The type of diabetes, when diabetes_type is Other.

    • diabetic_complicationsstringnullable

      The complications, when there are any.

    • does_user_have_diabetic_complicationsbooleanrequired

      Whether the patient has complications of diabetes.

    • does_user_have_family_history_of_diabetesbooleanrequired

      Whether diabetes runs in the family.

  • general_health_dataHealthProfileGeneralHealthDataOutputnullable

    The latest measurement. null when there is none.

    Show child attributesHide child attributes
    • activity_levelenumrequired

      How active the patient is.

      • Sedentary
      • Light
      • Moderate
      • Active
      • Extractive
    • alcohol_consumption_frequencyenumnullable

      How often the patient drinks alcohol.

      • Never drinks
      • Light (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)required

      When the measurement was taken, in UTC.

    • goalenumrequired

      The health goal.

      • Weight Loss
      • Maintain
      • Muscle Gain
      • Weight Loss and Muscle Gain
      • Managed Condition
    • height_in_cmnumberrequired

      The height in centimeters.

    • managed_conditionenumnullable

      The condition managed, when the goal is Managed Condition.

      • Obesity
      • Heart Disease
      • Diabetes [Weight Loss]
      • Diabetes [Maintain]
      • Diabetes [Muscle Gain]
      • Prediabetes Reversal [Weight Loss]
      • Prediabetes Reversal [Maintain]
      • Prediabetes Reversal [Muscle Gain]
      • Chronic Kidney Disease Stage 1
      • Chronic Kidney Disease Stage 2
      • Chronic Kidney Disease Stage 3
      • Chronic Kidney Disease Stage 4
      • Chronic Kidney Disease Stage 5 [Dialysis]
      • Chronic Kidney Disease Stage 5 [Non-Dialysis]
      • Neuroprotective Diet [Weight Loss]
      • Neuroprotective Diet [Maintain]
      • Neuroprotective Diet [Muscle Gain]
    • sleep_qualityenumnullable

      How well the patient sleeps.

      • Low sleep quality
      • Moderate sleep quality
      • High sleep quality
      • Excellent sleep quality
    • smoking_statusenumnullable

      The smoking status.

      • Non-Smoker
      • Former Smoker
      • Occasional Smoker
      • Regular Smoker
    • stress_levelenumnullable

      How 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_kgnumberrequired

      The weight in kilograms.

  • has_diabetesbooleanrequired

    Whether the patient has diabetes.

  • has_heart_conditionbooleanrequired

    Whether the patient has a heart condition.

  • has_other_diseasesbooleanrequired

    Whether the patient has other diseases.

  • heart_condition_informationHealthProfileHeartConditionOutputnullable

    The heart condition information. null when none was saved.

    Show child attributesHide child attributes
    • additional_informationstringnullable

      Notes about the heart condition.

    • does_user_have_heart_condition_family_historybooleanrequired

      Whether heart conditions run in the family.

    • heart_condition_typeenumrequired

      The type of heart condition.

      • Coronary Artery Disease
      • Heart Failure
      • Hypertension
      • Arrhythmia
      • Other
    • heart_condition_type_otherstringnullable

      The type of heart condition, when heart_condition_type is Other.

  • medicationsarray of HealthProfileMedicationOutput

    The medications the patient takes.

    Show child attributesHide child attributes
    • dosage_amountnumberrequired

      The amount of one dose.

    • dosage_unitenumrequired

      The unit of the dose.

      • g
      • mg
      • mcg
      • IU
      • units
      • tablets
      • ml
      • other
    • dosage_unit_otherstringnullable

      The unit of the dose, when dosage_unit is other.

    • frequencyenumrequired

      How often it is taken.

      • Once daily
      • Twice daily
      • Three times daily
      • Four times daily
      • With meals
      • Before meals
      • After meals
      • At bedtime
      • Every other day
      • As needed
      • Other
    • frequency_otherstringnullable

      How often it is taken, when frequency is Other.

    • medication_namestringrequired

      The name of the medication or supplement.

  • other_diseases_notesstringnullable

    The other diseases of the patient. null when none were saved.

  • supplementsarray of HealthProfileMedicationOutput

    The supplements the patient takes.

    Show child attributesHide child attributes
    • dosage_amountnumberrequired

      The amount of one dose.

    • dosage_unitenumrequired

      The unit of the dose.

      • g
      • mg
      • mcg
      • IU
      • units
      • tablets
      • ml
      • other
    • dosage_unit_otherstringnullable

      The unit of the dose, when dosage_unit is other.

    • frequencyenumrequired

      How often it is taken.

      • Once daily
      • Twice daily
      • Three times daily
      • Four times daily
      • With meals
      • Before meals
      • After meals
      • At bedtime
      • Every other day
      • As needed
      • Other
    • frequency_otherstringnullable

      How often it is taken, when frequency is Other.

    • medication_namestringrequired

      The name of the medication or supplement.

  • updated_atstring (date-time)required

    When the health profile last changed, in UTC.

  • userstring (uuid)required

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

jsonError response
{
  "error": {
    "code": "not_found",
    "message": "The object does not exist.",
    "request_id": "req_0123456789abcdef0123456789abcdef"
  }
}
StatusCodeMeaning
401invalid_api_keyThe API key is missing or not valid.
403company_archivedThis company is archived.
403company_not_liveThe company must be live to use prod keys.
403company_suspendedThis company is suspended.
403connection_scope_not_grantedThe connection does not hold the care.health-profile scope.
403scope_not_grantedThis API key does not have the health-profile:write scope.
404not_foundThe requested resource was not found.
409connection_not_activeThe connection is not active.
409measurement_too_recentThe patient already has a measurement from the last 24 hours. Save the profile without a measurement, or send the next one later.
422measurement_requiredThe first save of a health profile needs a measurement.
422validation_errorbody.biological_sex: Field required
429rate_limitedToo many requests. Wait before calling again.
500internal_errorSomething went wrong on our side. Please try again later.
502upstream_errorA Nurish'd service could not complete the request.
503upstream_unavailableA Nurish'd service is unavailable. Please try again later.
504upstream_timeoutA Nurish'd service did not answer in time. Please try again.

All error codes and what to do about them