Notifications

Edit a note's text

Edit a note's text using Ovok’s Slim API.

MethodPath
PATCH/v1/slim/notifications/notes/:noteId

Authentication · Access policies

Changes a note's text. A note is a practitioner's comment on a notification, stored as a FHIR Communication whose basedOn points at the alert. The alert itself is never changed.

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:read (admins and super admins skip this check). Only the note's author can change it. Scope: The caller's project (from the token). An alert or note from another project, of another kind, or that does not exist answers the same 404.

Request

Path parameters

NameTypeRequiredDescription
noteIdstring (uuid)YesThe note's id.

Body

NameTypeRequiredDescription
textstringYesThe new text. Trimmed, then 1 to 2000 characters. It replaces the old text.

Behaviour

  • Same effect as PUT: a note's text is the only field a caller can change.
  • text is trimmed and must be 1 to 2000 characters.
  • Only the practitioner who wrote the note can change it. Another caller gets 403.
  • A note that was deleted answers 404.
  • A note on an out-of-bed or alarm notification also needs you to still be able to read that notification. A note on a medical episode or a raw alert does not call Signals, so editing works while Signals is down.
  • If the note changed while your edit was in flight, the route answers 409. Reload the note and try again.

Example

curl -X PATCH 'https://api.sandbox.ovok.com/v1/slim/notifications/notes/3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21' \
  -H "Authorization: Bearer ${OVOK_TOKEN}" \
  -H 'Content-Type: application/json' \
  -d '{ "text": "Resident was in the bathroom; back in bed 02:14." }'

Successful response

200 — The note as stored.

{
  "id": "3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21",
  "target": { "kind": "oob", "id": "3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b27" },
  "patientId": "3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b23",
  "text": "Resident was in the bathroom; back in bed 02:14.",
  "author": { "practitionerId": "3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b24", "name": "Demo Nurse" },
  "createdAt": "2026-10-09T01:58:12.345Z",
  "updatedAt": "2026-10-09T02:20:05.511Z"
}
FieldTypeDescription
idstring (uuid)The note's id. Use it with the edit, replace and delete routes.
targetobjectThe notification the note was written on.
target.kind"oob" | "alarm" | "medical" | "alert"The kind of notification. A note written on a raw Signals alert and listed on that alert's episode keeps "alert".
target.idstringThe notification's id: the row's commId for oob and alarm, the row's episode.id for medical, the raw alert's id for alert.
patientIdstring (uuid) | nullThe resident's Patient id. null when the notification has no resident.
textstringThe note's text, trimmed.
authorobjectThe practitioner who wrote the note.
author.practitionerIdstring (uuid) | nullThe author's Practitioner id.
author.namestring | nullThe author's display name when the note was written.
createdAtstring (ISO 8601 date-time) | nullWhen the note was written.
updatedAtstring (ISO 8601 date-time) | nullWhen the note was last changed.

Errors

StatusMeaning
401Bearer token is missing, invalid or expired.
403You lack Patient:read or are not the note's author.
404The note does not exist or was deleted, or it belongs to another project.
409The note changed while this edit was in flight. Reload it and try again.
422noteId is not a UUID, or text is empty or over 2000 characters.

Last updated on

On this page