Get started
This walkthrough creates an OvokClient and reads Ovok's FHIR capability statement. It confirms that the client can reach the selected API environment before you build an application flow.
1. Install
npm install @ovok/core
The package peers on Medplum's FHIR client and React hooks. If your app uses React hooks, install React as well; see React integration.
2. Create a client
import { OvokClient } from '@ovok/core';
export const ovok = new OvokClient({
baseUrl: 'https://api.sandbox.ovok.com',
fhirUrlPath: '/fhir/R4/',
});
baseUrl is the API origin. fhirUrlPath selects the FHIR endpoint path. The client accepts the standard MedplumClientOptions, plus Ovok-specific options such as socialLoginClientId and offlineQueue; see client configuration.
3. Confirm the backend contract
const capabilityStatement = await ovok.getCapabilityStatement();
const publicEndpoints = await ovok.getPublicApiEndpoints();
The capability statement describes the FHIR operations exposed by the server. getPublicApiEndpoints() extracts Ovok's published non-FHIR endpoints from that statement. Both methods default to FHIR R4 and accept R4 or R5.
Read FHIR resources and operations for the backend API reference. A method may require a backend release that is newer than the SDK package; capability discovery helps you confirm what the selected environment publishes.
4. Continue with an application flow
Choose a flow based on the product you are building:
- Add React hooks for client-rendered UI.
- Save observations for health measurements.
- Add sign-in and read the authentication guide.
- Build against Slim APIs for typed operational views.
The sandbox is for development. Use the production API only after you have configured the production project and verified the matching backend contracts.