Organization Code Information

Email organization codes

  • Sandbox: available
  • Staging: available
  • Production: unknown
POST
/organizations/code/email

Emails a user the tenant codes of every organization (project) they have an account in. Use it on a sign-in screen for users who forgot their organization code.

Auth: none.

Behaviour

  • The route always answers 202 with no body and does the work in the background, so the answer does not tell you whether the email has an account.
  • The background job finds every account with this email, then looks up the tenant code of each project. If there are no accounts or no codes, no email is sent.
  • The email lists each project's name and code. It uses the PATIENT_ORGANIZATION_CODES template when the first account found is a Patient, and OVOK_ORGANIZATION_CODES otherwise. Language and domain come from the request.
  • The email address is lowercased.

Example

curl -X POST 'https://api.sandbox.ovok.com/organizations/code/email' \  -H 'Content-Type: application/json' \  -d '{    "email": "max.mustermann@example.com"  }'

Request Body

application/json
  1. body
email*string
Formatemail

Response Body

Accepted; no body. The email, if any, is sent in the background.

Example Request
curl -X POST 'https://api.sandbox.ovok.com/organizations/code/email' \  -H 'Content-Type: application/json' \  -d '{  "email": "user@example.com"}'
Example Response
Empty

Give or withdraw the medical consent POST

Gives or withdraws the medical settings notifications consent for the signed-in practitioner and returns the resulting medical consent. 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 - `medicalSettingsNotificationsConsent: true` records the consent on the currently published version. `false` withdraws it. - Sending the current value again writes nothing. - The value read by `GET /v1/slim/user/consents` changes in the same commit. - The response has the shape of `GET /v1/me/consent/medical`: `medical` is `null` after a withdrawal. ## Example ```bash curl -X POST 'https://api.sandbox.ovok.com/v1/me/consent/medical' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "medicalSettingsNotificationsConsent": true }' ```

Get organization code GET

Returns the tenant code of the caller's project. Users type the code on sign-in screens to choose their organization. **Auth:** bearer token. **Scope:** the caller's project (from the token). ## Behaviour - The response holds `code` and `projectId`. - If the project has no tenant code, the request fails with 400 (`Tenant code not found`). - If more than one code row exists for a project, the most recently updated one is returned. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/organizations/code' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```