Wearables

Remove a wearable provider

  • Sandbox: available
  • Staging: available
  • Production: unknown
DELETE
/v1/wearables/providers/{provider}

Removes your project's credentials for a wearable provider.

Auth: bearer token of a project admin. Scope: the caller's project (from the token).

Behaviour

  • Patients can no longer connect the provider.
  • Patients already connected keep their connection until they disconnect it.
  • For Polar, ovok also deletes the client's webhook at Polar when it points at this project's webhookUrl; a webhook pointing anywhere else is left alone. Should that fail, the credentials are removed all the same.
  • A provider not set up answers 404 PROVIDER_NOT_CONFIGURED.

Example

curl -X DELETE 'https://api.sandbox.ovok.com/v1/wearables/providers/oura' \  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'

Authorization

bearer
headerAuthorizationBearer <JWT>

Path Parameters

provider*string
Value in"oura""whoop""strava""withings""polar""suunto""garmin""ultrahuman"

Response Body

The credentials are gone; patients can no longer connect it.

Example Request
curl -X DELETE 'https://api.sandbox.ovok.com/v1/wearables/providers/oura'
Example Response
Empty

Change a wearable provider PATCH

Changes a wearable provider your project has already set up: its client ID, its secret, Suunto's subscription key or notification secret, or whether patients may connect it. **Auth:** bearer token of a project admin. **Scope:** the caller's project (from the token). ## Behaviour - Send at least one of `clientId`, `secret`, `subscriptionKey`, `webhookSecret` and `enabled`. Fields you leave out keep their value. - `webhookSecret` is Suunto's notification secret; change it here when you change it in the Suunto portal. Other providers answer `422 WEBHOOK_SECRET_NOT_USED`. - Changing Suunto's `clientId` keeps its `webhookSecret`. Send a new one in the same request if the new app signs with another secret. A secret the provider issued, like Polar's, belongs to its client and is replaced on a client change. - `enabled: false` stops new connections. Patients already connected stay connected and can still disconnect. - A provider not set up answers `404 PROVIDER_NOT_CONFIGURED`; set it up with `POST`. - Changing Withings' `clientId` to the one of ovok's own Withings device integration answers `422 CLIENT_ID_RESERVED`. - Changing Withings' `secret` keeps its `webhookUrl`: the URL's token comes from a secret ovok makes for the project, not from the client secret. Changing its `clientId` makes a new token, and so a new URL; patients connect again to the new app anyway. - For Polar, every change with `enabled: true` sets the webhook up again as `POST` does. `enabled: false` leaves the webhook in place; its notifications answer `404` until you switch Polar back on. ## Example ```bash curl -X PATCH 'https://api.sandbox.ovok.com/v1/wearables/providers/oura' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "enabled": false }' ```

List the patient's wearable connections GET

Returns the wearable providers the signed-in patient can connect, and when they connected each one. **Auth:** bearer token of a patient. **Scope:** the caller's project and Patient profile (from the token). ## Behaviour - `connections` holds one entry per provider the project has enabled, plus any provider the patient is still connected to after the project switched it off. - `connection` is `null` when the patient has not connected the provider. Otherwise: - `connectedAt`: when the patient last connected it; - `syncedThrough`: up to when its data has been synced, `null` before the first sync; - `reconnectRequired`: `true` when the provider no longer accepts the connection. Connect it again to clear it. - A session that is not a patient's answers `403 PATIENT_PROFILE_REQUIRED`. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/wearables/connections' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```