Create a Patient
Create a patient. By default, if a patient with the same email already exists, they will be updated (upsert behavior). Set mode to “create” to return an error instead.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”object
The preferred language of the patient
Custom field values keyed by the custom field alias. See listCustomFields for the available fields and their types.
Only the fields provided are changed. Set a field to null to remove its value. Empty TEXT values are rejected.
An unknown alias or invalid value rejects the whole request and nothing is saved.
Custom fields cannot be set when the email matches an archived patient.
When set to “create”, returns an error if a patient with the same email exists. When set to “upsert” (default), updates the existing patient.
Responses
Section titled “Responses”The created Patient
object
object
Unique identifier for the given patient.
The ID of the Business this resource belongs to.
Time when the resource was created (ISO 8601 format).
Time when the resource was created (ISO 8601 format).
Time when the resource was archived (ISO 8601 format).
Reason for archiving the patient.
The email address of the patient.
The full legal name of the patient.
The mobile phone number of the patient.
The gender of the patient
Timezone string.
The preferred language of the patient
The date of birth of the patient (YYYY-MM-DD)
The height of the patient in centimeters
The weight of the patient in kilograms
The activity level of the patient
The total cholesterol level of the patient
The HDL cholesterol level of the patient
The LDL cholesterol level of the patient
The chronic medication status of the patient
The diabetes status of the patient
The hypertension treatment status of the patient
The race/ethnicity of the patient
The smoking status of the patient
The waist circumference of the patient in centimeters
The neck circumference of the patient in centimeters
The hip circumference of the patient in centimeters
The family diabetes history of the patient
The parental hypertension history of the patient
Whether the patient has a history of high glucose
Whether the patient has a history of hypertension
Whether the patient consumes vegetables and fruits daily
The fasting glucose level of the patient
The triglyceride level of the patient
Arbitrary string key/value pairs attached to the patient. Up to 10 keys; each key up to 40 characters and each value up to 500 characters. Always present; an empty object when none are set.
object
Example
{ "data": { "biologicalSex": "FEMALE", "timezone": "UTC", "preferredLanguage": "en", "activityLevel": "inactive", "chronicMedicationStatus": "none", "diabetesStatus": "none", "hypertensionTreatment": "notNeeded", "smokingStatus": "never", "familyDiabetesHistory": "none", "parentalHypertensionHistory": "none" }}The patient could not be created.
object
object
The specific error that occurred.
Human-readable description of the error.
Example
{ "error": { "code": 400, "type": "BadRequestError", "title": "Unknown custom field \"foo\". Must be one of [memberId, plan]" }}The API key is missing or invalid, or the Business cannot be accessed with it.
object
object
The specific error that occurred.
Human-readable description of the error.
Example
{ "error": { "code": 403, "type": "UnauthorizedError", "title": "Invalid API token" }}The Business does not exist.
object
object
The specific error that occurred.
Human-readable description of the error.
Example
{ "error": { "code": 404, "type": "BusinessNotFoundError", "title": "Business not found" }}A patient with this email already exists (when mode is “create”).
object
object
The specific error that occurred.
Human-readable description of the error.
Example
{ "error": { "code": 409, "type": "PatientEmailExistsError", "title": "A patient with this email already exists" }}