Organizations

Get organization

Get organization using Ovok’s Slim API.

MethodPath
GET/v1/slim/organization/:id

Authentication · Access policies

Returns one organization (a zone in the Slim dashboard) by id. Use it to show or edit a 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:read (admins and super admins skip this check). Scope: The organization is read with the caller's own token, so you get any organization your Ovok AccessPolicy lets you read. There is no extra project check on this route.

Request

Path parameters

NameTypeRequiredDescription
idstring (uuid)YesOrganization (zone) id.

Behaviour

  • Read-only.
  • description is the organization's narrative text with the XHTML <div> wrapper removed. It is absent when the organization has no narrative.
  • parentOrganizationId is the id from Organization.partOf. It is absent for a top-level zone.

Example

curl -X GET 'https://api.sandbox.ovok.com/v1/slim/organization/3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21' \
  -H "Authorization: Bearer ${OVOK_TOKEN}"

Successful response

200 — Organization retrieved successfully.

{
  "id": "3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21",
  "name": "Ward A",
  "parentOrganizationId": "1e6b8d30-2c4f-4a95-8d7e-b0a2c4e6f918",
  "description": "Ground floor"
}
FieldTypeDescription
idstring (uuid)Organization (zone) id.
namestringZone name. Empty string when the organization has no name.
parentOrganizationIdstring (uuid)Id of the parent zone. Left out for a top-level zone.
descriptionstringNarrative text without its XHTML wrapper. Left out when there is none.

Errors

StatusMeaning
401Bearer token is missing, invalid or expired.
403You are not a practitioner, admin or System Owner, you lack Organization:read, or the request is not authorized to read the organization.
404No organization with this id exists.
422id is not a UUID.

Last updated on

On this page