SlimSlim/Invite

Invite practitioner

  • Sandbox: available
  • Staging: available
  • Production: unknown
POST
/v1/slim/invite/practitioner

Invites a practitioner to your project, or to one of its direct child projects, and emails them a link to set their password.

Auth: Bearer token for a practitioner, project admin or System Owner session. The caller's access policy must grant Practitioner:create (a project admin who holds no access policy skips this check). Scope: The caller's project (from the token), or projectId when given. projectId must be the caller's project or a direct child of it.

Behaviour

  • Practitioner invitations must be enabled on the target project. They are enabled unless the project turns them off.
  • accessPolicyId must name a policy of your project, its parent or a direct child, at or below your own rank. It is checked before anything is written.
  • An existing practitioner account with this email in the target project is refused: an invite never changes a member's role or admin flag (use PUT /v1/slim/policy/{id}). An existing practitioner account elsewhere, your own project included, is reused: only the membership and practitioner profile are new. A patient account of another project is not: it is that project's own, and the invitee gets a practitioner account of their own.
  • Ovok creates the membership with the access policy and the practitioner profile, then emails an invitation with a password-setup link. The link points to the app the request came from, and sets a password for 7 days after it was sent. If the email fails, the account is undone and the request answers 400.
  • admin in the body is ignored. The invitee becomes an admin member, and the project owner, only when the target project has no owner yet.
  • The invitee shows as Pending in user lists until they set a password.
  • Returns the new membership, the practitioner profile and status: "Pending".

Example

curl -X POST 'https://api.sandbox.ovok.com/v1/slim/invite/practitioner' \  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \  -H 'Content-Type: application/json' \  -d '{    "email": "max.mustermann@example.com",    "name": "Max",    "surname": "Mustermann",    "accessPolicyId": "c3499c27-2973-0a7f-807e-fb8676a92dcb"  }'

Authorization

bearer
headerAuthorizationBearer <JWT>

Request Body

application/json
  1. body
email*string
Formatemail
name*string
Length1 <= length
surname*string
Length1 <= length
accessPolicyId*string
Formatuuid
admin?boolean
Defaultfalse
projectId?string
Formatuuid

Response Body

Practitioner invited successfully.

application/json
  1. response
membership*
profile*
status*"Pending"
Value in"Pending"
Example Request
curl -X POST 'https://api.sandbox.ovok.com/v1/slim/invite/practitioner' \  -H 'Content-Type: application/json' \  -d '{  "email": "user@example.com",  "name": "string",  "surname": "string",  "accessPolicyId": "b968355d-4dbb-453c-8c65-8fcb2d303aa7"}'
Example Response
{  "membership": {    "resourceType": "ProjectMembership",    "id": "string",    "project": {      "reference": "string",      "display": "string"    },    "user": {      "reference": "string"    },    "profile": {      "reference": "string"    },    "accessPolicy": {      "reference": "string",      "display": "string"    },    "meta": {      "project": "string",      "author": {        "reference": "string"      },      "lastUpdated": "string"    }  },  "profile": {    "resourceType": "Practitioner",    "id": "string",    "name": [      null    ],    "meta": {      "project": "string",      "lastUpdated": "string"    }  },  "status": "Pending"}

Get health status GET

Returns the health of the Slim API and the systems it depends on. Use it for uptime checks and status screens. **Auth:** none. ## Behaviour - `status` is `healthy` when both the FHIR store and Redis are up, `degraded` when one is down, and `unhealthy` when both are down. The route still answers `200` in every case, so read `status`, not the HTTP code. - `externalSystems.fhirStore` and `externalSystems.redis` hold each system's own status and, when available, its version, memory and connection figures. `responseTimeMs` is the time the FHIR store took to answer its health check. - `cache` holds hit, miss and error counts of the application cache since the process started. - `ovok`, `system` and the FHIR store `serverMetrics` come from the monitoring system, from the last 5 minutes. They are left out when monitoring is not configured or does not answer. - `uptimeSeconds` is the time since this process started. `version` is `null` when the deployment does not set one. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/slim/health' ```

List location assignment candidates GET

Lists locations a resident can be placed in, flagged as occupied or vacant. Use it to fill the location picker when you assign a resident. **Auth:** Bearer token. The caller must be a practitioner, an admin, a super admin, or hold the "System Owner" access policy. The access policy must grant `Location:search`, `Location:read`, `Device:read`, `Patient:read` and `Organization:read` (an admin or super admin who holds no access policy skips this check). **Scope:** The caller's project (from the token). A non-admin token without a project is refused. ## Behaviour - Read-only. - Built from the same data as `GET /v1/slim/location`: **one row per device** at a location, and one row for a location with no device. `total` counts rows. - `occupied` is `true` when the row's device has a resident assigned. Such rows carry `warningCode: "location_has_existing_resident"`. Otherwise `warningCode` is `null`. - `assignable` is always `true`. - Fields with no value are `null`. - `search` and `organizationId` filter as on `GET /v1/slim/location`. `occupied` takes `occupied`, `vacant` or `all` (default `all`). - Rows are sorted as on `GET /v1/slim/location`. - Pagination is zero-based: `page` (default `0`) and `count` (default `50`, max `50`). ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/slim/location/assignment-candidates?occupied=vacant&count=50' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ``` ```json { "total": 1, "page": 0, "count": 50, "resources": [ { "locationId": "c3499c27-2973-0a7f-807e-fb8676a92dcb", "locationName": "Room 201 Bed 1", "organizationId": null, "organizationName": null, "deviceId": null, "deviceName": null, "patientId": null, "patientName": null, "occupied": false, "assignable": true, "warningCode": null } ] } ```