The Ovok client
Use the @ovok/core package root for Node, browsers and React Native.
- Stable unknown
- Release candidate since 0.4.49-rc.2
- Development since 0.4.49-dev.501+330a19b
@ovok/core exports the current Ovok client. The @ovok/core/next entry remains available for existing imports. Both entries use the same client and talk to the Ovok API directly in Node, browsers and React Native.
This client is also the contract the Java and Python SDKs follow, so the same API names are available in each language's idiom.
Create a client
import { Ovok } from '@ovok/core';
const ovok = new Ovok({
baseUrl: 'https://api.sandbox.ovok.com',
tenantCode: 'your-tenant',
});Options such as storage, timeoutMs and onUnauthenticated are described in Configure the client. A bad option throws OvokConfigError from the constructor, not from the first request.
Namespaces
Each area of the Ovok API has its own namespace, and each has a guide page:
- ovok.auth and ovok.session: sign-in, registration, passwords, saved accounts and session changes. See also Sign users in.
- ovok.fhir and ovok.realtime: FHIR reads, searches and writes, and websocket subscriptions.
- ovok.patient: the signed-in patient's appointments, care plans, questionnaires, devices and dashboard.
- ovok.measurements: saving and reading measurements, with the offline queue.
- ovok.questionnaires and ovok.questionnaireResponses:
$populate, submit and$extract. - ovok.slim: the care-home dashboard API.
- ovok.signals: Signals enablement, undeliverable residents and the Signals gateway.
- ovok.projects, ovok.accounts and ovok.locales and ovok.localizations.
- ovok.cms and ovok.content.
- ovok.consent, ovok.invites and ovok.sharing.
- ovok.documents, ovok.videoCalls, ovok.ai, ovok.wearables, ovok.email, ovok.bots and ovok.health.
Methods follow Stripe's verbs: list, retrieve, create, update (PUT), patch, delete, and plain verbs such as acknowledge, accept or revoke.
Paging and request options
- Paging: lists the server pages return a
PagePromise. Await it for the first page, orfor awaitover it for every item. - Request options: every method takes
{ signal, timeoutMs }as its last argument. - Errors: every failure is an
OvokError; see Errors and retries.
Runtimes
- Bundlers, React Native and Node: import from
@ovok/core. - Existing imports:
@ovok/core/nextremains an alias for the same client. - Deep imports: existing
@ovok/core/dist/*imports remain available. - React Native: use
@ovok/native/next, which supplies device storage and thecrypto.getRandomValuespolyfill that sign-in needs. - Node: version 22 or later.
Reference
Last updated on