Update Enrollment Task
Updates a task associated with an enrollment.
/tasks/{taskId}This endpoint updates the completion status and data of a task associated with a transaction enrollment.
Stedi adds tasks to an enrollment when specific actions are required to complete the enrollment process. For example, we might add a task to request additional information from the provider.
When the task's responsibleParty is set to PROVIDER, you can use this endpoint to mark the task as completed once the provider has taken the required action. You can also use this endpoint to mark tasks as incomplete if they were marked complete in error.
-
Call this endpoint with the
completedproperty set totrueto mark the task as completed. Optionally, provide additional details in theresponseDataobject. -
The endpoint returns the updated task record.
Stedi displays the task as completed in the Stedi portal and proceeds with the enrollment process.
Task rank order
You must complete tasks in the order defined by their rank property. For example, you can't complete a task with rank 2 if there's an uncompleted task on the enrollment record with rank 1. If you try to complete a task out of order, the endpoint returns an HTTP 400 error.
A Stedi API Key for authentication.
Path Parameters
The Stedi-assigned identifier for the task to complete. You can get the task ID from either the Retrieve Enrollment or List Enrollments endpoint.
Body
Indicates whether the task is completed. Set to true to mark the task as complete. If omitted, the default is false.
Additional data you can submit to Stedi when completing a task with definition.provideInformation.
Stedi ignores this object when you complete a task with definition.followInstructions.
curl --request POST \ --url "https://enrollments.us.stedi.com/2024-09-01/tasks/{taskId}" \ --header "Authorization: <api_key>" \ --header "Content-Type: application/json" \ --data '{ "completed": true, "responseData": { "provideInformation": { "response": "I have completed the required steps as instructed." } } }'{
"task": {
"id": "01937d50-1234-7890-abcd-567890abcdef",
"definition": {
"provideInformation": {
"instructions": "Please provide a brief summary of your experience."
}
},
"isComplete": true,
"completedAt": "2024-06-01T12:00:00Z",
"responsibleParty": "PROVIDER",
"rank": 1,
"responseData": {
"provideInformation": {
"response": "I have completed the required steps as instructed."
}
}
}
}