When you start a journey, GBG GO dynamically assigns tasks based on the modules and rules in the journey. These tasks define the actions a customer must complete, such as submitting a document, verifying identity, or providing additional data.

Use the Retrieve tasks () API endpoint to fetch the list of tasks assigned to a specific journey instance.

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 a POST request to the endpoint to retrieve the tasks assigned to a journey instance. Your request will look like this:

curl --request POST \
  --url https://eu.platform.go.gbgplc.com/captain/api/journey/task/list \
  --header 'Authorization: Bearer your_access_token' \
  --header 'Content-Type: application/json' \
  --data '{
    "instanceId": "your-instance-id"
  }'

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.

If your request is successful, you will get a list of tasks. Your response will look like this:

{
  "tasks": [
    {
      "taskId": "abc123-task",
      "status": "PENDING",
      "type": "DocumentUpload",
      "title": "Upload ID Document"
    },
    {
      "taskId": "def456-task",
      "status": "COMPLETED",
      "type": "IdentityVerification",
      "title": "Verify Identity"
    }
  ]
}

Each task includes:

  • taskId – Unique identifier for the task
  • status – Current task status (e.g., PENDING, COMPLETED)
  • type – The module type (e.g., DocumentUpload, Biometric)
  • title – A display name for the task

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.

Next step

Go to Manage schemas to retrieve the required data structure for each task.