Namespaces
ovok.consent
Read and record legal and medical consent, and request consent signatures.
- Stable unknown
- Release candidate since 0.4.49-rc.4
- Development since 0.4.49-dev.517+4645a0a
Consent of the signed-in user. Legal consent covers the terms and conditions; medical consent covers medical notifications.
Read and record legal consent
const { legal } = await ovok.consent.legal.retrieve();
const mustAccept = legal === null || (legal.status === 'revoked' && legal.revokedReason === 'tos-updated');
if (mustAccept) {
await ovok.consent.legal.set(true);
}legalisnullwhen the user never answered. A revoked record with reasontos-updatedmeans the terms changed and the user must accept again.set(false)withdraws consent.- Calls
GETandPOST v1/me/consent/legal.
Read and record medical consent
const { medical } = await ovok.consent.medical.retrieve();
await ovok.consent.medical.set(true);medicalisnulluntil the user answers; otherwise it carriesacceptedAt.- Calls
GETandPOST v1/me/consent/medical.
Request a signature
const request = await ovok.consent.requestSignature(consentId);- Asks the server to start a signature for an existing consent. The response describes the document to sign (
documentId,title,numberOfPages,email).
Reference
- consent API reference: every method and type.
- ovok.cms: legal pages to show before asking.
- ovok.invites
- Errors and retries
Last updated on