Update patient threshold
| Method | Path |
|---|---|
PUT | /v1/slim/threshold/patient/:patientId |
Authentication · Access policies
Saves one resident's own thresholds.
Deprecated. Use
PUT /v2/slim/threshold/patient/{patientId}. This v1 route stays available, unchanged, until every client has moved.
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 Goal:update (admins and super admins skip this check).
Scope: The resident must be in the caller's project (from the token) or one of its sub-projects.
Behaviour
- Each metric's
modedecides what is stored:patient: yourabsolute/relativelimits.organization: the home's limits. Sendingenabled: falsefor a metric the home has enabled switches it topatientmode, disabled.
patient-autois no longer accepted: a body that uses it is refused with 422.patientIdin the body is required but ignored; the path decides the resident.averageandaverageRangeare set by the server; values you send are ignored.- Enabling a relative heart-rate or respiratory-rate band for a resident with no baseline average answers 424, because the band would have nothing to be relative to.
- Heart-rate and respiratory-rate limits are evaluated by Signals. When the body states them, the route sends the resident's limits to Signals and waits for Signals to confirm. If Signals does not confirm, it answers 502 with
signalsSync: { status: 'pending', reason }. The new limits are already stored by then; save again to retry. A body without medical limits is stored and sent to Signals in the background. - While a save of the home's limits (
PUT /v2/slim/thresholdorPUT /v1/slim/threshold) is running, this save answers 409 and nothing is changed: try again once it is done. - Change-history entries are written for each changed metric.
- The response is the saved threshold.
Example
curl -X PUT 'https://api.sandbox.ovok.com/v1/slim/threshold/patient/3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21' \
-H "Authorization: Bearer ${OVOK_TOKEN}" \
-H 'Content-Type: application/json' \
-d '{
"patientId": "3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21",
"status": "active",
"settings": {
"heartRate": { "mode": "patient", "enabled": true, "absolute": { "enabled": true, "min": 45, "max": 110 } }
}
}'
Successful response
200 — Patient threshold updated successfully.
Errors
| Status | Meaning |
|---|---|
400 | Your session has no project. |
401 | Bearer token is missing, invalid or expired. |
403 | You are not a practitioner, admin or System Owner, you lack Goal:update, or the patient is outside your project and its sub-projects or carries no project. |
409 | A save of the home's limits is running. Nothing was changed; try again once it is done. |
422 | The body fails validation. |
424 | The body arms a baseline (relative) band for a metric with no stored average for this resident. |
502 | The home's stored thresholds could not be read, or the body states a heart-rate or respiratory-rate band and Signals did not confirm it. The new band is stored; send the save again to retry. |