API Reference
Full reference for all StoneDock Connect partner endpoints.
Try it interactively — the API Explorer lets you make live calls against the sandbox with your credentials.
Base URL
Production: https://api.onepath.health
Sandbox: https://sandbox.onepath.healthAuthentication
All requests require two headers:
X-API-Key: onepath_production_<your-api-key>
X-Consent-Assertion: <user-consent-jwt>See Authentication for details on generating consent tokens.
API Version
StoneDock uses date-based versioning. Your integration is pinned to the version active at your BAA signing date. Breaking changes always ship under a new version date with at least 6 months notice.
Current stable version: 2026-07-21 · JS SDK 2.6.0 · Python SDK 1.6.0
Endpoints
Users
| Method | Path | Description |
|---|---|---|
POST | /partner/v1/users/onboard | Create a new user record |
PATCH | /partner/v1/users/{id}/health-data | Submit health observations (FHIR R4) |
GET | /partner/v1/users/{id}/health-data | Retrieve all health data on file for a user |
Intelligence
| Method | Path | Description |
|---|---|---|
GET | /partner/v1/users/{id}/insights | Retrieve AI-generated health summary |
GET | /partner/v1/users/{id}/health-score | Retrieve composite health score and domain breakdown |
GET | /partner/v1/users/{id}/health-summary | Retrieve raw FHIR health summary with observations and conditions |
POST | /partner/v1/users/{id}/lab-analysis | Process and extract structured data from a lab document |
POST | /partner/v1/users/{id}/coaching-chat | Send a message to the session-based health coaching AI |
Lab Results
Adding a comment requires the labs.comment scope, separate from labs.read/labs.analyze —
comments are a human provider's clinical note, a materially different capability from AI
reprocessing, and are independently grantable. externalPractitionerId must already be a
registered practitioner (see Practitioners below); the comment is attributed to
that clinician's FHIR Practitioner reference, not a display-only string.
| Method | Path | Description |
|---|---|---|
GET | /partner/v1/users/{id}/lab-results | List all lab results for a user |
GET | /partner/v1/users/{id}/lab-results-page | Retrieve a paginated, filterable view of lab results |
GET | /partner/v1/users/{id}/lab-results/{labId} | Retrieve detailed information and AI analysis for a specific lab result |
POST | /partner/v1/users/{id}/lab-results/{labId}/comments | Add a provider comment to a specific lab result |
Practitioners
Provisions a FHIR Practitioner identity for one of your clinicians, so writes elsewhere in the
API (today: lab comments) can attribute a specific action to a specific person instead of an
opaque display string. Requires practitioners.read/practitioners.write. Registration is
idempotent on externalPractitionerId — registering the same clinician twice returns the
existing record rather than erroring.
| Method | Path | Description |
|---|---|---|
POST | /partner/v1/practitioners | Register a clinician and provision their FHIR Practitioner identity |
GET | /partner/v1/practitioners | List your registered practitioners |
GET | /partner/v1/practitioners/{externalPractitionerId} | Retrieve a single registered practitioner |
Messaging
Store-and-forward compliance record of patient↔provider messages — not a live chat backend. Your own app remains the real-time transport and UI; StoneDock mirrors messages in both directions after the fact, giving them the same HIPAA-grade handling (audit logging, consent gating, Provenance) as messages sent through StoneDock's own core platform. No webhook-push or polling-for-new-messages semantics are provided.
Requires messaging.read/messaging.write, independent of practitioners.read/write — you
still need a registered practitioner (see Practitioners) to send or attribute a
message, but messaging itself is a separate grant so a partner can use one without the other.
externalPractitionerId is only echoed back on reads filtered to one practitioner
(?practitionerId=); an unfiltered list of a patient's messages across every provider cannot
populate that field, since StoneDock never stores a partner's raw practitioner ID, only a one-way
hash of it — the same limitation Practitioners' list endpoint has.
| Method | Path | Description |
|---|---|---|
POST | /partner/v1/users/{id}/messages | Record a message (patient-to-provider or provider-to-patient) |
GET | /partner/v1/users/{id}/messages | List all messages for a user across every provider. ?practitionerId= scopes to one provider's thread |
Care Team
A patient's roster of assigned providers — treating, covering (a provider standing in while
another's care is paused), or supervising. Requires care_team.read/care_team.write.
Names, specialty, and profile photos are never returned — render those from your own provider directory; StoneDock only stores the roster relationship itself.
StoneDock does not check acting_party against this roster on read or write — storing it is the
extent of what this endpoint does. Your own application is the authorization boundary, including
any break-glass access path you support.
externalPractitionerId is only echoed back on the direct response to a call that supplied it
(add/update-status/end are all keyed by it already); the general roster listing and the
provider's-patient-list endpoint below can't recover it, since StoneDock never stores a partner's raw
practitioner (or patient) ID, only a one-way hash of it. fhirPractitionerId/fhirPatientId are
always returned as the fallback — correlate them yourself against the IDs your own earlier calls
returned.
| Method | Path | Description |
|---|---|---|
POST | /partner/v1/users/{id}/care-team | Add a provider to a member's team |
PATCH | /partner/v1/users/{id}/care-team/{practitionerId} | Change a provider's status (active | paused) |
DELETE | /partner/v1/users/{id}/care-team/{practitionerId} | End a provider's assignment (soft — history is kept) |
GET | /partner/v1/users/{id}/care-team | List a member's care team. ?includeEnded=true also returns ended assignments |
GET | /partner/v1/practitioners/{practitionerId}/patients | A provider's patient list — every member with an active assignment to this practitioner |
Visit Notes
Freeform, provider-authored visit notes — a title plus four free-text sections (reason for visit,
history, assessment, plan). Requires visit_notes.read/visit_notes.write.
A note is a draft (docStatus: "preliminary") while being written, and editable via PATCH.
Signing makes it final and immutable — no further edits are accepted (409 note_already_signed). Corrections after signing go through a linked addendum
(POST .../addendum), which is its own note referencing the original, never a silent edit to it.
Every save requires a version (from the note's last create/update/sign/get response) passed back
as expectedVersion, so two concurrent edits to the same draft can't silently overwrite each
other — a stale version returns 409 version_conflict; re-GET the note and reapply your change.
As with Care Team and Messaging, externalPractitionerId is only
echoed back on the direct response to a call that supplied it (create/addendum); fhirPractitionerId
is always returned as the fallback for reads.
| Method | Path | Description |
|---|---|---|
POST | /partner/v1/users/{id}/visit-notes | Create a draft note |
PATCH | /partner/v1/users/{id}/visit-notes/{noteId} | Edit a draft (requires expectedVersion) |
POST | /partner/v1/users/{id}/visit-notes/{noteId}/sign | Sign the note — final and immutable from this point |
POST | /partner/v1/users/{id}/visit-notes/{noteId}/addendum | Add a correction as a linked addendum |
GET | /partner/v1/users/{id}/visit-notes | List a patient's visit notes |
GET | /partner/v1/users/{id}/visit-notes/{noteId} | Retrieve a note's full content, plus any addenda |
Appointments
Mirrors your own scheduling system (or telehealth tool) into StoneDock's FHIR Appointment store —
your app remains the system of record; this is a server-to-server copy for the same HIPAA-grade
handling (audit logging, consent gating, Provenance) everything else on this API gets. Requires
appointments.read/appointments.write and a registered practitioner (see
Practitioners).
Status transitions, reschedules, and detail edits are separate calls rather than one general
PATCH, mirroring how Visit Notes splits editing from signing. Notes are
append-only annotations on the appointment, attributed to a registered practitioner the same way
lab comments are.
| Method | Path | Description |
|---|---|---|
POST | /partner/v1/users/{id}/appointments | Create an appointment (proposed or booked) |
GET | /partner/v1/users/{id}/appointments | List a patient's appointments. Optional ?from=/?to= date range |
GET | /partner/v1/users/{id}/appointments/{appointmentId} | Retrieve a single appointment |
PATCH | /partner/v1/users/{id}/appointments/{appointmentId}/status | Update status (e.g. arrived, fulfilled, cancelled, noshow) |
PATCH | /partner/v1/users/{id}/appointments/{appointmentId}/schedule | Reschedule — update start time and/or duration |
PATCH | /partner/v1/users/{id}/appointments/{appointmentId}/details | Update reason, description, or patient instructions |
POST | /partner/v1/users/{id}/appointments/{appointmentId}/notes | Add a provider note to the appointment |
The schedule and details update endpoints aren't wrapped by either SDK yet — call them directly over HTTP.
Goals
| Method | Path | Description |
|---|---|---|
GET | /partner/v1/users/{id}/goals | List active health goals |
POST | /partner/v1/users/{id}/goals | Create a new goal |
PATCH | /partner/v1/users/{id}/goals/{goalId} | Update goal progress |
PATCH | /partner/v1/users/{id}/goals/{goalId}/progress | Record a progress data point for a goal |
POST | /partner/v1/users/{id}/goals/{goalId}/coaching-chat | Send a coaching chat message in the context of a goal |
Chat
| Method | Path | Description |
|---|---|---|
POST | /partner/v1/users/{id}/chat | Send a message in a user's general chat session |
GET | /partner/v1/users/{id}/chat-history | Retrieve message history for a user's chat session. Optional ?sessionId= filters to a single session |
GET | /partner/v1/users/{id}/chat-sessions | List all chat sessions for a user |
POST | /partner/v1/users/{id}/resource-chat | Send a chat message in the context of a specific resource |
Documents
| Method | Path | Description |
|---|---|---|
GET | /partner/v1/users/{id}/documents | List all documents uploaded for a user |
POST | /partner/v1/documents/{documentId}/analyze | Trigger AI analysis of an uploaded document |
POST | /partner/v1/documents/{documentId}/chat | Send a chat message in the context of a document |
Demographics
| Method | Path | Description |
|---|---|---|
GET | /partner/v1/users/{id}/demographics | Retrieve demographic and vitals data for a user |
PATCH | /partner/v1/users/{id}/demographics | Update demographic and vitals data for a user |
Fitness Plans
| Method | Path | Description |
|---|---|---|
GET | /partner/v1/users/{id}/fitness-plans | List fitness plans for a user |
POST | /partner/v1/users/{id}/fitness-plans | Create a new fitness plan |
PATCH | /partner/v1/users/{id}/fitness-plans/{planId}/status | Update the status of a fitness plan |
POST | /partner/v1/users/{id}/fitness-plans/{planId}/coaching-chat | Send a coaching chat message in the context of a fitness plan |
Product Advisor
| Method | Path | Description |
|---|---|---|
POST | /partner/v1/users/{id}/product-advisor/chat | Send a multi-turn chat message to the product advisor AI |
GET | /partner/v1/users/{id}/product-advisor/sessions | List all product advisor sessions for a user |
DELETE | /partner/v1/users/{id}/product-advisor/sessions/{sessionId} | Close a product advisor session (soft-close — history is retained) |
Usage
| Method | Path | Description |
|---|---|---|
GET | /partner/v1/usage/current | Retrieve current month's API usage for your partner account |
GET | /partner/v1/usage/history | Retrieve historical usage data for your partner account |
Medications
Wellvi medication lifecycle: order/refill creation, refill-due polling, progress check-ins, and
discontinue. Requires the medications.read/medications.write scopes. EHR sync is optional —
pass ehrPracticeConfigId on order creation only if you want that order synced into a practice's
EHR chart (Tebra today, more systems to follow); omit it to manage the order in StoneDock only. See
the medication refill lifecycle guide for the end-to-end flow.
| Method | Path | Description |
|---|---|---|
POST | /partner/v1/users/{id}/medications | Create a medication order, or a refill when renewsOrderReference is set |
GET | /partner/v1/users/{id}/medications | List a patient's medication orders |
GET | /partner/v1/medications/refills-due | List medications across your patient population due for a refill soon. Optional ?withinDays= sets the lookahead window (default 5, capped at 30) |
POST | /partner/v1/users/{id}/medications/{orderId}/progress-checkins | Submit a progress check-in form for a medication order |
GET | /partner/v1/users/{id}/medications/{orderId}/progress-checkins | List progress check-ins submitted for a medication order |
PATCH | /partner/v1/users/{id}/medications/{orderId}/discontinue | Close the loop when a refill did not happen |
Conditions
Requires the conditions.read/conditions.write scopes. If your consent token carries an
acting_party claim (see Authentication), the treating
clinician is recorded as a second agent on the underlying FHIR Provenance record alongside your
organization.
DELETE is a soft delete — the underlying FHIR resource is marked entered-in-error, not
physically removed (StoneDock never hard-deletes clinical data over the partner API), but it
disappears from GET/list immediately and the call is idempotent. PATCH is a partial update:
only the fields you send are changed, and it's the way to progress clinicalStatus (e.g.
active → resolved) without re-sending the whole record. Valid clinicalStatus values:
active, recurrence, relapse, inactive, remission, resolved.
| Method | Path | Description |
|---|---|---|
POST | /partner/v1/users/{id}/conditions | Record a condition for a user |
GET | /partner/v1/users/{id}/conditions | List a patient's conditions |
GET | /partner/v1/users/{id}/conditions/{conditionId} | Retrieve a single condition |
PATCH | /partner/v1/users/{id}/conditions/{conditionId} | Partially update a condition (name, diagnosedDate, notes, clinicalStatus) |
DELETE | /partner/v1/users/{id}/conditions/{conditionId} | Delete a condition (soft delete — see above) |
Allergies
Structural twin of Conditions: full CRUD, a durable partner-supplied identifier for
idempotent create, and soft delete via verificationStatus: entered-in-error rather than physical
removal. Requires allergies.read/allergies.write. assertedByExternalPractitionerId is
optional — omit it and the record is self-asserted by the patient.
Not yet wrapped by either SDK — call these endpoints directly over HTTP.
| Method | Path | Description |
|---|---|---|
POST | /partner/v1/users/{id}/allergies | Record an allergy for a user |
GET | /partner/v1/users/{id}/allergies | List a patient's allergies |
GET | /partner/v1/users/{id}/allergies/{allergyId} | Retrieve a single allergy |
PATCH | /partner/v1/users/{id}/allergies/{allergyId} | Partially update an allergy (substance, severity, reactionType, notes, clinicalStatus) |
DELETE | /partner/v1/users/{id}/allergies/{allergyId} | Delete an allergy (soft delete — see above) |
Authored Notes
Standalone authored free text that isn't tied to a visit — amendment requests, visit-request
reasons, review notes. Separate from Messaging even though both are backed by FHIR
Communication: a message implies a two-party thread, an authored note doesn't. Requires
notes.read/notes.write. externalPractitionerId is optional — omit it and the note is
self-authored by the patient. aboutReference optionally links the note to another FHIR resource
(e.g. a specific order or condition).
Not yet wrapped by either SDK — call these endpoints directly over HTTP.
| Method | Path | Description |
|---|---|---|
POST | /partner/v1/users/{id}/authored-notes | Create an authored note |
GET | /partner/v1/users/{id}/authored-notes | List a patient's authored notes. Optional ?category= filter |
GET | /partner/v1/users/{id}/authored-notes/{noteId} | Retrieve a single authored note |
Questionnaire Responses
General-purpose questionnaire submission that isn't tied to a medication order — see
Medications for the order-scoped progress-checkin equivalent. Requires
questionnaires.read/questionnaires.write. Answers are grouped into one responseGroupId per
submission. Corrections go through PATCH (supersede-and-replace, full history retained, same
pattern as Conditions' soft delete) rather than overwriting prior answers.
Practitioner comments are attributed via a registered Practitioner, same as
lab comments.
Submission and listing are wrapped by both SDKs; amending a response (PATCH) and adding a
comment (POST .../comments) aren't yet — call those two directly over HTTP.
| Method | Path | Description |
|---|---|---|
POST | /partner/v1/users/{id}/questionnaire-responses | Submit a questionnaire response (one or more answers) |
GET | /partner/v1/users/{id}/questionnaire-responses | List a patient's questionnaire responses. Optional ?questionnaireCode= filter |
PATCH | /partner/v1/users/{id}/questionnaire-responses/{responseGroupId} | Amend a prior response — supersedes the corrected answers |
POST | /partner/v1/users/{id}/questionnaire-responses/{responseGroupId}/comments | Add a provider comment to a response |
Error Codes
| Code | Meaning |
|---|---|
401 | Invalid or expired API key or consent token |
403 | Action not permitted for this partner scope |
404 | User not found |
409 | User already onboarded with this externalId |
422 | Validation error — see details in response body |
429 | Rate limit exceeded — see Retry-After header |
5xx | StoneDock server error — safe to retry with exponential backoff |
Rate Limits
| Environment | Limit |
|---|---|
| Sandbox | 1,000 requests/minute |
| Production | 100 requests/minute |
Rate limit headers are included on every response:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 1722768000