Before you start
Before running this quickstart, make sure you have:- A published journey with the journey resource ID and version number copied from the GBG GO dashboard.
-
An API client created in the Account management portal, which provides the credentials you use to authenticate:
client_id: Your unique API client identifier.client_secret: Your secret key for API authentication.
- A tool capable of making HTTP requests, for example, curl or Postman.
API client credentials are different from your GBG GO platform login. They are specifically for programmatic access.
Step 1: Set up your journey
Before making API calls, you need a published journey with the Age Verification module. Follow the steps in Option 2: Create a journey from scratch of the Platform quickstart to add the Age Verification module to your journey and publish it. Once your journey is published to preview, copy the Resource ID and version from the Dashboard. You need these to start the journey through the API.Step 2: Authenticate
Send aPOST request to get your Bearer token:
cURL
JSON
Authorization header.
Step 3: Start a journey
Use your access token, journey resource ID and version to start a journey instance. Setcontext.config.delivery to "api" for API-first journeys.
Non-prefill mode
Start with an emptysubject. The end user provides all data through interactions:
cURL
The
@5z6bj7o suffix in the resource ID represents the journey version. Replace it with your specific version for production integrations. Using @latest can introduce a small delay in processing. Usually less than 10 seconds.Partial pre-fill mode
If you already have some user data, include it incontext.subject. Remove the corresponding domain elements from the Interaction Group panel so the journey doesnโt collect them again:
cURL
instanceId:
JSON
Step 4: Fetch the interaction
Poll/journey/interaction/fetch to retrieve the current interaction and discover what data the end user must provide:
cURL
JSON
Response field reference
Response field reference
| Field | Description |
|---|---|
instanceId | Identifier for the journey instance created during journey start. |
interactionId | GRN of the current interaction. Use this when submitting data back to the platform. |
journey.status | Current status of the journey, for example, InProgress or Completed. |
interaction.grId | Fully qualified GRN of the interaction resource. |
interaction.resource | Metadata about the interaction, including its id, name, version, and type. |
interaction.resource.data.pages | Ordered list of pages the end user will see. Each page has an id, label, and a list of cards. |
interaction.resource.data.pages[].cards | Visual groupings of input fields shown on a page. Each card references a card definition by id, for example, NameCard or AddressCard, and can carry per-card config, such as supplier API keys. |
interaction.collects | Domain elements the interaction is configured to collect. Each entry has a ref, a spec (required or optional), and optionally a parentSpec. |
interaction.collects[].ref | Identifier for the domain element or granular domain element. Refs with a slash, for example, FullName/firstName, target a specific component of a larger element. |
interaction.collects[].spec | Whether this component is required or optional for the end user to provide. |
interaction.collects[].parentSpec | Present only when the parent element is itself optional. Indicates the whole group can be skipped, but if the end user engages with it, the componentโs spec still applies. |
interaction.consumes | Domain elements the interaction reads but does not collect. Empty when the interaction only collects data. |
outstanding | Domain elements that still need to be submitted before the journey can progress. Use this to decide what to ask the end user for next. |
Refs that contain a slash, for example,
FullName/firstName and MobilePhone/number, are granular domain elements. They request a specific component of a larger domain element instead of the whole thing. Use the spec field to see which components are required versus optional.If no
interactionId is returned yet, the platform is still processing. Keep polling until an interactionId appears or journey.status changes from InProgress.Step 5: Submit interaction data
Once youโve collected data from the end user, submit it using theinteractionId from the fetch response:
cURL
JSON
/journey/interaction/fetch again to get the next interaction or check if the journey is complete.
Step 6: Fetch journey state
Once all interactions are submitted, poll/journey/state/fetch to detect completion and retrieve verification results:
cURL
status is no longer InProgress:
JSON
status field, take appropriate actions:
| Status | Meaning |
|---|---|
InProgress | The journey is still active. Retrieve remaining tasks. |
Completed | The journey is done. No further action is needed. |
Failed | The journey encountered an error. Review previous steps or retry. |
Next steps
- API usage guides: detailed step-by-step reference for each API call.
- API reference: complete request and response definitions.
- Error handling: how to diagnose and resolve API errors.
- Investigate overview: review customer session results and submitted data in the GBG GO dashboard.