Consent Signature

Request consent signature

  • Sandbox: available
  • Staging: available
  • Production: unknown
POST
/consent/signature/{consentId}

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:
    • patient referencing a Patient;
    • a provision.data reference to a Composition that holds the consent text;
    • a verification entry whose verifiedWith references a Patient or RelatedPerson, with verified not true.
  • The text comes from the Composition section coded main-content. It is a Handlebars template filled with patient, signer and organization (the display names of the patient, the verifier and the project).
  • The signer's email is the first email entry in the verifier's telecom.
  • The document language comes from the Composition's CMS language coding when it is one of en, de, fr, es, it, pl; otherwise de.
  • On success an identifier with system https://app.documenso.com and 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, documentId and email (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'

Authorization

bearer
headerAuthorizationBearer <JWT>

Path Parameters

consentId*string

ID of the FHIR Consent to sign.

Formatuuid

Response Body

Signature document created: page count, title, author, subject, document ID and signer email.

application/json
  1. response
numberOfPages*integer

Page count of the generated PDF.

title*string

PDF title: the Composition title, or Consent.

author*string

PDF author: the display name of the project.

subject*string

PDF subject: the same as title.

documentId*|

ID of the Documenso document, as Documenso returned it.

email*string

Email address of the signer.

Example Request
curl -X POST 'https://api.sandbox.ovok.com/consent/signature/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "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' ```