Update Enrollment Task

Updates a task associated with an enrollment.

POST/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.

  1. Call this endpoint with the completed property set to true to mark the task as completed. Optionally, provide additional details in the responseData object.

  2. 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.

Authorization
RequiredHeader

A Stedi API Key for authentication.

Path Parameters

taskId
String

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

application/json
completed
Boolean

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.

  • Required for provideFilledPdf tasks. Use the pdfUpload object type. Learn more
  • Optional for provideInformation tasks.
  • Stedi ignores this object for followInstructions tasks.
2 variants:
pdfUpload
responseData.pdfUpload
ObjectRequired

Add details from a PDF that has been uploaded to complete a provideFilledPdf task. Required when completing a task where task.definition.provideFilledPdf is present.

Show attributes
documentId
responseData.pdfUpload.documentId
StringRequiredMin length: 1

The document ID for the uploaded PDF, such as 019375d0-1234-7890-abcd-567890abcdef.

This ID is available in the response from the Upload Enrollment Document endpoint. You can also retrieve it from the Retrieve Enrollment or List Enrollments endpoints.

fileName
responseData.pdfUpload.fileName
StringRequiredMin length: 1

The filename of the uploaded PDF, such as completed-enrollment-form.pdf. This should match the name you supplied when you called the Upload Enrollment Document endpoint.

Response

application/json
task
ObjectRequired

The updated task record.

Show attributes
completedAt
task.completedAt
StringFormat: date-time

The timestamp when the task was completed.

definition
task.definition
ObjectRequired

A definition that determines the task's behavior, requirements, and data.

3 variants:
followInstructions
task.definition.followInstructions
ObjectRequired

A task that requires the responsible party to follow specific instructions.

Show attributes
instructions
task.definition.followInstructions.instructions
StringRequiredMin length: 1

Human-readable instructions for the responsible party to follow.

id
task.id
StringRequired

The unique, Stedi-assigned identifier for the task.

isComplete
task.isComplete
BooleanRequired

Whether the task has been marked as complete through either the API or the Stedi portal.

rank
task.rank
NumberRequiredRange: ≥ 0

The rank order of this task. Tasks with lower numbers must be completed first. For example, a task with rank 1 must be completed before a task with rank 2.

responseData
task.responseData
Object

Data collected when the task was completed.

2 variants:
pdfUpload
task.responseData.pdfUpload
ObjectRequired

Add details from a PDF that has been uploaded to complete a provideFilledPdf task. Required when completing a task where task.definition.provideFilledPdf is present.

Show attributes
documentId
task.responseData.pdfUpload.documentId
StringRequiredMin length: 1

The document ID for the uploaded PDF, such as 019375d0-1234-7890-abcd-567890abcdef.

This ID is available in the response from the Upload Enrollment Document endpoint. You can also retrieve it from the Retrieve Enrollment or List Enrollments endpoints.

fileName
task.responseData.pdfUpload.fileName
StringRequiredMin length: 1

The filename of the uploaded PDF, such as completed-enrollment-form.pdf. This should match the name you supplied when you called the Upload Enrollment Document endpoint.

responsibleParty
task.responsibleParty
StringRequired

The party responsible for completing this task.

Possible values
PROVIDER
STEDI