Create organization
- Sandbox: available
- Staging: available
- Production: unknown
Creates an organization (a zone in the Slim dashboard), optionally as a child of another zone.
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 Organization:create (an admin or super admin who holds no access policy skips this check).
Scope: The organization is created in the caller's project (from the token). A super-admin caller can pass ?projectId=<uuid> to create it in that project instead. Any other caller who passes projectId gets a 403.
Behaviour
namemust be unique. The check is an exact name match against the organizations your token can search. With?projectId, the check runs in that project only.parentOrganizationId, when set, must name an organization in your own project. A sub-project's or parent project's organization is refused. The new zone'spartOfpoints at it.description, when non-empty, is stored as the organization's narrative text.nullor an empty string stores nothing.- The write is atomic and takes a short write lock. A concurrent write to the same resources gets a 409.
- A zone-created entry is added to the change history. A failure to write that entry does not fail the request.
- The response is the created organization, in the same shape as
GET /v1/slim/organization/{id}.
Example
curl -X POST 'https://api.sandbox.ovok.com/v1/slim/organization' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "name": "Ward A", "parentOrganizationId": "87ea5dfc-8b8e-384d-8489-79496e706390", "description": "Ground floor" }'bearerAuthorizationBearer <JWT>application/json- body
name*string1 <= lengthparentOrganizationId?stringuuiddescription?stringOrganization created successfully.
application/json- response
id*stringOrganization (zone) id.
name*stringZone name. Empty string when the organization has no name.
parentOrganizationId?stringId of the parent zone (Organization.partOf). Omitted for a top-level zone.
description?stringNarrative text without its XHTML wrapper. Omitted when the organization has none.
curl -X POST 'https://api.sandbox.ovok.com/v1/slim/organization' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'{ "id": "string", "name": "string", "parentOrganizationId": "string", "description": "string"}Update organization PUT
Updates an organization's (zone's) name, description and parent zone. **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 `Organization:update` (an admin or super admin who holds no access policy skips this check). **Scope:** The organization must belong to the caller's project (from the token). Organizations in a parent project or a sub-project are refused. ## Behaviour - `name` is required and must be unique among the organizations your token can search, not counting this one. - `parentOrganizationId` sets the parent zone. It must name an organization in your own project. **Omitting it removes the current parent**, which makes the zone top-level. - `description`, when non-empty, replaces the narrative text. Omitting it, or sending `null` or an empty string, leaves the existing description unchanged. - The write is atomic and takes a short write lock. A concurrent write to the same resources gets a 409. - A zone-updated entry is added to the change history. A failure to write that entry does not fail the request. - The response is the organization after the update, in the same shape as `GET /v1/slim/organization/{id}`. ## Example ```bash curl -X PUT 'https://api.sandbox.ovok.com/v1/slim/organization/c3499c27-2973-0a7f-807e-fb8676a92dcb' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "name": "Ward A", "parentOrganizationId": "87ea5dfc-8b8e-384d-8489-79496e706390", "description": "Ground floor" }' ```
List patients GET
Lists the residents (patients) of your project with their zone, room, device and settings tags. Use it for the residents table in the Slim dashboard. **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 `Patient:search`, `Patient:read`, `Device:read`, `Location: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 token without a project is refused. ## Behaviour - Read-only. - One row per resident. When a resident is on several devices, the row shows one of them, so a resident is never listed twice. - `residentState` defaults to `active`, so discharged residents are hidden unless you ask for them. `discharged-recent` means discharged within the last 30 days; `discharged` means longer ago. `all` turns the filter off. - `includeDischargedRecent=true` widens `residentState=active` or `residentState=discharged` to also include `discharged-recent` residents. - `organizationId` keeps residents in that zone. `hasDevice=true` keeps residents with a device; `hasDevice=false` keeps residents without one. - `medicalSettings` and `bedActivitySettings` keep residents with that settings tag. These tags are `null` when Ovok could not read the project's threshold settings; such rows match no settings filter. - `search` is a case-insensitive substring match on the resident's name, nickname, room name and zone name. - Sort with `sortBy` (default `patientName`) and `orderBy` (`ASC` or `DESC`, any case, default `ASC`). - Pagination is zero-based: `page` (default `0`) and `count` (default `20`, max `100`). `total` counts all matching rows. - Fields with no value are `null`. - Results are cached for up to 60 seconds per user. A change to a resident, device, room or zone made through Ovok clears the cache. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/slim/patient?residentState=active&sortBy=patientNickname&orderBy=asc&page=0&count=20' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```