A complete walkthrough: from an installed service to writing step data and nudging the patient — the exact shape a “Fitbit connector” takes on OmniHealth.
Make sure you’re an approved developer, then in your workspace:
your.service.id below — copy your real one from the workspace.system/Observation.write and system/Notification.write. Save the client_id and client_secret.service.enabled and service.disabled. Save the signing secret.When a patient turns your tool on in their health journal, we call your webhook:
POST https://your-app.example.com/webhook
X-OmniHealth-Event: service.enabled
X-OmniHealth-Signature: t=1784…,v1=9f2c…
{ "event":"service.enabled", "service_id":"your.service.id",
"service":"Step Counter", "data":{"patient_id":123},
"created_at":"2026-07-24T09:00:00Z" }
Verify the signature (see the guide), then remember patient_id 123 — you may now write their data. Kick off your first Fitbit sync for them.
curl -X POST https://omnihealth.solutions/fhir/token \
-d grant_type=client_credentials \
-d client_id=$CLIENT_ID -d client_secret=$CLIENT_SECRET \
-d scope="system/Observation.write system/Notification.write"
# → { "access_token":"oht_…", "expires_in":3600, … }
curl -X POST https://omnihealth.solutions/fhir/Observation \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/fhir+json" \
-d '{
"resourceType":"Observation",
"status":"final",
"code":{"coding":[{"code":"your.service.id"}]},
"subject":{"reference":"Patient/123"},
"effectiveDateTime":"2026-07-24T23:00:00Z",
"component":[{"code":{"text":"steps"},"valueQuantity":{"value":10432}}]
}'
# → 201 Created, Location: /fhir/Observation/psd-…
Use effectiveDateTime for the day the steps were counted, so the data lands with the right timestamp even if you upload it later.
Hit a goal? Nudge the patient through the platform’s own notifications:
curl -X POST "https://omnihealth.solutions/fhir/$notify-patient" \
-H "Authorization: Bearer $TOKEN" \
-d '{"service_id":"your.service.id","patient_id":123,
"title":"Goal reached 🎉","body":"You hit 10,000 steps today!",
"link":"/health-river"}'
If the patient disables your service you’ll get a service.disabled webhook. Stop syncing, and don’t retain their data beyond what your terms allow. That’s the whole lifecycle.