Skip to Content
StoneDock Connect
StoneDock Connect
StoneDock Connect Documentation
API Reference
API Reference

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.health

Authentication

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

MethodPathDescription
POST/partner/v1/users/onboardCreate a new user record
PATCH/partner/v1/users/{id}/health-dataSubmit health observations (FHIR R4)
GET/partner/v1/users/{id}/health-dataRetrieve all health data on file for a user

Intelligence

MethodPathDescription
GET/partner/v1/users/{id}/insightsRetrieve AI-generated health summary
GET/partner/v1/users/{id}/health-scoreRetrieve composite health score and domain breakdown
GET/partner/v1/users/{id}/health-summaryRetrieve raw FHIR health summary with observations and conditions
POST/partner/v1/users/{id}/lab-analysisProcess and extract structured data from a lab document
POST/partner/v1/users/{id}/coaching-chatSend 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.

MethodPathDescription
GET/partner/v1/users/{id}/lab-resultsList all lab results for a user
GET/partner/v1/users/{id}/lab-results-pageRetrieve 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}/commentsAdd 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.

MethodPathDescription
POST/partner/v1/practitionersRegister a clinician and provision their FHIR Practitioner identity
GET/partner/v1/practitionersList 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.

MethodPathDescription
POST/partner/v1/users/{id}/messagesRecord a message (patient-to-provider or provider-to-patient)
GET/partner/v1/users/{id}/messagesList 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.

MethodPathDescription
POST/partner/v1/users/{id}/care-teamAdd 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-teamList a member's care team. ?includeEnded=true also returns ended assignments
GET/partner/v1/practitioners/{practitionerId}/patientsA 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.

MethodPathDescription
POST/partner/v1/users/{id}/visit-notesCreate a draft note
PATCH/partner/v1/users/{id}/visit-notes/{noteId}Edit a draft (requires expectedVersion)
POST/partner/v1/users/{id}/visit-notes/{noteId}/signSign the note — final and immutable from this point
POST/partner/v1/users/{id}/visit-notes/{noteId}/addendumAdd a correction as a linked addendum
GET/partner/v1/users/{id}/visit-notesList 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.

MethodPathDescription
POST/partner/v1/users/{id}/appointmentsCreate an appointment (proposed or booked)
GET/partner/v1/users/{id}/appointmentsList 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}/statusUpdate status (e.g. arrived, fulfilled, cancelled, noshow)
PATCH/partner/v1/users/{id}/appointments/{appointmentId}/scheduleReschedule — update start time and/or duration
PATCH/partner/v1/users/{id}/appointments/{appointmentId}/detailsUpdate reason, description, or patient instructions
POST/partner/v1/users/{id}/appointments/{appointmentId}/notesAdd 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

MethodPathDescription
GET/partner/v1/users/{id}/goalsList active health goals
POST/partner/v1/users/{id}/goalsCreate a new goal
PATCH/partner/v1/users/{id}/goals/{goalId}Update goal progress
PATCH/partner/v1/users/{id}/goals/{goalId}/progressRecord a progress data point for a goal
POST/partner/v1/users/{id}/goals/{goalId}/coaching-chatSend a coaching chat message in the context of a goal

Chat

MethodPathDescription
POST/partner/v1/users/{id}/chatSend a message in a user's general chat session
GET/partner/v1/users/{id}/chat-historyRetrieve message history for a user's chat session. Optional ?sessionId= filters to a single session
GET/partner/v1/users/{id}/chat-sessionsList all chat sessions for a user
POST/partner/v1/users/{id}/resource-chatSend a chat message in the context of a specific resource

Documents

MethodPathDescription
GET/partner/v1/users/{id}/documentsList all documents uploaded for a user
POST/partner/v1/documents/{documentId}/analyzeTrigger AI analysis of an uploaded document
POST/partner/v1/documents/{documentId}/chatSend a chat message in the context of a document

Demographics

MethodPathDescription
GET/partner/v1/users/{id}/demographicsRetrieve demographic and vitals data for a user
PATCH/partner/v1/users/{id}/demographicsUpdate demographic and vitals data for a user

Fitness Plans

MethodPathDescription
GET/partner/v1/users/{id}/fitness-plansList fitness plans for a user
POST/partner/v1/users/{id}/fitness-plansCreate a new fitness plan
PATCH/partner/v1/users/{id}/fitness-plans/{planId}/statusUpdate the status of a fitness plan
POST/partner/v1/users/{id}/fitness-plans/{planId}/coaching-chatSend a coaching chat message in the context of a fitness plan

Product Advisor

MethodPathDescription
POST/partner/v1/users/{id}/product-advisor/chatSend a multi-turn chat message to the product advisor AI
GET/partner/v1/users/{id}/product-advisor/sessionsList 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

MethodPathDescription
GET/partner/v1/usage/currentRetrieve current month's API usage for your partner account
GET/partner/v1/usage/historyRetrieve 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.

MethodPathDescription
POST/partner/v1/users/{id}/medicationsCreate a medication order, or a refill when renewsOrderReference is set
GET/partner/v1/users/{id}/medicationsList a patient's medication orders
GET/partner/v1/medications/refills-dueList 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-checkinsSubmit a progress check-in form for a medication order
GET/partner/v1/users/{id}/medications/{orderId}/progress-checkinsList progress check-ins submitted for a medication order
PATCH/partner/v1/users/{id}/medications/{orderId}/discontinueClose 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.

MethodPathDescription
POST/partner/v1/users/{id}/conditionsRecord a condition for a user
GET/partner/v1/users/{id}/conditionsList 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.

MethodPathDescription
POST/partner/v1/users/{id}/allergiesRecord an allergy for a user
GET/partner/v1/users/{id}/allergiesList 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.

MethodPathDescription
POST/partner/v1/users/{id}/authored-notesCreate an authored note
GET/partner/v1/users/{id}/authored-notesList 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.

MethodPathDescription
POST/partner/v1/users/{id}/questionnaire-responsesSubmit a questionnaire response (one or more answers)
GET/partner/v1/users/{id}/questionnaire-responsesList 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}/commentsAdd a provider comment to a response

Error Codes

CodeMeaning
401Invalid or expired API key or consent token
403Action not permitted for this partner scope
404User not found
409User already onboarded with this externalId
422Validation error — see details in response body
429Rate limit exceeded — see Retry-After header
5xxStoneDock server error — safe to retry with exponential backoff

Rate Limits

EnvironmentLimit
Sandbox1,000 requests/minute
Production100 requests/minute

Rate limit headers are included on every response:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 1722768000

Going Live

Checklist before your first production deployment.

Webhooks

Receive real-time notifications when StoneDock events occur.

On this page

Base URLAuthenticationAPI VersionEndpointsUsersIntelligenceLab ResultsPractitionersMessagingCare TeamVisit NotesAppointmentsGoalsChatDocumentsDemographicsFitness PlansProduct AdvisorUsageMedicationsConditionsAllergiesAuthored NotesQuestionnaire ResponsesError CodesRate Limits