Skip to main content
This guide helps you migrate your existing GBG GO v1 API integration to v2. It covers what changed, how to update your API calls, and a step-by-step checklist to complete the migration.

What changed in v2

V2 introduces several improvements to how you integrate with GBG GO:

Base URL changes

Update your API base URL from /captain/api/ to /v2/captain/: Regional endpoints remain the same: The authentication endpoint is unchanged:
BASH

Authentication changes

The authentication method remains the same between v1 and v2. You continue to obtain a bearer token using POST /as/token.oauth2 with your client credentials. No changes are required to your authentication logic. Continue using the same credentials and token flow you already have in place. For reference, see the Authentication guide.

API endpoint changes

Here’s a summary of the key API endpoint changes you need to make in your integration:

Journey endpoints

These endpoints are available in both v1 and v2:

Interaction endpoints (replace task endpoints)

These endpoints replace the v1 task-based endpoints:

Deprecated v1 task endpoints

The following v1 task-based endpoints are deprecated in v2:
These task-based endpoints are deprecated and will be removed when v1 is decommissioned. Update your integration to use the v2 interaction endpoints before migration.

From tasks to interactions

The most significant change in v2 is the move from tasks to interactions.

How tasks worked in v1

In v1, you retrieved a list of tasks, fetched the schema for each task, and submitted data against a specific taskId:
  1. Call POST /journey/task/list to get pending tasks.
  2. Call POST /journey/task/schema to get the required fields for each task.
  3. Submit data to POST /journey/task/update with the taskId and "intent": "Complete".

How interactions work in v2

In v2, you work with one interaction at a time. Each interaction declares which domain elements it needs to collect, for example, FullName, DateOfBirth, CurrentAddress and includes its layout structure (pages and cards) directly in the response:
  1. Call POST /journey/interaction/fetch to get the current interaction, its domain element requirements, and which elements are still outstanding.
  2. Submit domain elements to POST /journey/interaction/submit with the interactionId and a participants array specifying which domain elements you are submitting.
  3. The journey automatically advances to the next interaction when all required domain elements are submitted.

Key differences

Journey state response changes

The structure of the journey state response has changed significantly.

V1 response structure

Sample v1 response:
JSON

V2 response structure

Sample v2 response:
JSON
What to update in your parsing logic:
  • Results are now in context.process.steps[] instead of data.process.flow.${variantId}.
  • Each step includes an advice object with match scores and an outcome field.
  • Journey metadata (name, start time, ID, version) is available under context.process.journey.
For the full response schema, see Response advice schema.

Execution flow comparison

Let’s compare the execution flow between v1 and v2:

V1 execution flow

How v1 execution worked:
STEPS

V2 execution flow

How v2 execution works:
STEPS
Steps 3 and 4 repeat for each interaction in the journey. The journey advances automatically when all required domain elements for the current interaction are submitted.

Data submission changes

The data submission process has changed from submitting task data to submitting domain elements for interactions.

V1: Submit task data

Sample v1 request to submit task data:
cURL

V2: Submit domain elements

Sample v2 request to submit domain elements:
cURL
Key differences:
  • No intent field: V2 does not require "intent": "Complete". The journey advances automatically when all required domain elements are submitted.
  • interactionId replaces taskId: Use the interaction identifier from the /journey/interaction/fetch response.
  • participants array: V2 requires a participants array that lists which domain elements you are submitting.
  • Base URL change: Note the updated base URL (/v2/captain/ instead of /captain/api/).

Error handling changes

V2 uses a standardised error response format across all endpoints.

V1 error format

How v1 errors were returned:
JSON

V2 error format

How v2 errors are returned:
JSON
V2 error responses include a structured errors[] array. Each error contains: All responses include an X-Request-ID header that you can provide to GBG support for troubleshooting.

HTTP status codes

For more details, see Error handling.

Migration checklist

Use this checklist to track your migration progress:
1

Update base URL

Change your API base URL from /captain/api/ to /v2/captain/. Update all regional endpoint references in your configuration.
2

Verify authentication

No changes are required. Continue using POST /as/token.oauth2 with your existing credentials to obtain access tokens.
3

Replace task endpoints with interaction endpoints

Replace your task-based API calls with the v2 interaction equivalents:
  • POST /journey/task/list β†’ POST /journey/interaction/fetch
  • POST /journey/task/update β†’ POST /journey/interaction/submit
  • POST /journey/task/schema β†’ included in the /journey/interaction/fetch response
4

Update data submission logic

Remove the "intent": "Complete" field from submit requests. Replace taskId with interactionId. Add the participants array to specify which domain elements you are submitting.
5

Handle async journey start

Update your /journey/start integration to handle the 201 response with instanceId. Use POST /journey/state/fetch to poll for journey completion.
6

Adopt the new state response format

Update your response parsing to use the context.process.steps[] array instead of data.process.flow.${variantId}.
7

Update error handling

Update your error parsing to handle the new errors[] array format with code, name, problem, action, and location fields. Handle the HTTP 409 status for duplicate domain element submissions. Use the X-Request-ID header when contacting GBG support.
8

Test in your staging environment

Validate your updated integration against the v2 API in a non-production environment before going live.

Next steps