What changed in v2
V2 introduces several improvements to how you integrate with GBG GO:What stays the same
Your data model and business logic do not change. Only the API integration layer changes. The following are unchanged between v1 and v2:- Prefill data: The
context.subjectstructure with identity fields is the same as v1. - Authentication provider: You continue to use the same bearer tokens from the same provider.
- Journey statuses: The
InProgress,Completed, andErrorstatuses are unchanged. - Module execution: The same verification modules run, such as document checks and face matching.
- Journey design: You continue to build journeys in the same GBG GO platform.
Base URL changes
Update your API base URL from/captain/api/ to /v2/captain/:
Authentication changes
The authentication method remains the same between v1 and v2. You continue to obtain a bearer token usingPOST /as/token.oauth2 with your client credentials.
Journey permissions
While your token and credentials do not change, your API client must have the journey permissions assigned before you migrate. These permissions cover starting a journey, reading journey state, and submitting journey data.401 or 403 error, even when your token is valid. Work with GBG to confirm your API client has the journey permissions before cutover.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:Journey start request changes
The journey start request changes in v2: you must specify a delivery type. You still identify the journey with aresourceId, the same as in v1.
Before you start a journey, make sure that:
- The journey is published: A business user must publish the journey in the GBG GO platform before you can start it, the same as in v1.
- The region matches: Send the start request to the base URL for the region where the journey is configured.
Identify the journey with resourceId
V2 identifies the journey with aresourceId in the id@version format, the same as v1, where the version is the published journey version. Use @latest to start the most recent published version.
Specify the delivery type
V2 requires thecontext.config.delivery field to tell the API how the journey is delivered. The field accepts one of two values:
api: Use this value when you drive the journey through API calls, without a hosted user interface.page: Use this value when the journey is delivered through hosted pages.
context.config.delivery, then the API rejects the request with a 400 error.
Sample v2 start request:
context.subject prefill structure is unchanged from v1. Only the resourceId and context.config.delivery fields differ.
The start request fields are:
Handle the asynchronous response
V1 supported both synchronous and asynchronous execution, selected with a config option. In synchronous mode, the start request waited while the journey was set up and returned results inline. V2 is asynchronous only. The start request returns immediately with aninstanceId, and modules run in the background.
Because processing continues after the response, you must poll for completion:
- Poll
POST /journey/state/fetchto check the journey status. Use a base interval of 10 seconds and apply backoff on errors. - Keep polling while the status is
InProgress. - Stop polling when the status changes to
CompletedorError, then read the results.
interaction/submit response confirms that the API accepted your data. It does not mean processing has finished. Modules continue to run in the background, so you must still poll state/fetch for the final result.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 specifictaskId:
- Call
POST /journey/task/listto get pending tasks. - Call
POST /journey/task/schemato get the required fields for each task. - Submit data to
POST /journey/task/updatewith thetaskIdand"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:
- Call
POST /journey/interaction/fetchto get the current interaction, its domain element requirements, and which elements are still outstanding. - Submit domain elements to
POST /journey/interaction/submitwith theinteractionIdand aparticipantsarray specifying which domain elements you are submitting. - The journey automatically advances to the next interaction when all required domain elements are submitted.
Interaction types
A v2 journey uses three types of interaction:- Start interaction: Validates the prefill data you send in the
POST /journey/startrequest. It has no user interface, so you do not fetch or submit it like a standard interaction. - Standard interaction: Collects domain elements, such as name and date of birth, through API calls.
- End interaction: Displays the outcome at the end of the journey. It collects no data.
Key differences
Prefill and submission behaviour
V2 changes how prefill data and partial submissions are handled:- Auto-advancement: If prefill provides all the data an interaction needs, then the interaction advances automatically without a submit. For a fully prefilled journey, modules can start immediately after
journey/start. - Partial submission: You can submit domain elements in pieces. The interaction stays active until you provide all required elements.
- Stricter validation: V2 validates prefill data for all delivery types. V1 only validated prefill for
pagedelivery. If prefill worked in v1 but fails in v2, then check the domain elements the journey collects.
- If a required domain element is missing, then the API rejects the whole submit with a
400error. - If an optional domain element is invalid, then the API silently strips it and the submit succeeds.
Why you poll for completion
Within each journey segment, modules run in parallel rather than one after another. For example, a document check, a face match, and an email check can all run at the same time after you submit the required data. The journey waits for all parallel modules in a segment to finish before it evaluates the outcome and advances. This is why you must pollstate/fetch: results are not returned inline, and you cannot know when every module has finished without checking the status.
Parallel processing is automatic. You do not configure it, and it makes v2 journeys faster than v1, which ran modules one after another.
Journey state response changes
The structure of the journey state response has changed significantly.V1 response structure
Sample v1 response:V2 response structure
Sample v2 response:- Read the overall journey outcome from the
context.process.resultobject. This is the recommended way to get results in v2. - Per-step detail is in
context.process.steps[]instead ofdata.process.flow.${variantId}. - Each step includes an
adviceobject with match scores and anoutcomefield. - Journey metadata (name, start time, ID, version) is available under
context.process.journey.
Execution flow comparison
Letβs compare the execution flow between v1 and v2:V1 execution flow
How v1 execution worked:V2 execution flow
How v2 execution works: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:V2: Submit domain elements
Sample v2 request to submit domain elements:- No
intentfield: V2 does not require"intent": "Complete". The journey advances automatically when all required domain elements are submitted. interactionIdreplacestaskId: Use the interaction identifier from the/journey/interaction/fetchresponse.participantsarray: V2 requires aparticipantsarray 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:V2 error format
How v2 errors are returned:errors[] array. Each error contains:
X-Request-ID header. This value identifies your specific request in GBGβs logs, so quote it when you contact GBG support about a failed request.
HTTP status codes
Common error codes
The following error codes appear most often during migration:Migration checklist
Before you change your integration, GBG completes these steps for you:- Assign journey permissions: GBG assigns the journey permissions to your API client.
- Prepare the journey: A business user creates a new v2 journey with interaction nodes and publishes it in the GBG GO platform. You cannot migrate an existing v1 journey to v2.
Update base URL
/captain/api/ to /v2/captain/. Update all regional endpoint references in your configuration.Verify authentication
POST /as/token.oauth2 with your existing credentials to obtain access tokens.Replace task endpoints with interaction endpoints
POST /journey/task/listβPOST /journey/interaction/fetchPOST /journey/task/updateβPOST /journey/interaction/submitPOST /journey/task/schemaβ included in the/journey/interaction/fetchresponse
Update data submission logic
"intent": "Complete" field from submit requests. Replace taskId with interactionId. Add the participants array to specify which domain elements you are submitting.Update the journey start request
resourceId in the id@version format, the same as v1. Add context.config.delivery, set to api for API-driven journeys or page for hosted journeys. Omitting the field returns a 400 error.Handle async journey start
/journey/start integration to handle the 201 response with instanceId. Poll POST /journey/state/fetch while the status is InProgress, and read the results when it changes to Completed or Error.Confirm your journey is ready
Retest your prefill data
Adopt the new state response format
context.process.steps[] array instead of data.process.flow.${variantId}.Update error handling
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.Test in your staging environment
FAQ
We rely on synchronous behaviour. What changes in v2?
We rely on synchronous behaviour. What changes in v2?
instanceId, and modules run in the background. You must add polling logic that calls POST /journey/state/fetch until the status changes to Completed or Error.Do we need a new token for v2?
Do we need a new token for v2?
401 or 403 error.Does our prefill data format change?
Does our prefill data format change?
context.subject structure is identical to v1. The only new field in the start request is context.config.delivery, which is now required.Our prefill worked in v1 but fails in v2. Why?
Our prefill worked in v1 but fails in v2. Why?
page delivery. Check the domain elements the journey collects to confirm your prefill data matches what the journey expects.Do I need interaction nodes in my journey?
Do I need interaction nodes in my journey?
Does v2 support the intent field, such as Save or Complete?
Does v2 support the intent field, such as Save or Complete?
Can we run v1 and v2 in parallel during cutover?
Can we run v1 and v2 in parallel during cutover?
Next steps
- Follow the API-first integration guide for step-by-step instructions on integrating with the v2 API.
- Follow the Hosted journey integration guide if you are using hosted journeys.
- Review the API reference for full endpoint details.
- See the User data input schema for the data model reference.
- See the Response advice schema for understanding journey results.
- See Error handling for error codes and troubleshooting.
- Contact support if you need help with your migration.