List location assignment candidates
- Sandbox: available
- Staging: available
- Production: unknown
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.totalcounts rows. occupiedistruewhen the row's device has a resident assigned. Such rows carrywarningCode: "location_has_existing_resident". OtherwisewarningCodeisnull.assignableis alwaystrue.- Fields with no value are
null. searchandorganizationIdfilter as onGET /v1/slim/location.occupiedtakesoccupied,vacantorall(defaultall).- Rows are sorted as on
GET /v1/slim/location. - Pagination is zero-based:
page(default0) andcount(default50, max50).
Example
curl -X GET 'https://api.sandbox.ovok.com/v1/slim/location/assignment-candidates?occupied=vacant&count=50' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'{ "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 } ]}bearerAuthorizationBearer <JWT>search?string1 <= lengthorganizationId?string1 <= lengthoccupied?string"all""occupied""vacant""all"page?string"0"count?string"50"Location assignment candidates retrieved successfully.
application/json- response
total*number0 <= valuepage*number0 <= valuecount*number1 <= valueresources*array<>curl -X GET 'https://api.sandbox.ovok.com/v1/slim/location/assignment-candidates'{ "total": 0, "page": 0, "count": 1, "resources": [ { "locationId": "string", "locationName": "string", "organizationId": "string", "organizationName": "string", "deviceId": "string", "deviceName": "string", "patientId": "string", "patientName": "string", "occupied": true, "assignable": true, "warningCode": "string" } ]}Invite practitioner POST
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 ```bash 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" }' ```
List locations GET
Lists the locations (rooms and beds) in your project, with the device, resident and zone at each one. Use it for the location 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 `Location:search` and `Location:read` (an admin or super admin who holds no access policy skips this check). **Scope:** The caller's project (from the token). Only locations, devices and residents in that project are returned. ## Behaviour - Read-only. - **One row per device.** A location with several devices appears once per device. A location with no device appears once, without device and resident fields. `total` counts rows, not locations. - `patientId` and `patientName` are the resident assigned to that row's device. `organizationId` and `organizationName` are the location's zone. - `search` matches, as a case-insensitive substring, the location name, the name of a device at the location, the name of a resident on such a device, or the zone name. - `floor`, `room` and `bed` match the location's codes exactly. `organizationId` keeps locations in that zone. `deviceId` keeps only the row for that device. - Rows are sorted by floor, room, bed, device name, then location name. The sort is case-insensitive and numeric-aware ("2" before "10"). Rows with a missing value sort after rows that have one. - Pagination is zero-based: `page` (default `0`) and `count` (default `20`, max `100`). - Unknown query parameters are rejected. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/slim/location?search=Room%20201&page=0&count=20' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```