When to retrieve tasks
You should retrieve tasks at the following stages:- Immediately after starting a journey
- Before displaying tasks to the customer
- Before submitting task data
- To check which tasks are completed or pending
- To confirm that a journey is progressing correctly
Prerequisites
Before making the API request, ensure you have:- Instance ID – Returned when the journey was started
- Access token – Obtained during Authentication
Retrieve tasks (API request)
Send aPOST
request to the endpoint to retrieve the tasks assigned to a journey instance. Your request will look like this:
cURL
You must include the
instanceId
in the request body and the Authorization
header
in the request. Refer to the Retrieve tasks
API reference for details.JSON
What happens after retrieving tasks
Depending on the returned task list, your next steps may include:- Retrieving the schema for tasks that require user input (e.g., document upload or form submission)
- Displaying pending tasks to the customer in your UI
- Submitting data to complete tasks
- Rechecking tasks periodically to track progress
Best practices
- Always check for new tasks after submitting data.
- Don’t assume task order, use the list to drive your UI or workflow.
- If no tasks are returned, then fetch the journey state to check if the journey has completed.