Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.go.gbgplc.com/llms.txt

Use this file to discover all available pages before exploring further.

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:
AreaV1V2
Base URLhttps://{region}.platform.go.gbgplc.com/captain/api/https://{region}.platform.go.gbgplc.com/v2/captain/
Data collectionTask-based: retrieve tasks, get schemas, submit task dataInteraction-based: fetch the current interaction, submit domain elements
AuthenticationSingle bearer token for all operationsSame bearer token model with POST /as/token.oauth2
Journey startReturns results synchronouslyReturns immediately with an instanceId; poll for results
Journey resultsResults nested under data.process.flow.${variantId}Structured context.process.steps[] array
Error format{ status, message, error }Structured errors[] array with code, name, problem, and action

Base URL changes

Update your API base URL from /captain/api/ to /v2/captain/:
VersionBase URL
V1https://{region}.platform.go.gbgplc.com/captain/api/
V2https://{region}.platform.go.gbgplc.com/v2/captain/
Regional endpoints remain the same:
RegionV2 base URL
EUhttps://eu.platform.go.gbgplc.com/v2/captain/
UShttps://us.platform.go.gbgplc.com/v2/captain/
AUhttps://au.platform.go.gbgplc.com/v2/captain/
The authentication endpoint is unchanged:
BASH
https://api.auth.gbgplc.com/as/token.oauth2

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.
DetailV1V2
EndpointPOST /as/token.oauth2POST /as/token.oauth2 (unchanged)
Grant typepasswordpassword (unchanged)
Token usageInclude in Authorization: Bearer headerInclude in Authorization: Bearer header (unchanged)
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:
EndpointMethodChange from v1
/journey/startPOSTReturns 201 with instanceId immediately (async). V1 returned results synchronously.
/journey/state/fetchPOSTResponse now uses context.process.steps[] instead of data.process.flow.${variantId}.

Interaction endpoints (replace task endpoints)

These endpoints replace the v1 task-based endpoints:
V2 endpointMethodDescription
/journey/interaction/fetchPOSTGet the current interaction, its pages, cards, and outstanding domain elements
/journey/interaction/submitPOSTSubmit domain elements for the current interaction

Deprecated v1 task endpoints

The following v1 task-based endpoints are deprecated in v2:
Deprecated endpointV2 replacementNotes
POST /journey/task/listPOST /journey/interaction/fetchReturns the current interaction instead of a list of tasks
POST /journey/task/updatePOST /journey/interaction/submitSubmits domain elements instead of task data
POST /journey/task/schemaPart of /journey/interaction/fetchSchema information is included in the interaction response
POST /journey/task/list/schemaPart of /journey/interaction/fetchSchema information is included in the interaction response
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

AspectV1 (tasks)V2 (interactions)
Active itemsMultiple tasks could be pendingOne interaction is active at a time
SchemaSeparate POST /journey/task/schema callIncluded in the /journey/interaction/fetch response (collects[], outstanding[], pages, and cards)
AdvancementExplicit task completion with "intent": "Complete"Automatic when all required domain elements are submitted
IdentifiertaskIdinteractionId
Auth tokenBearer tokenBearer token

Journey state response changes

The structure of the journey state response has changed significantly.

V1 response structure

Sample v1 response:
JSON
{
  "status": "Completed",
  "instanceId": "abc123",
  "metaData": {
    "createdTime": "2024-02-15T22:16:33.213Z",
    "completedTime": "2024-02-15T22:17:45.123Z"
  },
  "data": {
    "process": {
      "flow": {
        "variant-id-1": {
          "result": { ... },
          "subject": { ... }
        }
      }
    }
  }
}

V2 response structure

Sample v2 response:
JSON
{
  "instanceId": "P7U7Licy40cLZiENe8MrsL",
  "status": "Completed",
  "context": {
    "process": {
      "journey": {
        "name": "Journey Name",
        "startedAt": "2026-03-16T23:56:04.097Z",
        "id": "journey-id",
        "version": "version-id"
      },
      "instance": {
        "id": "P7U7Licy40cLZiENe8MrsL"
      },
      "steps": [
        {
          "advice": {
            "contains": {
              "nameAddress": 1,
              "nameDob": 1,
              "nameDobAddress": 1,
              "idNameAddress": 1,
              "idNameDob": 1,
              "idNameAddressDob": 1,
              "idName": 1,
              "sources": 1,
              "isUnder18": false,
              "customDecision": null,
              "gbgScore": 400
            }
          },
          "outcome": "Match"
        }
      ]
    },
    "subject": {},
    "result": {
      "status": "pending",
      "advice": {}
    }
  }
}
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
1. Authenticate           β†’ POST /as/token.oauth2
2. Start journey          β†’ POST /journey/start
3. Retrieve tasks         β†’ POST /journey/task/list
4. Retrieve task schema   β†’ POST /journey/task/schema
5. Submit task data       β†’ POST /journey/task/update
6. Fetch journey state    β†’ POST /journey/state/fetch

V2 execution flow

How v2 execution works:
STEPS
1. Authenticate           β†’ POST /as/token.oauth2
2. Start journey          β†’ POST /journey/start
3. Fetch interaction      β†’ POST /journey/interaction/fetch
4. Submit domain elements β†’ POST /journey/interaction/submit
5. Repeat steps 3–4 until the journey completes
6. Fetch journey state    β†’ POST /journey/state/fetch
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
curl --request POST \
  --url https://eu.platform.go.gbgplc.com/captain/api/journey/task/update \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "intent": "Complete",
    "instanceId": "your-instance-id",
    "taskId": "your-task-id",
    "context": {
      "subject": {
        "identity": {
          "firstName": "Jane",
          "lastNames": ["Doe"],
          "dateOfBirth": "1992-10-01"
        }
      }
    }
  }'

V2: Submit domain elements

Sample v2 request to submit domain elements:
cURL
curl --request POST \
  --url https://eu.platform.go.gbgplc.com/v2/captain/journey/interaction/submit \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "instanceId": "your-instance-id",
    "interactionId": "your-interaction-id",
    "participants": [
      { "domainElementId": "FullName" },
      { "domainElementId": "DateOfBirth" }
    ],
    "context": {
      "subject": {
        "identity": {
          "firstName": "Jane",
          "lastNames": ["Doe"],
          "dateOfBirth": "1992-10-01"
        }
      }
    }
  }'
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
{
  "status": 404,
  "message": "Not Found Error, validate resource Id",
  "error": "not-found-error"
}

V2 error format

How v2 errors are returned:
JSON
{
  "errors": [
    {
      "code": "4002",
      "name": "MISSING_FIELD",
      "location": "Body",
      "problem": "Either resourceId or deliveryId is required",
      "action": "Please provide resourceId (e.g., 'my-delivery@latest') or deliveryId"
    }
  ]
}
V2 error responses include a structured errors[] array. Each error contains:
FieldDescription
codeNumeric error code (as a string)
nameMachine-readable error identifier (for example, MISSING_FIELD)
locationWhere the error originated: Body, Authorization, Path, or Service
problemHuman-readable description of what went wrong
actionSuggested resolution
All responses include an X-Request-ID header that you can provide to GBG support for troubleshooting.

HTTP status codes

HTTP statusMeaningAction
200OKRequest successful.
201CreatedNew resource created successfully.
400Bad requestFix request data. Do not retry.
401UnauthorizedRefresh your token. Do not retry with the same token.
403ForbiddenCheck your account permissions. Do not retry.
404Not foundVerify the URL and resource ID.
405Method not allowedConfirm the correct HTTP method for the endpoint.
409ConflictThe domain element was already submitted. Do not retry.
500Internal server errorRetry with exponential backoff.
503Service unavailableRetry after a short delay.
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