Skip to main content
GET
/
v1
/
patients
/
{patient_id}
import olira

olira.init(api_key="YOUR_API_KEY")
patient = olira.get_patient(patient_id="8a4fde23-0f1b-4c2a-9d7e-b36c1a5f0e82")
print(patient.status)
Patient(
    id="8a4fde23-0f1b-4c2a-9d7e-b36c1a5f0e82",
    first_name="Ada",
    last_name="Lovelace",
    email="ada@example.com",
    sex="unknown",
    timezone="UTC",
    status="active",
    phone_number=None,
    date_of_birth=None,
    created_at="2026-01-10T08:00:00Z",
    external_identifiers=[],
    metadata=None,
)
olira.get_patient(patient_id: str) -> Patient
Requires scope: api:manage-patients

Parameters

patient_id
str
required
Olira patient id.

Returns

Patient
id
str
Olira patient id.
first_name
str | None
Given name.
last_name
str | None
Family name.
sex
str | None
Sex/gender.
timezone
str
IANA timezone.
status
str
Status.
email
str | None
Email.
phone_number
str | None
Phone.
date_of_birth
str | None
DOB.
created_at
str | None
Created at.
external_identifiers
list[ExternalIdentifier]
External ids.
metadata
dict[str, Any] | None
Metadata.

Raises

ExceptionWhen
AuthErrorHTTP 401 or 403 — invalid API key or insufficient OAuth scope for this endpoint.
ValidationErrorHTTP 400, 404, or 422 — malformed JSON, unknown patient, or validation failure (message includes response excerpt).
ServerErrorHTTP 409 (e.g. conflicting external identifier) or repeated 5xx after retries; includes status_code when applicable.
RateLimitErrorHTTP 429 — rate limited; check retry_after (seconds).
NetworkErrorConnection timeout, DNS failure, or read error after retries.
import olira

olira.init(api_key="YOUR_API_KEY")
patient = olira.get_patient(patient_id="8a4fde23-0f1b-4c2a-9d7e-b36c1a5f0e82")
print(patient.status)
Patient(
    id="8a4fde23-0f1b-4c2a-9d7e-b36c1a5f0e82",
    first_name="Ada",
    last_name="Lovelace",
    email="ada@example.com",
    sex="unknown",
    timezone="UTC",
    status="active",
    phone_number=None,
    date_of_birth=None,
    created_at="2026-01-10T08:00:00Z",
    external_identifiers=[],
    metadata=None,
)