Skip to main content

Update medical settings notifications consent

Deprecated

This route is deprecated. Use POST /v1/me/consent/medical instead. The replacement returns the resulting consent with its id and acceptance time.

MethodPath
POST/v1/slim/user/medical-settings-notifications-consent

Authentication · Access policies

Gives or withdraws the medical settings notifications consent 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 (project admins skip this check). Scope: The caller's practitioner profile in the caller's project (from the token).

Request​

Body​

NameTypeRequiredDescription
medicalSettingsNotificationsConsentbooleanYestrue gives the consent on the currently published version. false withdraws it.

Behaviour​

  • true records the consent on the currently published version. false withdraws it.
  • Sending the current value again writes nothing.
  • The write is atomic. It either succeeds completely or changes nothing.
  • The consent answers of /v1/me/consent/* are refreshed right away.
  • The response carries the resulting medicalSettingsNotificationsConsent.

Example​

curl -X POST 'https://api.sandbox.ovok.com/v1/slim/user/medical-settings-notifications-consent' \
-H "Authorization: Bearer ${OVOK_TOKEN}" \
-H 'Content-Type: application/json' \
-d '{ "medicalSettingsNotificationsConsent": true }'

Successful response​

201 — Medical settings notifications consent updated successfully.

{
"medicalSettingsNotificationsConsent": true
}
FieldTypeDescription
medicalSettingsNotificationsConsentbooleanThe resulting state: true after giving the consent, false after withdrawing it.

Errors​

StatusMeaning
400The FHIR server refused the consent write.
401The bearer token is missing or invalid.
403The session is not a practitioner session, has no project, or its access policy lacks one of the Consent interactions.
409The consent write lost a conflict with a concurrent write. Retry.
422The body fails validation, for example medicalSettingsNotificationsConsent is missing or not a boolean.
429Too many requests.
503Your access policy could not be read, or the service is temporarily over capacity. Retry shortly, and honour Retry-After when it is present.