# Getting started

> Read appointments, open slots, patients and coverage from practices on Soma Health with a standard FHIR R4 API.

The Soma Health FHIR API gives partner apps standards-based, **read-only** access to a practice's scheduling and registration data: patients, appointments, schedules and open slots, providers, locations, the practice's organization and patients' insurance coverage. It follows **FHIR R4 (4.0.1)** and the **US Core 6.1** profiles where US Core defines one.

## Base URL

Each practice has its own FHIR base URL. Every request in these docs is relative to it:

*Base URL*

```text
https://qa3.somahealth.com/api/fhir/r4/{practice}
```

`{practice}` is the practice's address name in Soma. The practice gives you its exact base URL when it registers your app, and every practice that has the API turned on is listed in the [endpoint directory](/endpoint-directory.md).

## What you can do

| Resource | Read | Search | Profile |
| --- | --- | --- | --- |
| [Patient](/reference/patient.md) | Yes | Yes | US Core Patient |
| [Appointment](/reference/appointment.md) | Yes | Yes | FHIR R4 base |
| [Schedule](/reference/schedule.md) | Yes | Yes | FHIR R4 base |
| [Slot](/reference/slot.md) | Yes | Yes | FHIR R4 base |
| [Practitioner](/reference/practitioner.md) | Yes | Yes | US Core Practitioner |
| [Location](/reference/location.md) | Yes | Yes | US Core Location |
| [Organization](/reference/organization.md) | Yes | Yes | US Core Organization |
| [Coverage](/reference/coverage.md) | Yes | Yes | US Core Coverage |
| [AllergyIntolerance](/reference/allergyintolerance.md) | Yes | Yes | US Core Allergyintolerance |
| [CarePlan](/reference/careplan.md) | Yes | Yes | US Core Careplan |
| [CareTeam](/reference/careteam.md) | Yes | Yes | US Core Careteam |
| [Condition](/reference/condition.md) | Yes | Yes | US Core Condition Problems Health Concerns |
| [Device](/reference/device.md) | Yes | Yes | US Core Implantable Device |
| [DiagnosticReport](/reference/diagnosticreport.md) | Yes | Yes | US Core Diagnosticreport Lab |
| [DocumentReference](/reference/documentreference.md) | Yes | Yes | US Core Documentreference |
| [Encounter](/reference/encounter.md) | Yes | Yes | US Core Encounter |
| [Goal](/reference/goal.md) | Yes | Yes | US Core Goal |
| [Immunization](/reference/immunization.md) | Yes | Yes | US Core Immunization |
| [Medication](/reference/medication.md) | Yes | Yes | US Core Medication |
| [MedicationRequest](/reference/medicationrequest.md) | Yes | Yes | US Core Medicationrequest |
| [Observation](/reference/observation.md) | Yes | Yes | US Core Smokingstatus |
| [PractitionerRole](/reference/practitionerrole.md) | Yes | Yes | US Core Practitionerrole |
| [Procedure](/reference/procedure.md) | Yes | Yes | US Core Procedure |
| [Provenance](/reference/provenance.md) | Yes | Yes | US Core Provenance |
| [QuestionnaireResponse](/reference/questionnaireresponse.md) | Yes | Yes | US Core Questionnaireresponse |
| [RelatedPerson](/reference/relatedperson.md) | Yes | Yes | US Core Relatedperson |
| [ServiceRequest](/reference/servicerequest.md) | Yes | Yes | US Core Servicerequest |
| [Specimen](/reference/specimen.md) | Yes | Yes | US Core Specimen |

The API is read-only: there's no create, update or delete. Writing data (for example booking appointments) will come in a later release; see the [changelog](/changelog.md).

## How access works

A practice decides which apps can read its data. There's no self-service sign-up and no shared key:

- **You create a key pair** (RS384 or ES384) and keep the private key. You share only the public key, as a PEM file or a JWKS.
- **The practice registers your app** in Soma under **Settings › Integrations › FHIR API**: it pastes your public key, chooses which resources you may read, and can limit you to certain locations and providers.
- **The practice gives you your client ID** and its base URL. Each practice that uses your app registers it separately and gives you its own client ID.
- **Your app signs in** with [SMART Backend Services](/authentication.md) and gets a 5-minute access token.
- **The practice stays in control.** It can pause or remove your access at any time, and it can see every request your app makes.

## Testing

> **Note:** There's no public sandbox yet. You test against a practice once it has registered your app, usually with a small number of test patients the practice sets up. For partnership questions, write to [support@somahealth.com](mailto:support@somahealth.com).

## Your first request

Check that a practice's API is reachable. The capability statement needs no sign-in:

*Request*

```bash
curl https://qa3.somahealth.com/api/fhir/r4/your-practice/metadata \
  -H "Accept: application/fhir+json"
```

Then [get an access token](/authentication.md) and search, for example, a day's appointments:

*Request*

```bash
curl "https://qa3.somahealth.com/api/fhir/r4/your-practice/Appointment?date=2026-12-14&_include=Appointment:patient" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/fhir+json"
```

## Terms of use

Using the API means you accept the [Soma Health FHIR API terms of use](https://developers.somahealth.com/terms#terms). In short: use only the data the practice authorized, for the purpose it authorized, keep it secure, and don't resell it. See [Terms and support](/terms.md).

---
Last updated 2026-12-04 · Soma Health FHIR API
