Update practitioner
Update practitioner using Ovok’s Slim API.
| Method | Path |
|---|---|
PUT | /v1/slim/practitioner/:id |
Authentication · Access policies
Updates a practitioner profile: name, surname, email, phone, address and photo.
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 Practitioner:read. Updating another practitioner's profile also needs Practitioner:update. Admins and super admins skip the access-policy check.
Scope: You can always update your own profile. Another practitioner must belong to your project, one of its sub-projects, or its parent project.
Request
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Practitioner id. |
Body
The body replaces the profile. A field you omit is cleared.
| Name | Type | Required | Description |
|---|---|---|---|
id | string | No | Practitioner id. When sent, it must equal the id in the path. |
name | string | No | Given names, separated by spaces. |
surname | string | No | Family name. |
email | string | No | Email address. Must be valid. Stored in lower case. |
phone | string | No | Phone number. |
address | object | No | Postal address. |
address.line | string | No | Street and number. |
address.city | string | No | City. |
address.state | string | No | State. |
address.postalCode | string | No | Postal code. |
address.country | string | No | Country. |
photo | string | No | URL of a profile photo. Must be a valid URL. |
meta | object | No | Ignored. Ovok sets the author to the caller. |
meta.author | string | No | Ignored. When sent, it must look like Practitioner/<id>. |
Behaviour
- The Practitioner resource is replaced with one built from the body. A field you omit is cleared, and FHIR fields that the body cannot carry are not kept. Send the full profile, for example the result of
GET /v1/slim/practitioner/{id}with your changes applied. idin the body is optional. When present it must equal theidin the path.metain the body is ignored. Ovok setsmeta.authorto the caller.emailis stored in lower case.- This route does not change roles or access policies.
- A changed user name appears in change history as an
Accessrow with keyuserRenamedandfrom/tovalues. No row is written when the name is unchanged. See the key catalogue. - Your own profile is written with your token. Another practitioner's profile is written with Ovok's admin client after the project check above passes.
- The response is the updated profile.
Example
curl -X PUT 'https://api.sandbox.ovok.com/v1/slim/practitioner/3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21' \
-H "Authorization: Bearer ${OVOK_TOKEN}" \
-H 'Content-Type: application/json' \
-d '{
"name": "Anna",
"surname": "Beispiel",
"email": "team@example.com",
"phone": "+4930123456789"
}'Successful response
200 — Practitioner profile updated successfully.
{
"id": "3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21",
"name": "Anna",
"surname": "Beispiel",
"email": "team@example.com",
"phone": "+4930123456789",
"meta": { "author": "Practitioner/3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21" }
}The body is the updated profile, in the same shape as GET /v1/slim/practitioner/{id}.
| Field | Type | Description |
|---|---|---|
id | string (uuid) | Practitioner id. |
name | string | Given names of the official name, joined by a space. Left out when not set. |
surname | string | Family name. Left out when not set. |
email | string | Email address. Left out when not set. |
phone | string | Phone number. Left out when not set. |
address | object | First address. Left out when not set. |
address.line | string | Street lines joined by a space. Left out when not set. |
address.city | string | City. Left out when not set. |
address.state | string | State. Left out when not set. |
address.postalCode | string | Postal code. Left out when not set. |
address.country | string | Country. Left out when not set. |
photo | string | URL of the first photo. Left out when not set. |
meta | object | Left out when the profile records no author. |
meta.author | string | Reference to whoever last wrote the profile through Ovok, such as Practitioner/<id>. |
Errors
| Status | Meaning |
|---|---|
400 | The body id differs from the path, the profile cannot be read, or the FHIR backend refuses the update. |
401 | Bearer token is missing, invalid or expired. |
403 | You are not a practitioner, admin or System Owner, you lack Practitioner:read (plus Practitioner:update for someone else's profile), or the practitioner's project is outside your project tree. |
404 | No practitioner with this id exists, or it has no project (someone else's profile only). |
422 | The body fails validation. |
Last updated on