At any point during a journey, you can check the overall journey status and results. For Hosted journeys, your backend polls this endpoint to detect when the end user has completed the verification experience on the hosted pages.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.
What you need
Before sending the request, make sure you have:- Access token: Obtained in Step 1: Authenticate.
- Instance ID: The
instanceIdreturned when you started the journey.
Fetch journey state
Send aPOST request to the /journey/state/fetch endpoint:
BASH
Request body fields
| Field | Required | Description |
|---|---|---|
instanceId | Yes | The journey instance ID returned when you started the journey. |
Journey pending response:
If the end user has not yet completed the hosted journey, the response contains:JSON
Journey completed response:
Once the end user completes the hosted journey:JSON
Response fields
| Field | Description |
|---|---|
instanceId | The journey instance identifier. |
status | Current journey status: InProgress, Completed, or Failed. |
context.process.journey.name | The name of the journey. |
context.process.journey.startedAt | The ISO 8601 timestamp of when the journey started. |
context.process.journey.id | The internal journey definition identifier. |
context.process.journey.version | The version of the journey that was started. |
context.process.instance.id | The journey instance identifier (matches instanceId). |
context.process.steps | Array of steps executed so far. Empty while the journey is in progress. |
context.subject | The identity data collected during the journey. Empty object until the journey completes. |
context.result.status | The verification result status: pending, completed, or failed. |
context.result.advice | The verification advice returned on completion. Empty object until the journey completes. |
Journey lifecycle states
| Status | Description |
|---|---|
InProgress | The end user has not yet completed the hosted journey. Continue polling. |
Completed | The hosted journey has finished successfully. Verification results are available. |
Failed | The journey encountered an unrecoverable error during execution. |
Polling for completion
Poll the state fetch endpoint at regular intervals until the journey completes:- Begin polling after sharing the
instanceUrlwith the end user. - Stop polling when
statuschanges toCompletedorFailed.
Recommended polling settings
| Setting | Value | Description |
|---|---|---|
| Base interval | 10s | Time between polling calls. |
| Error backoff | +5s | Add 5 seconds per consecutive error. |
| Max error retries | 30 | Stop polling after 30 consecutive failures. |
| Reset on success | Yes | Revert to base interval after a successful fetch. |
| Stop condition | Status | Stop when journey status is no longer InProgress. |
Using webhooks as an alternative
Instead of polling, you can configure webhooks to receive real-time notifications when a journey completes or fails. This eliminates the need for repeated API calls and allows your backend to react immediately to status changes. To set up webhooks, refer to the Webhook module guide.Best practices
- Do not share your access token with the frontend. All polling should be done from your backend server.
- Handle the
Failedstatus gracefully. Inspect the response for error details and determine whether the journey should be retried or escalated.