Export Cohort Patients
Export-shaped page of a cohort’s membership.
Resolved server-side from filter_criteria so both cohort kinds (dynamic
filters and custom lists) export the exact membership the cohort resolves to
— the patient table can’t express a custom list. Paged (not one dump) because
production cohorts run to thousands of patients. Ignores query_params.sort_by
— export paging always uses the stable name/id order below, since re-sorting
a wide PII export isn’t a feature this endpoint offers.
Headers
The tenant you are making this request on behalf of
Your api key
Path Parameters
Query Parameters
asc, desc Filter by patient tag IDs
Exclude patients with ANY of these tag IDs
Match mode for tag_ids: 'any' (has ANY) or 'all' (has ALL). Default: 'all'
any, all Filter by primary location IDs
Exclude patients at these location IDs
Filter by lead source
Exclude patients with these lead sources
Filter by combined SMS opt-out status ('true' or 'false')
Filter by scheduling blacklist status ('true' or 'false')
Filter by SMS marketing opt-in status ('true', 'false', or 'not_set')
Filter by email marketing opt-in status ('true', 'false', or 'not_set')
Filter by social media consent status ('true' or 'false')
Filter by appointment count [min, max], null = unbounded
Filter by days since last appointment [min, max], null = unbounded
Scope the 'time since last appointment' recency to these service IDs. Omit to measure recency across all appointments.
Filter by visit span in days (last appointment − first appointment) [min, max], null = unbounded
Filter by total spent in cents [min, max], null = unbounded
Filter by active membership IDs
Exclude patients with these active memberships
Match mode for membership_ids: 'any' or 'all'. Default: 'any'
any, all Window [start, end] in which a membership enrollment must have STARTED (member.start_date), in any status. Narrowed to specific memberships when enrolled_membership_ids is set.
Membership IDs the patient must have enrolled in within enrolled_membership_date_range. Omit to match an enrollment in any membership in the window.
Year-agnostic enrollment anniversary: ['--MM-DD', '--MM-DD'] month/day range matching member.start_date in ANY year and ANY status.
Membership IDs the anniversary must belong to. Omit to match an enrollment anniversary in any membership.
Filter by active package IDs
Exclude patients with these active packages
Match mode for package_ids: 'any' or 'all'. Default: 'any'
any, all Filter by service IDs from completed appointments
Exclude patients who completed these appointment types
Match mode for appointment_type_ids: 'any' or 'all'. Default: 'any'
any, all Filter by appointment date range [start, end]
Restrict appointment_date_range to appointments for these service IDs. Omit to match any appointment in the window.
Appointment statuses that count inside appointment_date_range. Omit both this and appointment_statuses_exclude to count every status except CANCELLED.
PENDING, RESERVED, CONFIRMED, CANCELLED, COMPLETED, OVERRIDABLE, NO_SHOW Appointment statuses that do NOT count inside appointment_date_range. ANDs with appointment_statuses when both are set; omitting both excludes CANCELLED only.
PENDING, RESERVED, CONFIRMED, CANCELLED, COMPLETED, OVERRIDABLE, NO_SHOW Service IDs that must have been COMPLETED within completed_appointment_date_range. Omit to match any completed appointment in the window.
Window [start, end] in which an appointment must have been COMPLETED. Narrowed to specific services when completed_appointment_service_ids is set.
Service IDs that must have been BOOKED within created_appointment_date_range. Omit to match any appointment booked in the window.
Window [start, end] in which an appointment must have been BOOKED (created), keyed on the appointment's creation timestamp rather than its scheduled date. Narrowed to specific services when created_appointment_service_ids is set.
Restrict no_appointment_date_range to appointments for these service IDs. Omit to match any appointment in the window.
Patients with NO non-cancelled appointment (optionally for no_appointment_service_ids) in this date range [start, end]
Filter by latest weight in lbs [min, max], null = unbounded
Filter by gender values
Exclude patients with these genders
Filter by patient source
Exclude patients from these sources
Filter by preferred provider IDs
Exclude patients with these preferred providers
Filter by provider IDs from most recent completed appointment
Exclude patients whose most recent completed appointment was with these providers
Filter by credit balance in cents [min, max]
Hide patients that are thin comms identities for open opportunities (default: True)
Filter by days since last active [min, max]
Filter by email opt-out status ('true' or 'false')
Filter by current age in years [min, max], null = unbounded
Filter by latest height in inches [min, max], null = unbounded
Filter by goal weight in lbs [min, max], null = unbounded
Filter by latest systolic BP in mmHg [min, max], null = unbounded
Filter by latest diastolic BP in mmHg [min, max], null = unbounded
Filter by latest waist circumference in inches [min, max], null = unbounded
Filter by latest pulse in BPM [min, max], null = unbounded
Filter by latest temperature in °F [min, max], null = unbounded
Filter by profile picture presence ('true' or 'false')
Filter by pronouns text
Filter by preferred name text
Filter by surcharge disabled status ('true' or 'false')
Filter by note presence ('true' or 'false')
Filter by active chat presence ('true' or 'false')
Filter by active medication count [min, max], null = unbounded
Filter by email presence ('true' or 'false')
Filter by phone number presence ('true' or 'false')
Filter by active, frozen, or delinquent membership presence ('true' or 'false')
Filter by tag presence ('true' or 'false')
Filter by future appointment presence ('true' or 'false')
Filter by cancelled appointment date range [start, end]
Days since last cancelled appointment [min, max], null = unbounded
Status of patient's most recent appointment
Filter by outstanding balance in cents [min, max]
Filter by days since oldest outstanding charge [min, max]
Filter by purchased item IDs from charges
Exclude patients who purchased these items
Match mode for purchased_item_ids: 'any' or 'all'. Default: 'any'
any, all Filter by payment plan presence ('true' or 'false')
Filter by days since last successful payment [min, max]
Status of patient's most recent payment
Status of a Payment or Refund.
NOTE for any "cash collected / refunded" or settlement-style query:
both SUCCEEDED AND PROCESSING count as money committed. SUCCEEDED
means cleared in the bank account; PROCESSING means the transaction is
in flight (e.g. ACH still settling) but the clinic should expect it. Most
accounting / analytics aggregates that filter only on status == SUCCEEDED
silently undercount real cash flow — use status IN (SUCCEEDED, PROCESSING)
unless you specifically want only fully-cleared funds.
Use COMMITTED_PAYMENT_STATUSES below for the common case.
CANCELED, CREATED, FAILED, IN_REVIEW, PRESENTING, PROCESSING, SUCCEEDED Exclude patients whose last payment status matches
Status of a Payment or Refund.
NOTE for any "cash collected / refunded" or settlement-style query:
both SUCCEEDED AND PROCESSING count as money committed. SUCCEEDED
means cleared in the bank account; PROCESSING means the transaction is
in flight (e.g. ACH still settling) but the clinic should expect it. Most
accounting / analytics aggregates that filter only on status == SUCCEEDED
silently undercount real cash flow — use status IN (SUCCEEDED, PROCESSING)
unless you specifically want only fully-cleared funds.
Use COMMITTED_PAYMENT_STATUSES below for the common case.
CANCELED, CREATED, FAILED, IN_REVIEW, PRESENTING, PROCESSING, SUCCEEDED Filter by saved payment method presence ('true' or 'false')
Filter by membership status values
ACTIVE, EXPIRED, CANCELLED, DELINQUENT, FROZEN, INACTIVE, PENDING, AWAITING_FORM, SWITCHED Exclude patients with memberships in these statuses
ACTIVE, EXPIRED, CANCELLED, DELINQUENT, FROZEN, INACTIVE, PENDING, AWAITING_FORM, SWITCHED Narrow membership_statuses / membership_statuses_exclude to these memberships. Omit to match a membership in those statuses regardless of plan.
Filter by patients who hold a currently-redeemable discount of these source types (e.g. MEMBERSHIP, PACKAGE, PROMOTION)
GLOBAL, CUSTOM, MEMBERSHIP, PACKAGE, SAVED_ITEM, PROMOTION, CASH_DISCOUNT Exclude patients who hold a currently-redeemable discount of these source types
GLOBAL, CUSTOM, MEMBERSHIP, PACKAGE, SAVED_ITEM, PROMOTION, CASH_DISCOUNT Filter by patients who hold a currently-redeemable discount from these discount templates
Exclude patients who hold a currently-redeemable discount from these discount templates
Match mode for discount_template_ids: 'any' or 'all'. Default: 'any'
any, all Filter by patients who hold a currently-redeemable discount targeting these items (e.g. a Nutrition consult included in their package/membership)
Exclude patients who hold a currently-redeemable discount targeting these items
Match mode for discount_benefit_item_ids: 'any' or 'all'. Default: 'any'
any, all 
