Skip to content

Return the journey bundle information

Request

Return the journey bundle information which contains the list of journey versions

Security
TdApikeyAuth
Path
journeyBundleIdinteger, (int64)required

Journey Bundle ID

Query
checkOnDemandEligibilityboolean

If true, the response includes isEligibleForOnDemand, onDemandIneligibilityReason and parentSegmentLastRefreshedAt. When omitted or false, all three fields are absent from the response and no extra eligibility queries are issued.

curl -i -X GET \
  'https://api-cdp.treasuredata.com/entities/journey_bundles/{journeyBundleId}?checkOnDemandEligibility=true' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

Returns the list of the journeys

Bodyapplication/json
namestring

Name of the journey bundle

descriptionstring

Description of the journey bundle

latestJourneyIdany

Derived from the initial journey version name

lastVersionNumberinteger

The version number of the most recently created journey. If no journey has been created, this will be 0.

journeysArray of objects(JourneyJsonApiResource)
latestExecutionobject(Execution)

The most recent execution of the latest journey. If no executions have been created, this will be null.

parentSegmentLatestExecutionobject(Execution)

The most recent execution of the latest journey. If no executions have been created, this will be null.

isEligibleForOnDemandboolean

Whether the latest journey version may be triggered on demand. Clients must not recompute this from state, paused, latestJourneyId or priority-group membership. It is a necessary but not sufficient condition: true means none of the four conditions in onDemandIneligibilityReason apply, but POST /entities/journeys/{journeyId}/run may still reject the request with 409, so callers must handle that response rather than treating the button as guaranteed to succeed. Present only when checkOnDemandEligibility is true.

onDemandIneligibilityReasonstring or null

null if and only if isEligibleForOnDemand is true. When several conditions fail, the first in the order listed is returned; that order is part of the contract and follows the 422 guard order of POST /entities/journeys/{journeyId}/run. That run endpoint has two further guards this field deliberately does not evaluate, because each costs a workflow-engine round-trip and this is a GET: PARENT_SEGMENT_RUNNING and JOURNEY_WORKFLOW_RUNNING, both returned as 409. Neither value ever appears here. A journey bundle with no journey yet reports JOURNEY_NOT_ACTIVE rather than a dedicated code, so that "null if and only if eligible" holds; latestJourneyId is null in that case if you need to tell the two apart. Treat an unrecognised value as "ineligible, reason unknown" and render generic copy. Present only when checkOnDemandEligibility is true.

Enum:"JOURNEY_NOT_ACTIVE""PRIORITY_GROUP_JOURNEY_NOT_ELIGIBLE""NOT_LATEST_VERSION""PARENT_SEGMENT_NEVER_REFRESHED"
parentSegmentLastRefreshedAtstring or null

The parent segment's (audience's) matrix_updated_at formatted as ISO8601, or null if it has never been refreshed. Present only when checkOnDemandEligibility is true.

includedArray of any
Response
{ "name": "string", "description": "string", "latestJourneyId": null, "lastVersionNumber": 0, "journeys": [ { … } ], "latestExecution": { "workflowId": "string", "workflowSessionId": "string", "createdAt": "2019-08-24T14:15:22Z", "finishedAt": "2019-08-24T14:15:22Z", "status": "success", "workflowAttemptId": "string" }, "parentSegmentLatestExecution": { "workflowId": "string", "workflowSessionId": "string", "createdAt": "2019-08-24T14:15:22Z", "finishedAt": "2019-08-24T14:15:22Z", "status": "success", "workflowAttemptId": "string", "audienceId": "string" }, "isEligibleForOnDemand": true, "onDemandIneligibilityReason": "JOURNEY_NOT_ACTIVE", "parentSegmentLastRefreshedAt": "string", "included": [ { … } ] }