Update EVV task

Mark a task as completed (or incomplete) and optionally record the caregiver's response.

Workflow — completing a task with a response value:

  1. Fetch the task list with GET /visits/{visitId}/evv/tasks
  2. Inspect the task's questionType and options array to determine what response is expected
  3. Submit the completion with the response value:
    • For radio / scale / checkbox tasks: pass selectedOptionIds (array of option id
      values from the task's options array). Do not pass value — it is rejected for
      these question types because it would not be displayed in the Viv UI. Use a
      one-element array for radio/scale, multi-element for checkbox.
    • For text tasks: pass value with the free-form text response. Do not pass
      selectedOptionIds.
    • For number tasks: pass value with the numeric response, optionally suffixed with
      a unit from the task's units array (e.g. "30 minutes"). Do not pass
      selectedOptionIds.
    • If no response value is needed, just pass completed: true.

Side effects on completion:

  • A client feed item is created (visible in the client's activity feed)
  • Admin notifications are triggered
  • The visit's cached task count (queries.tasks) is updated

Marking incomplete:
Setting completed: false clears the completion timestamp. The task will need to be
re-submitted by the caregiver.

Error codes (400):

  • INVALID_FIELD_FOR_QUESTION_TYPEvalue was sent on a radio/scale/checkbox task, or
    selectedOptionIds was sent on a text/number task. The Viv SVE panel and downstream
    exporters render different fields per question type; sending the wrong field would
    silently produce a response that does not appear in the UI.
  • INVALID_OPTION_ID — one or more entries in selectedOptionIds are not present on the
    task's options array. Re-fetch the task to get current option ids.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Unique visit identifier

string
required

The unique identifier of the task

Body Params
boolean

Mark task as completed (true) or incomplete (false)

string | null

The caregiver's free-form response. Use only for text and number question
types.
For number tasks the value may be suffixed with a unit from the
task's units array (e.g. "30 minutes").

Sending value on a radio, scale, or checkbox task returns
400 INVALID_FIELD_FOR_QUESTION_TYPE — for those types the response is
determined by selectedOptionIds, not free-form text.

selectedOptionIds
array of strings

Array of selected option IDs. Use only for radio, scale, or checkbox
question types
(one element for radio/scale, one or more for checkbox).
Each id must come from the task's options array returned by
GET /visits/{visitId}/evv/tasks.

Sending selectedOptionIds on a text or number task returns
400 INVALID_FIELD_FOR_QUESTION_TYPE. Sending an id that is not on the task
returns 400 INVALID_OPTION_ID.

selectedOptionIds
string | null

Additional notes about the task completion

Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json