Skip to content

Scopes

Scopes are the capabilities a token carries. Each resource requires a specific scope; a request without it returns 403. Scopes map 1:1 onto the same capability engine that authorizes every action in MedFlo.

There are 24 scopes across five domains. Most are read scopes (<domain>.read); a small number of ingest / management scopes carry .write or .manage. Request only what your integration needs — the app-registration flow lets you pick the exact set.

Scope catalog

Patient, census & facility structure

ScopeGrants
residents.readRead resident demographics/identifiers (FHIR Patient).
census.readRead ADT records + bed availability (census).
facilities.readRead facilities, units, floors, rooms, beds.
practitioners.readRead practitioners/providers (FHIR Practitioner).
users.readRead the caller's user info.

Coverage & clinical

ScopeGrants
coverage.readRead payer coverage/eligibility (FHIR Coverage).
clinical.readRead clinical resources (conditions, meds, allergies, immunizations, observations).
diagnostics.readRead diagnostic reports / lab & radiology results (FHIR DiagnosticReport).
careplans.readRead care plans, kardexes, focuses (FHIR CarePlan).
notes.readRead progress / encounter notes.
assessments.readRead assessments, templates, and HIPPS codes.
adl.readRead activities-of-daily-living + ADL score.
therapy.readRead therapy tracks/minutes.
nutrition.readRead nutrition and supplement orders.
consents.readRead advance-directive and privacy consents.
contacts.readRead patient contacts.
incidents.readRead incidents.
calendar.readRead calendar events and occurrences.
episodes.readRead care periods / episodes of care.

Financial

ScopeGrants
financial.readRead daily balance, statements, journal-entries summary.
charges.writePost ancillary charge batches (ingest).
payments.writePost private-cash payment imports (ingest).

Integration plane

ScopeGrants
webhooks.manageCreate/manage signed event subscriptions.
apps.manageRegister/publish apps, grant scopes, toggle org/facility enablement.

Discover scopes at runtime

The catalog is also available programmatically:
bash
curl -s 'https://medflo-pcc-vendor-api-eez5kqwsxa-uw.a.run.app/api/v1/oauth/scopes'

Requesting scopes

Pass a space-delimited scope when you request a token. The token is narrowed to the intersection of what you ask for and what your client was granted — never a superset. If you request a scope your client doesn't hold, the token endpoint returns 400 invalid_scope (it fails loudly rather than silently dropping it).

Omit scope entirely to receive all scopes your client holds.

Least privilege

Request only the scopes a given integration needs. A read-only analytics consumer should request residents.read coverage.read and nothing else; an event consumer that manages subscriptions needs webhooks.manage.

Scope ≠ tenancy

Holding residents.read lets you read residents within your own tenant only. Which org and facilities you can reach is a separate check — see Tenancy & scoping.