Skip to main content

Patient Demographics

This endpoint returns the demographic information HealthEx has on file for a patient — name, date of birth, gender, contact details, mailing address, and the identifier your organization assigned the patient.

The endpoint is project-scoped: the externalId returned is the one your organization assigned this patient in the given project.

Making the API Call

GET https://api.healthex.io/v1/projects/{projectId}/patients/{patientId}/demographics
Accept: application/json
Authorization: Bearer <token>

Required Path Parameters

  • projectId: The HealthEx project id. The patient must be enrolled in this project.
  • patientId: The HealthEx patient id.

Response Format

A successful request returns 200 with a JSON body shaped as:

{
"patientId": "17d4513f-73e8-4b2a-9c1d-5e6f7a8b9c0d",
"firstName": "Jane",
"lastName": "Doe",
"dateOfBirth": "1985-04-12",
"gender": "female",
"email": "jane.doe@example.com",
"phone": "+15551234567",
"externalId": "PARTNER-PT-00042",
"addressLines": ["123 Main St", "Apt 4B"],
"city": "San Francisco",
"district": "San Francisco County",
"state": "CA",
"postalCode": "94110",
"country": "US"
}

Response Fields

note

All fields except patientId are nullable — a given patient may not have every field populated.

FieldDescription
patientIdThe HealthEx patient id (always present).
firstNameThe patient's first name.
lastNameThe patient's last name.
dateOfBirthISO 8601 date string in YYYY-MM-DD format.
genderThe patient's gender. Typical values: male, female, other, unknown.
emailThe patient's current primary email address.
phoneThe patient's current primary phone number in E.164 format.
externalIdThe identifier your organization assigned this patient in this project.
addressLinesAn ordered array of street address lines (street, unit, building, c/o). Empty array when no address is on file.
cityCity or locality.
districtSecond-level administrative division — county in the US, equivalent term internationally.
stateFirst-level administrative division — US state, region, province, etc.
postalCodeZIP / postcode.
countryISO country code.

Error Responses

Response CodeReason
401 UnauthorizedThe token is missing, invalid, or expired.
403 ForbiddenThe caller is not authorized to access this patient's demographics in this project.
404 Not FoundNo active patient exists for the given patientId in the given projectId.

See Also