Request consent signature
- Sandbox: available
- Staging: available
- Production: unknown
Requests an e-signature for a FHIR Consent: Ovok renders the consent text as a PDF, uploads it to the e-signature service (Documenso) with the verifier as the signer, and returns the document metadata.
Auth: bearer token. Every FHIR read runs with your token, so you must be able to read the Consent and the resources it points to.
Behaviour
- The Consent must have:
patientreferencing aPatient;- a
provision.datareference to aCompositionthat holds the consent text; - a
verificationentry whoseverifiedWithreferences aPatientorRelatedPerson, withverifiednottrue.
- The text comes from the Composition section coded
main-content. It is a Handlebars template filled withpatient,signerandorganization(the display names of the patient, the verifier and the project). - The signer's email is the first
emailentry in the verifier'stelecom. - The document language comes from the Composition's CMS language coding when it is one of
en,de,fr,es,it,pl; otherwisede. - On success an identifier with system
https://app.documenso.comand the new document ID is added to the Consent. Each call creates a new signature document and adds another identifier. - The response holds
numberOfPages,title,author,subject,documentIdandemail(the signer's address).
Example
curl -X POST 'https://api.sandbox.ovok.com/consent/signature/c3499c27-2973-0a7f-807e-fb8676a92dcb' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'bearerAuthorizationBearer <JWT>consentId*stringID of the FHIR Consent to sign.
uuidSignature document created: page count, title, author, subject, document ID and signer email.
application/json- response
numberOfPages*integerPage count of the generated PDF.
title*stringPDF title: the Composition title, or Consent.
author*stringPDF author: the display name of the project.
subject*stringPDF subject: the same as title.
documentId*|ID of the Documenso document, as Documenso returned it.
email*stringEmail address of the signer.
curl -X POST 'https://api.sandbox.ovok.com/consent/signature/497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "numberOfPages": 0, "title": "string", "author": "string", "subject": "string", "documentId": "string", "email": "string"}Update content PUT
Replaces the content item with the given key in one language. Use it to edit an item you created with `POST /cms/{type}/{language}`. **Auth:** bearer token. **Scope:** the caller's project (from the token). Only items in that project are found. ## Behaviour - `type` is one of `blog`, `video`, `audio`, `template` or `export-template`. - `language` must be one of the languages in your project's locale settings. - The body replaces `title`, `category`, `section` and `code`. Ovok sets `date` to now and `author` to your profile. - If more than one item exists for this type, key and language, Ovok keeps the first and deletes the others. - When you update an item, a background job runs for every project language. It only creates translations that do not exist yet; existing translations are not changed. - The route is also served under `/internal/cms/{type}`. ## Example ```bash curl -X PUT 'https://api.sandbox.ovok.com/cms/blog/en-US/blog-sleeping-well-a1b2c3d4' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "title": "Sleeping well", "category": "health", "section": [ { "title": "Introduction", "text": "Why good sleep matters.", "code": ["main-content"] } ] }' ```
Search documents GET
Lists the documents you can read, newest first by default. Use it to build a file list. **Auth:** bearer token. The search runs with your token, so Medplum returns only DocumentReferences you can read. ## Behaviour - `_count` sets the page size (default `100`), `_offset` the number of documents to skip (default `0`), and `_sort` the order (default `-_lastUpdated`). - `total` is an estimate from Medplum, not an exact count. Use it for a page counter, not for logic that needs the exact number. - Each entry has `id`, `meta.lastUpdated`, `author`, `fileName`, `contentType`, and `publicToken` when the document is public. Entries never include `uploadOptions`. ## Example ```bash curl -G 'https://api.sandbox.ovok.com/document' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -d '_count=20' \ -d '_offset=0' ```