SlimSlim/User

Get all user consents

  • Sandbox: available
  • Staging: available
  • Production: unknown
GET
/v1/slim/user/consents

Returns every consent of the signed-in practitioner in one response. Use it at sign-in to decide which consent prompts to show.

Auth: Bearer token for a practitioner session (the profile must be a Practitioner). The caller's access policy must grant Consent:read and Consent:search (a project admin who holds no access policy skips this check). Scope: The caller's practitioner profile in the caller's project (from the token).

Behaviour

  • Both medicalSettingsNotificationsConsent and termsAndConditionsConsent are versioned. Each is true only when an acceptance is on file and either matches the currently published version of that consent or no version has been published yet.
  • Publishing a new version of a consent turns it false for everyone until they accept again.
  • The published version is the one of the root project of your project tree. Without one, the platform-wide version applies.
  • A consent with no record reads false.

Example

curl -X GET 'https://api.sandbox.ovok.com/v1/slim/user/consents' \  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'
{ "medicalSettingsNotificationsConsent": true, "termsAndConditionsConsent": false }

Authorization

bearer
headerAuthorizationBearer <JWT>

Response Body

Consent statuses retrieved successfully.

application/json
  1. response
medicalSettingsNotificationsConsent*boolean
termsAndConditionsConsent*boolean
Example Request
curl -X GET 'https://api.sandbox.ovok.com/v1/slim/user/consents'
Example Response
{  "medicalSettingsNotificationsConsent": true,  "termsAndConditionsConsent": true}

Update terms and conditions consent POST

Accepts or withdraws the terms and conditions for the signed-in practitioner. Other consents are not changed. **Auth:** Bearer token for a practitioner session (the profile must be a `Practitioner`). The caller's access policy must grant `Consent:read`, `Consent:search`, `Consent:create` and `Consent:update` (a project admin who holds no access policy skips this check). **Scope:** The caller's practitioner profile in the caller's project (from the token). ## Behaviour - `true` records acceptance of the currently published terms version. `false` withdraws it. - The acceptance is also kept as a legal `Consent` in your project: accepting creates or re-activates it with a link to the terms page of your project's practitioner app; withdrawing revokes it with reason `withdrawn`. - Repeating the same value writes nothing. The call is idempotent. - The consent answers of `/v1/me/consent/*` are refreshed right away. - Returns the resulting `termsAndConditionsConsent`. ## Example ```bash curl -X POST 'https://api.sandbox.ovok.com/v1/slim/user/terms-and-conditions-consent' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "termsAndConditionsConsent": true }' ```

Update user consents POST

Updates one or more consents of the signed-in practitioner. Use it to save the answers of a combined consent prompt. **Auth:** Bearer token for a practitioner session (the profile must be a `Practitioner`). The caller's access policy must grant `Consent:read`, `Consent:search`, `Consent:create` and `Consent:update` (a project admin who holds no access policy skips this check). **Scope:** The caller's practitioner profile in the caller's project (from the token). ## Behaviour - Send at least one of `medicalSettingsNotificationsConsent` and `termsAndConditionsConsent`. Only the fields you send change. - `true` records acceptance of the currently published version of that consent. `false` withdraws it. - A `termsAndConditionsConsent` change also creates, re-activates or revokes the legal `Consent` read by `GET /v1/me/consent/legal`. - All changes commit together or not at all. Repeating the same values writes nothing. - The consent answers of `/v1/me/consent/*` are refreshed right away. - The response always carries the resulting state of every consent. ## Example ```bash curl -X POST 'https://api.sandbox.ovok.com/v1/slim/user/consents' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "medicalSettingsNotificationsConsent": true, "termsAndConditionsConsent": true }' ```