Practitioners

Update practitioner

Update practitioner using Ovok’s Slim API.

MethodPath
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

NameTypeRequiredDescription
idstringYesPractitioner id.

Body

The body replaces the profile. A field you omit is cleared.

NameTypeRequiredDescription
idstringNoPractitioner id. When sent, it must equal the id in the path.
namestringNoGiven names, separated by spaces.
surnamestringNoFamily name.
emailstringNoEmail address. Must be valid. Stored in lower case.
phonestringNoPhone number.
addressobjectNoPostal address.
address.linestringNoStreet and number.
address.citystringNoCity.
address.statestringNoState.
address.postalCodestringNoPostal code.
address.countrystringNoCountry.
photostringNoURL of a profile photo. Must be a valid URL.
metaobjectNoIgnored. Ovok sets the author to the caller.
meta.authorstringNoIgnored. 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.
  • id in the body is optional. When present it must equal the id in the path.
  • meta in the body is ignored. Ovok sets meta.author to the caller.
  • email is stored in lower case.
  • This route does not change roles or access policies.
  • A changed user name appears in change history as an Access row with key userRenamed and from/to values. 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}.

FieldTypeDescription
idstring (uuid)Practitioner id.
namestringGiven names of the official name, joined by a space. Left out when not set.
surnamestringFamily name. Left out when not set.
emailstringEmail address. Left out when not set.
phonestringPhone number. Left out when not set.
addressobjectFirst address. Left out when not set.
address.linestringStreet lines joined by a space. Left out when not set.
address.citystringCity. Left out when not set.
address.statestringState. Left out when not set.
address.postalCodestringPostal code. Left out when not set.
address.countrystringCountry. Left out when not set.
photostringURL of the first photo. Left out when not set.
metaobjectLeft out when the profile records no author.
meta.authorstringReference to whoever last wrote the profile through Ovok, such as Practitioner/<id>.

Errors

StatusMeaning
400The body id differs from the path, the profile cannot be read, or the FHIR backend refuses the update.
401Bearer token is missing, invalid or expired.
403You 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.
404No practitioner with this id exists, or it has no project (someone else's profile only).
422The body fails validation.

Last updated on

On this page