Skip to main content

Journey API

Usageโ€‹

import { epilot } from '@epilot/sdk'

epilot.authorize(() => '<token>')
const { data } = await epilot.journey.getJourneysByOrgId(...)

Tree-shakeable importโ€‹

import { getClient, authorize } from '@epilot/sdk/journey'

const journeyClient = getClient()
authorize(journeyClient, () => '<token>')
const { data } = await journeyClient.getJourneysByOrgId(...)

Operationsโ€‹

Journeys

Journeys V2

Schemas

getJourneysByOrgIdโ€‹

Get all journeys by organization id

GET /v1/journey/organization/{id}

const { data } = await client.getJourneysByOrgId({
id: '123e4567-e89b-12d3-a456-426614174000',
hydrate: 'example',
})
Response
{}

getJourneyโ€‹

Get journey by id. Private journeys requires valid private token to be passed

GET /v1/journey/configuration/{id}

const { data } = await client.getJourney({
id: '123e4567-e89b-12d3-a456-426614174000',
source: 'example',
orgId: 'example',
})
Response
{
"journeyId": "string",
"organizationId": "string",
"brandId": "string",
"name": "string",
"steps": [
{
"showStepName": true,
"title": "string",
"subTitle": "string",
"showStepSubtitle": true,
"showStepper": true,
"showStepperLabels": true,
"hideNextButton": true,
"name": "string",
"stepId": "string",
"schema": {},
"uischema": {},
"maxWidth": "small"
}
],
"design": {
"logoUrl": "string",
"theme": {},
"designTokens": {}
},
"rules": [
{
"type": "inject",
"sourceType": "journey",
"source": "string",
"target": "string"
}
],
"logics": [
{
"autoGeneratedId": "string",
"conditions": ["string"],
"actions": ["string"]
}
],
"logicsV4": {},
"contextSchema": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "string",
"paramKey": "string",
"isRequired": true,
"shouldLoadEntity": true
}
],
"journey_type": "Sales template (Premium)",
"settings": {
"embedOptions": {
"mode": "full-screen",
"lang": "de",
"width": "string",
"topBar": true,
"scrollToTop": true,
"button": {}
},
"safeModeAutomation": true,
"canary": true,
"designId": "string",
"templateId": "string",
"entityId": "string",
"mappingsAutomationId": "string",
"targetedCustomer": "string",
"description": "string",
"organizationSettings": {},
"publicToken": "string",
"runtimeEntities": ["ORDER"],
"filePurposes": ["string"],
"entityTags": ["string"],
"addressSuggestionsFileUrl": "string",
"addressSuggestionsFileId": "string",
"useNewDesign": true,
"useAustrianLabels": true,
"enableDarkMode": true,
"accessMode": "PUBLIC",
"isPublished": true,
"status": "string",
"isActive": true,
"savingProgress": {
"savingMode": "auto",
"supportedVersion": 0
},
"thirdPartyCookies": true
},
"validationRules": {
"block1": "rule123",
"block2": {
"field1": "rule456",
"field2": "rule789"
}
},
"createdBy": "string",
"updatedBy": "string",
"__lastModifiedAt": "string",
"createdAt": "string",
"lastModifiedAt": "string",
"deletedAt": "string",
"version": 0,
"revisions": 0,
"featureFlags": {}
}

removeJourneyโ€‹

Remove journey by id

DELETE /v1/journey/configuration/{id}

const { data } = await client.removeJourney({
id: '123e4567-e89b-12d3-a456-426614174000',
})

getJourneyProductsโ€‹

Get products available in the journey by id. requires public journey token to be passed.

GET /v1/journey/products/{id}

const { data } = await client.getJourneyProducts({
id: '123e4567-e89b-12d3-a456-426614174000',
source: 'example',
postal_code: 'example',
city: 'example',
street: 'example',
street_number: 'example',
})
Response
[
{
"type": "string",
"_schema": "string",
"_title": "string",
"name": "string",
"_id": "string",
"_org": "string",
"code": "string",
"description": "string",
"feature": [],
"product_images": [],
"legal_footnote": "string",
"product_downloads": [],
"price": {}
}
]

createJourneyโ€‹

Create a Journey

POST /v1/journey/configuration

const { data } = await client.createJourney(
{
skipAutomation: 'example',
},
{
journeyId: 'string',
organizationId: 'string',
brandId: 'string',
name: 'string',
steps: [
{
showStepName: true,
title: 'string',
subTitle: 'string',
showStepSubtitle: true,
showStepper: true,
showStepperLabels: true,
hideNextButton: true,
name: 'string',
stepId: 'string',
schema: {},
uischema: {},
maxWidth: 'small'
}
],
design: {
logoUrl: 'string',
theme: {},
designTokens: {}
},
rules: [
{
type: 'inject',
sourceType: 'journey',
source: 'string',
target: 'string'
}
],
logics: [
{
autoGeneratedId: 'string',
conditions: ['string'],
actions: ['string']
}
],
logicsV4: {},
contextSchema: [
{
id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
type: 'string',
paramKey: 'string',
isRequired: true,
shouldLoadEntity: true
}
],
journey_type: 'Sales template (Premium)',
settings: {
embedOptions: {
mode: 'full-screen',
lang: 'de',
width: 'string',
topBar: true,
scrollToTop: true,
button: { /* ... */ }
},
safeModeAutomation: true,
canary: true,
designId: 'string',
templateId: 'string',
entityId: 'string',
mappingsAutomationId: 'string',
targetedCustomer: 'string',
description: 'string',
organizationSettings: {},
publicToken: 'string',
runtimeEntities: ['ORDER'],
filePurposes: ['string'],
entityTags: ['string'],
addressSuggestionsFileUrl: 'string',
addressSuggestionsFileId: 'string',
useNewDesign: true,
useAustrianLabels: true,
enableDarkMode: true,
accessMode: 'PUBLIC',
isPublished: true,
status: 'string',
isActive: true,
savingProgress: {
savingMode: 'auto',
supportedVersion: 0
},
thirdPartyCookies: true
},
validationRules: {
block1: 'rule123',
block2: {
field1: 'rule456',
field2: 'rule789'
}
},
createdBy: 'string',
updatedBy: 'string',
__lastModifiedAt: 'string'
},
)
Response
{
"journeyId": "string",
"organizationId": "string",
"brandId": "string",
"name": "string",
"steps": [
{
"showStepName": true,
"title": "string",
"subTitle": "string",
"showStepSubtitle": true,
"showStepper": true,
"showStepperLabels": true,
"hideNextButton": true,
"name": "string",
"stepId": "string",
"schema": {},
"uischema": {},
"maxWidth": "small"
}
],
"design": {
"logoUrl": "string",
"theme": {},
"designTokens": {}
},
"rules": [
{
"type": "inject",
"sourceType": "journey",
"source": "string",
"target": "string"
}
],
"logics": [
{
"autoGeneratedId": "string",
"conditions": ["string"],
"actions": ["string"]
}
],
"logicsV4": {},
"contextSchema": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "string",
"paramKey": "string",
"isRequired": true,
"shouldLoadEntity": true
}
],
"journey_type": "Sales template (Premium)",
"settings": {
"embedOptions": {
"mode": "full-screen",
"lang": "de",
"width": "string",
"topBar": true,
"scrollToTop": true,
"button": {}
},
"safeModeAutomation": true,
"canary": true,
"designId": "string",
"templateId": "string",
"entityId": "string",
"mappingsAutomationId": "string",
"targetedCustomer": "string",
"description": "string",
"organizationSettings": {},
"publicToken": "string",
"runtimeEntities": ["ORDER"],
"filePurposes": ["string"],
"entityTags": ["string"],
"addressSuggestionsFileUrl": "string",
"addressSuggestionsFileId": "string",
"useNewDesign": true,
"useAustrianLabels": true,
"enableDarkMode": true,
"accessMode": "PUBLIC",
"isPublished": true,
"status": "string",
"isActive": true,
"savingProgress": {
"savingMode": "auto",
"supportedVersion": 0
},
"thirdPartyCookies": true
},
"validationRules": {
"block1": "rule123",
"block2": {
"field1": "rule456",
"field2": "rule789"
}
},
"createdBy": "string",
"updatedBy": "string",
"__lastModifiedAt": "string",
"createdAt": "string",
"lastModifiedAt": "string",
"deletedAt": "string",
"version": 0,
"revisions": 0,
"featureFlags": {}
}

updateJourneyโ€‹

Update a Journey

PUT /v1/journey/configuration

const { data } = await client.updateJourney(
null,
{
journeyId: 'string',
organizationId: 'string',
brandId: 'string',
name: 'string',
steps: [
{
showStepName: true,
title: 'string',
subTitle: 'string',
showStepSubtitle: true,
showStepper: true,
showStepperLabels: true,
hideNextButton: true,
name: 'string',
stepId: 'string',
schema: {},
uischema: {},
maxWidth: 'small'
}
],
design: {
logoUrl: 'string',
theme: {},
designTokens: {}
},
rules: [
{
type: 'inject',
sourceType: 'journey',
source: 'string',
target: 'string'
}
],
logics: [
{
autoGeneratedId: 'string',
conditions: ['string'],
actions: ['string']
}
],
logicsV4: {},
contextSchema: [
{
id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
type: 'string',
paramKey: 'string',
isRequired: true,
shouldLoadEntity: true
}
],
journey_type: 'Sales template (Premium)',
settings: {
embedOptions: {
mode: 'full-screen',
lang: 'de',
width: 'string',
topBar: true,
scrollToTop: true,
button: { /* ... */ }
},
safeModeAutomation: true,
canary: true,
designId: 'string',
templateId: 'string',
entityId: 'string',
mappingsAutomationId: 'string',
targetedCustomer: 'string',
description: 'string',
organizationSettings: {},
publicToken: 'string',
runtimeEntities: ['ORDER'],
filePurposes: ['string'],
entityTags: ['string'],
addressSuggestionsFileUrl: 'string',
addressSuggestionsFileId: 'string',
useNewDesign: true,
useAustrianLabels: true,
enableDarkMode: true,
accessMode: 'PUBLIC',
isPublished: true,
status: 'string',
isActive: true,
savingProgress: {
savingMode: 'auto',
supportedVersion: 0
},
thirdPartyCookies: true
},
validationRules: {
block1: 'rule123',
block2: {
field1: 'rule456',
field2: 'rule789'
}
},
createdBy: 'string',
updatedBy: 'string',
__lastModifiedAt: 'string'
},
)

patchUpdateJourneyโ€‹

Update a Journey (partially / patch). Support for nested properties updates (e.g. "property[0].name").

PATCH /v1/journey/configuration

const { data } = await client.patchUpdateJourney(
null,
{
journeyId: '509cdffe-424f-457a-95c2-9708c304ce77',
__lastModifiedAt: 'string'
},
)
Response
{
"createdJourney": {
"journeyId": "string",
"organizationId": "string",
"brandId": "string",
"name": "string",
"steps": [
{}
],
"design": {
"logoUrl": "string",
"theme": {},
"designTokens": {}
},
"rules": [
{}
],
"logics": [
{}
],
"logicsV4": {},
"contextSchema": [
{}
],
"journey_type": "Sales template (Premium)",
"settings": {
"embedOptions": {},
"safeModeAutomation": true,
"canary": true,
"designId": "string",
"templateId": "string",
"entityId": "string",
"mappingsAutomationId": "string",
"targetedCustomer": "string",
"description": "string",
"organizationSettings": {},
"publicToken": "string",
"runtimeEntities": ["ORDER"],
"filePurposes": ["string"],
"entityTags": ["string"],
"addressSuggestionsFileUrl": "string",
"addressSuggestionsFileId": "string",
"useNewDesign": true,
"useAustrianLabels": true,
"enableDarkMode": true,
"accessMode": "PUBLIC",
"isPublished": true,
"status": "string",
"isActive": true,
"savingProgress": {},
"thirdPartyCookies": true
},
"validationRules": {
"block1": "rule123",
"block2": {}
},
"createdBy": "string",
"updatedBy": "string",
"__lastModifiedAt": "string",
"createdAt": "string",
"lastModifiedAt": "string",
"deletedAt": "string",
"version": 0,
"revisions": 0,
"featureFlags": {}
}
}

searchJourneysโ€‹

Search Journeys

POST /v1/journey/configuration/search

const { data } = await client.searchJourneys(
null,
{
q: '_tags:*Flex*',
from: 0,
size: 25,
sort: '_created_at:desc'
},
)
Response
{
"hits": 1,
"results": [
{
"_id": "e0f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8",
"_schema": "journey",
"_title": "Journey Entity Title",
"_org": "739224",
"_created_at": "2020-01-01T00:00:00.000Z",
"_updated_at": "2020-01-01T00:00:00.000Z",
"_tags": ["Flex"],
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
"journey_name": "Journey Name",
"journey_id": "de7df470-253e-11ed-9174-116b8a718c0a",
"journey_type": "Sales template",
"design": "Design EPILOT",
"created_by": [
{
"id": "12345"
}
],
"journey_version": "Flex"
}
]
}

generateDocumentโ€‹

Builds document generated from a template with journey values."

POST /v1/journey/document:generate

const { data } = await client.generateDocument(
null,
{
file_id: '1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p',
context_data: {
additionalProperties: 'string'
},
language: 'de'
},
)
Response
{
"job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"job_status": "STARTED",
"message": "string",
"pdf_output": {
"preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.pdf",
"output_document": {
"s3ref": {
"bucket": "document-api-preview-prod",
"key": "preview/my-template.pdf"
}
}
},
"docx_output": {
"preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.docx",
"output_document": {
"s3ref": {
"bucket": "document-api-preview-prod",
"key": "preview/my-template.docx"
}
}
},
"variable_payload": {
"additionalProperties": "string"
},
"template_settings": {
"custom_margins": {
"top": 2.54,
"bottom": 2.54
},
"suggested_margins": {
"top": 2.54,
"bottom": 2.54
},
"display_margin_guidelines": true,
"enable_data_table_margin_autofix": false,
"template_with_datatable": false,
"enabled_template_settings_persistence": false,
"misconfigured_margins": false,
"file_entity_id": "1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p"
}
}

createJourneyV2โ€‹

Create a Journey

POST /v2/journey/configuration

const { data } = await client.createJourneyV2(
{
skipAutomation: 'example',
},
{
journeyId: 'string',
brandId: 'string',
name: 'string',
steps: [
{
showStepName: true,
title: 'string',
subTitle: 'string',
showStepSubtitle: true,
showStepper: true,
showStepperLabels: true,
hideNextButton: true,
name: 'string',
stepId: 'string',
schema: {},
uischema: {},
maxWidth: 'small'
}
],
design: {
logoUrl: 'string',
theme: {},
designTokens: {}
},
rules: [
{
type: 'inject',
sourceType: 'journey',
source: 'string',
target: 'string'
}
],
logics: [
{
autoGeneratedId: 'string',
conditions: ['string'],
actions: ['string']
}
],
logicsV4: {},
contextSchema: [
{
id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
type: 'string',
paramKey: 'string',
isRequired: true,
shouldLoadEntity: true
}
],
journey_type: 'Sales template (Premium)',
settings: {
embedOptions: {
mode: 'full-screen',
lang: 'de',
width: 'string',
topBar: true,
scrollToTop: true,
button: {
text: 'string',
align: 'left'
}
},
safeModeAutomation: true,
designId: 'string',
entityId: 'string',
mappingsAutomationId: 'string',
templateId: 'string',
targetedCustomer: 'string',
description: 'string',
publicToken: 'string',
runtimeEntities: ['ORDER'],
filePurposes: ['string'],
entityTags: ['string'],
addressSuggestionsFileUrl: 'string',
addressSuggestionsFileId: 'string',
useNewDesign: true,
thirdPartyCookies: true,
accessMode: 'PUBLIC',
enableDarkMode: true
},
validationRules: {
block1: 'rule123',
block2: {
field1: 'rule456',
field2: 'rule789'
}
},
_manifest: ['123e4567-e89b-12d3-a456-426614174000']
},
)
Response
{
"journeyId": "string",
"brandId": "string",
"name": "string",
"steps": [
{
"showStepName": true,
"title": "string",
"subTitle": "string",
"showStepSubtitle": true,
"showStepper": true,
"showStepperLabels": true,
"hideNextButton": true,
"name": "string",
"stepId": "string",
"schema": {},
"uischema": {},
"maxWidth": "small"
}
],
"design": {
"logoUrl": "string",
"theme": {},
"designTokens": {}
},
"rules": [
{
"type": "inject",
"sourceType": "journey",
"source": "string",
"target": "string"
}
],
"logics": [
{
"autoGeneratedId": "string",
"conditions": ["string"],
"actions": ["string"]
}
],
"logicsV4": {},
"contextSchema": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "string",
"paramKey": "string",
"isRequired": true,
"shouldLoadEntity": true
}
],
"journey_type": "Sales template (Premium)",
"settings": {
"embedOptions": {
"mode": "full-screen",
"lang": "de",
"width": "string",
"topBar": true,
"scrollToTop": true,
"button": {
"text": "string",
"align": "left"
}
},
"safeModeAutomation": true,
"designId": "string",
"entityId": "string",
"mappingsAutomationId": "string",
"templateId": "string",
"targetedCustomer": "string",
"description": "string",
"publicToken": "string",
"runtimeEntities": ["ORDER"],
"filePurposes": ["string"],
"entityTags": ["string"],
"addressSuggestionsFileUrl": "string",
"addressSuggestionsFileId": "string",
"useNewDesign": true,
"thirdPartyCookies": true,
"accessMode": "PUBLIC",
"enableDarkMode": true
},
"validationRules": {
"block1": "rule123",
"block2": {
"field1": "rule456",
"field2": "rule789"
}
},
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"]
}

updateJourneyV2โ€‹

Update a Journey

PUT /v2/journey/configuration

const { data } = await client.updateJourneyV2(
null,
{
journeyId: 'string',
brandId: 'string',
name: 'string',
steps: [
{
showStepName: true,
title: 'string',
subTitle: 'string',
showStepSubtitle: true,
showStepper: true,
showStepperLabels: true,
hideNextButton: true,
name: 'string',
stepId: 'string',
schema: {},
uischema: {},
maxWidth: 'small'
}
],
design: {
logoUrl: 'string',
theme: {},
designTokens: {}
},
rules: [
{
type: 'inject',
sourceType: 'journey',
source: 'string',
target: 'string'
}
],
logics: [
{
autoGeneratedId: 'string',
conditions: ['string'],
actions: ['string']
}
],
logicsV4: {},
contextSchema: [
{
id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
type: 'string',
paramKey: 'string',
isRequired: true,
shouldLoadEntity: true
}
],
journey_type: 'Sales template (Premium)',
settings: {
embedOptions: {
mode: 'full-screen',
lang: 'de',
width: 'string',
topBar: true,
scrollToTop: true,
button: {
text: 'string',
align: 'left'
}
},
safeModeAutomation: true,
designId: 'string',
entityId: 'string',
mappingsAutomationId: 'string',
templateId: 'string',
targetedCustomer: 'string',
description: 'string',
publicToken: 'string',
runtimeEntities: ['ORDER'],
filePurposes: ['string'],
entityTags: ['string'],
addressSuggestionsFileUrl: 'string',
addressSuggestionsFileId: 'string',
useNewDesign: true,
thirdPartyCookies: true,
accessMode: 'PUBLIC',
enableDarkMode: true
},
validationRules: {
block1: 'rule123',
block2: {
field1: 'rule456',
field2: 'rule789'
}
},
_manifest: ['123e4567-e89b-12d3-a456-426614174000']
},
)
Response
{
"journeyId": "string",
"brandId": "string",
"name": "string",
"steps": [
{
"showStepName": true,
"title": "string",
"subTitle": "string",
"showStepSubtitle": true,
"showStepper": true,
"showStepperLabels": true,
"hideNextButton": true,
"name": "string",
"stepId": "string",
"schema": {},
"uischema": {},
"maxWidth": "small"
}
],
"design": {
"logoUrl": "string",
"theme": {},
"designTokens": {}
},
"rules": [
{
"type": "inject",
"sourceType": "journey",
"source": "string",
"target": "string"
}
],
"logics": [
{
"autoGeneratedId": "string",
"conditions": ["string"],
"actions": ["string"]
}
],
"logicsV4": {},
"contextSchema": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "string",
"paramKey": "string",
"isRequired": true,
"shouldLoadEntity": true
}
],
"journey_type": "Sales template (Premium)",
"settings": {
"embedOptions": {
"mode": "full-screen",
"lang": "de",
"width": "string",
"topBar": true,
"scrollToTop": true,
"button": {
"text": "string",
"align": "left"
}
},
"safeModeAutomation": true,
"designId": "string",
"entityId": "string",
"mappingsAutomationId": "string",
"templateId": "string",
"targetedCustomer": "string",
"description": "string",
"publicToken": "string",
"runtimeEntities": ["ORDER"],
"filePurposes": ["string"],
"entityTags": ["string"],
"addressSuggestionsFileUrl": "string",
"addressSuggestionsFileId": "string",
"useNewDesign": true,
"thirdPartyCookies": true,
"accessMode": "PUBLIC",
"enableDarkMode": true
},
"validationRules": {
"block1": "rule123",
"block2": {
"field1": "rule456",
"field2": "rule789"
}
},
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"]
}

patchUpdateJourneyV2โ€‹

Update a Journey (partially / patch). Support for nested properties updates (e.g. "property[0].name").

PATCH /v2/journey/configuration

const { data } = await client.patchUpdateJourneyV2(
null,
{
journeyId: '509cdffe-424f-457a-95c2-9708c304ce77',
__lastModifiedAt: 'string'
},
)
Response
{
"journeyId": "string",
"brandId": "string",
"name": "string",
"steps": [
{
"showStepName": true,
"title": "string",
"subTitle": "string",
"showStepSubtitle": true,
"showStepper": true,
"showStepperLabels": true,
"hideNextButton": true,
"name": "string",
"stepId": "string",
"schema": {},
"uischema": {},
"maxWidth": "small"
}
],
"design": {
"logoUrl": "string",
"theme": {},
"designTokens": {}
},
"rules": [
{
"type": "inject",
"sourceType": "journey",
"source": "string",
"target": "string"
}
],
"logics": [
{
"autoGeneratedId": "string",
"conditions": ["string"],
"actions": ["string"]
}
],
"logicsV4": {},
"contextSchema": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "string",
"paramKey": "string",
"isRequired": true,
"shouldLoadEntity": true
}
],
"journey_type": "Sales template (Premium)",
"settings": {
"embedOptions": {
"mode": "full-screen",
"lang": "de",
"width": "string",
"topBar": true,
"scrollToTop": true,
"button": {
"text": "string",
"align": "left"
}
},
"safeModeAutomation": true,
"designId": "string",
"entityId": "string",
"mappingsAutomationId": "string",
"templateId": "string",
"targetedCustomer": "string",
"description": "string",
"publicToken": "string",
"runtimeEntities": ["ORDER"],
"filePurposes": ["string"],
"entityTags": ["string"],
"addressSuggestionsFileUrl": "string",
"addressSuggestionsFileId": "string",
"useNewDesign": true,
"thirdPartyCookies": true,
"accessMode": "PUBLIC",
"enableDarkMode": true
},
"validationRules": {
"block1": "rule123",
"block2": {
"field1": "rule456",
"field2": "rule789"
}
},
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"]
}

getJourneyV2โ€‹

Get journey by id

GET /v2/journey/configuration/{id}

const { data } = await client.getJourneyV2({
id: '123e4567-e89b-12d3-a456-426614174000',
})
Response
{
"journeyId": "string",
"brandId": "string",
"name": "string",
"steps": [
{
"showStepName": true,
"title": "string",
"subTitle": "string",
"showStepSubtitle": true,
"showStepper": true,
"showStepperLabels": true,
"hideNextButton": true,
"name": "string",
"stepId": "string",
"schema": {},
"uischema": {},
"maxWidth": "small"
}
],
"design": {
"logoUrl": "string",
"theme": {},
"designTokens": {}
},
"rules": [
{
"type": "inject",
"sourceType": "journey",
"source": "string",
"target": "string"
}
],
"logics": [
{
"autoGeneratedId": "string",
"conditions": ["string"],
"actions": ["string"]
}
],
"logicsV4": {},
"contextSchema": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "string",
"paramKey": "string",
"isRequired": true,
"shouldLoadEntity": true
}
],
"journey_type": "Sales template (Premium)",
"settings": {
"embedOptions": {
"mode": "full-screen",
"lang": "de",
"width": "string",
"topBar": true,
"scrollToTop": true,
"button": {
"text": "string",
"align": "left"
}
},
"safeModeAutomation": true,
"designId": "string",
"entityId": "string",
"mappingsAutomationId": "string",
"templateId": "string",
"targetedCustomer": "string",
"description": "string",
"publicToken": "string",
"runtimeEntities": ["ORDER"],
"filePurposes": ["string"],
"entityTags": ["string"],
"addressSuggestionsFileUrl": "string",
"addressSuggestionsFileId": "string",
"useNewDesign": true,
"thirdPartyCookies": true,
"accessMode": "PUBLIC",
"enableDarkMode": true
},
"validationRules": {
"block1": "rule123",
"block2": {
"field1": "rule456",
"field2": "rule789"
}
},
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"]
}

removeJourneyV2โ€‹

Remove journey by id

DELETE /v2/journey/configuration/{id}

const { data } = await client.removeJourneyV2({
id: '123e4567-e89b-12d3-a456-426614174000',
})

getSettingsForJourneyโ€‹

Get settings related to the journey using journey ID.

GET /v1/journey/{id}/settings

const { data } = await client.getSettingsForJourney({
id: '123e4567-e89b-12d3-a456-426614174000',
})
Response
{
"organizationId": "739224",
"canary": true,
"thirdPartyCookies": true
}

getButtonOptionsโ€‹

Get button options from a csv file.

GET /v1/journey/button-options

const { data } = await client.getButtonOptions({
fileId: 'example',
})
Response
[
{
"value": "Button Hidden Value",
"label": "Button Label"
}
]

Schemasโ€‹

GetJourneysResponseโ€‹

type GetJourneysResponse = object

JourneyResponseโ€‹

type JourneyResponse = {
createdJourney?: {
journeyId?: string
organizationId: string
brandId?: string
name: string
steps: Array<{
showStepName?: { ... }
title?: { ... }
subTitle?: { ... }
showStepSubtitle?: { ... }
showStepper?: { ... }
showStepperLabels?: { ... }
hideNextButton?: { ... }
name: { ... }
stepId?: { ... }
schema: { ... }
uischema: { ... }
maxWidth?: { ... }
}>
design?: {
logoUrl?: { ... }
theme?: { ... }
designTokens?: { ... }
}
rules?: Array<{
type: { ... }
sourceType: { ... }
source: { ... }
target: { ... }
}>
logics?: Array<{
autoGeneratedId?: { ... }
conditions: { ... }
actions: { ... }
}>
logicsV4?: Record<string, {
id?: { ... }
protected?: { ... }
action?: { ... }
triggeredOn?: { ... }
conditions?: { ... }
settings?: { ... }
}>
contextSchema?: Array<{
id?: { ... }
type: { ... }
paramKey: { ... }
isRequired?: { ... }
shouldLoadEntity?: { ... }
}>
journey_type?: string
settings?: {
embedOptions?: { ... }
safeModeAutomation?: { ... }
canary?: { ... }
designId: { ... }
templateId?: { ... }
entityId?: { ... }
mappingsAutomationId?: { ... }
targetedCustomer?: { ... }
description?: { ... }
organizationSettings?: { ... }
publicToken?: { ... }
runtimeEntities?: { ... }
filePurposes?: { ... }
entityTags?: { ... }
addressSuggestionsFileUrl?: { ... }
addressSuggestionsFileId?: { ... }
useNewDesign?: { ... }
useAustrianLabels?: { ... }
enableDarkMode?: { ... }
accessMode?: { ... }
isPublished?: { ... }
status?: { ... }
isActive?: { ... }
savingProgress?: { ... }
thirdPartyCookies?: { ... }
}
validationRules?: Record<string, string | Record<string, string>>
createdBy?: string
updatedBy?: string
__lastModifiedAt?: string
createdAt: string
lastModifiedAt: string
deletedAt?: string
version: number
revisions: number
featureFlags?: Record<string, unknown>
}
}

JourneyProductsResponseโ€‹

type JourneyProductsResponse = Array<{
type?: string
_schema?: string
_title?: string
name?: string
_id?: string
_org?: string
code?: string
description?: string
feature?: unknown[]
product_images?: unknown[]
legal_footnote?: string
product_downloads?: unknown[]
price?: object
}>

PatchUpdateJourneyRequestโ€‹

Patch request to update a journey (journey id is required) Support for nested properties (e.g. steps[0].uischema.elements[0].products) is supported.

type PatchUpdateJourneyRequest = {
journeyId: string // uuid
__lastModifiedAt?: string
}

JourneyCreationRequestโ€‹

type JourneyCreationRequest = {
journeyId?: string
organizationId: string
brandId?: string
name: string
steps: Array<{
showStepName?: boolean
title?: string
subTitle?: string
showStepSubtitle?: boolean
showStepper?: boolean
showStepperLabels?: boolean
hideNextButton?: boolean
name: string
stepId?: string
schema: unknown
uischema: unknown
maxWidth?: "small" | "medium" | "large" | "extra large"
}>
design?: {
logoUrl?: string
theme?: Record<string, unknown>
designTokens?: object
}
rules?: Array<{
type: "inject" | "injectWithKey"
sourceType: "journey" | "step" | "block"
source: string
target: string
}>
logics?: Array<{
autoGeneratedId?: string
conditions: string[]
actions: string[]
}>
logicsV4?: Record<string, {
id?: string // uuid
protected?: boolean
action?: string
triggeredOn?: string
conditions?: Array<Array<{
operator?: { ... }
functionName?: { ... }
fact?: { ... }
value?: { ... }
args?: { ... }
}>>
settings?: object
}>
contextSchema?: Array<{
id?: string // uuid
type: string
paramKey: string
isRequired?: boolean
shouldLoadEntity?: boolean
}>
journey_type?: string
settings?: {
embedOptions?: {
mode?: { ... }
lang?: { ... }
width?: { ... }
topBar?: { ... }
scrollToTop?: { ... }
button?: { ... }
}
safeModeAutomation?: boolean
canary?: boolean
designId: string
templateId?: string
entityId?: string
mappingsAutomationId?: string
targetedCustomer?: string
description?: string
organizationSettings?: Record<string, boolean>
publicToken?: string
runtimeEntities?: "ORDER" | "OPPORTUNITY"[]
filePurposes?: string[]
entityTags?: string[]
addressSuggestionsFileUrl?: string
addressSuggestionsFileId?: string
useNewDesign?: boolean
useAustrianLabels?: boolean
enableDarkMode?: boolean
accessMode?: "PUBLIC" | "PRIVATE"
isPublished?: boolean
status?: string
isActive?: boolean
savingProgress?: {
savingMode?: { ... }
supportedVersion?: { ... }
}
thirdPartyCookies?: boolean
}
validationRules?: Record<string, string | Record<string, string>>
createdBy?: string
updatedBy?: string
__lastModifiedAt?: string
}

JourneyCreationRequestV2โ€‹

type JourneyCreationRequestV2 = {
journeyId?: string
brandId?: string
name: string
steps: Array<{
showStepName?: boolean
title?: string
subTitle?: string
showStepSubtitle?: boolean
showStepper?: boolean
showStepperLabels?: boolean
hideNextButton?: boolean
name: string
stepId?: string
schema: unknown
uischema: unknown
maxWidth?: "small" | "medium" | "large" | "extra large"
}>
design?: {
logoUrl?: string
theme?: Record<string, unknown>
designTokens?: object
}
rules?: Array<{
type: "inject" | "injectWithKey"
sourceType: "journey" | "step" | "block"
source: string
target: string
}>
logics?: Array<{
autoGeneratedId?: string
conditions: string[]
actions: string[]
}>
logicsV4?: Record<string, {
id?: string // uuid
protected?: boolean
action?: string
triggeredOn?: string
conditions?: Array<Array<{
operator?: { ... }
functionName?: { ... }
fact?: { ... }
value?: { ... }
args?: { ... }
}>>
settings?: object
}>
contextSchema?: Array<{
id?: string // uuid
type: string
paramKey: string
isRequired?: boolean
shouldLoadEntity?: boolean
}>
journey_type?: string
settings?: {
embedOptions?: {
mode?: { ... }
lang?: { ... }
width?: { ... }
topBar?: { ... }
scrollToTop?: { ... }
button?: { ... }
}
safeModeAutomation?: boolean
designId?: string
entityId?: string
mappingsAutomationId?: string
templateId?: string
targetedCustomer?: string
description?: string
publicToken?: string
runtimeEntities?: "ORDER" | "OPPORTUNITY"[]
filePurposes?: string[]
entityTags?: string[]
addressSuggestionsFileUrl?: string
addressSuggestionsFileId?: string
useNewDesign?: boolean
thirdPartyCookies?: boolean
accessMode?: "PUBLIC" | "PRIVATE"
enableDarkMode?: boolean
}
validationRules?: Record<string, string | Record<string, string>>
_manifest?: string // uuid[]
}

SearchJourneysQueryRequestโ€‹

type SearchJourneysQueryRequest = {
q?: string
from?: number
size?: number
sort?: string
}

SearchJourneysResponseโ€‹

type SearchJourneysResponse = {
hits?: number
results?: Array<{
_id?: string // uuid
_schema?: string
_title?: string
_org?: string
_created_at?: string // date-time
_updated_at?: string // date-time
_tags?: string[]
_manifest?: string // uuid[]
journey_name?: string
journey_id?: string // uuid
journey_type?: string
design?: string
created_by?: Array<{
id?: { ... }
}>
journey_version?: "Flex"
}>
}

Journeyโ€‹

type Journey = {
journeyId?: string
organizationId: string
brandId?: string
name: string
steps: Array<{
showStepName?: boolean
title?: string
subTitle?: string
showStepSubtitle?: boolean
showStepper?: boolean
showStepperLabels?: boolean
hideNextButton?: boolean
name: string
stepId?: string
schema: unknown
uischema: unknown
maxWidth?: "small" | "medium" | "large" | "extra large"
}>
design?: {
logoUrl?: string
theme?: Record<string, unknown>
designTokens?: object
}
rules?: Array<{
type: "inject" | "injectWithKey"
sourceType: "journey" | "step" | "block"
source: string
target: string
}>
logics?: Array<{
autoGeneratedId?: string
conditions: string[]
actions: string[]
}>
logicsV4?: Record<string, {
id?: string // uuid
protected?: boolean
action?: string
triggeredOn?: string
conditions?: Array<Array<{
operator?: { ... }
functionName?: { ... }
fact?: { ... }
value?: { ... }
args?: { ... }
}>>
settings?: object
}>
contextSchema?: Array<{
id?: string // uuid
type: string
paramKey: string
isRequired?: boolean
shouldLoadEntity?: boolean
}>
journey_type?: string
settings?: {
embedOptions?: {
mode?: { ... }
lang?: { ... }
width?: { ... }
topBar?: { ... }
scrollToTop?: { ... }
button?: { ... }
}
safeModeAutomation?: boolean
canary?: boolean
designId: string
templateId?: string
entityId?: string
mappingsAutomationId?: string
targetedCustomer?: string
description?: string
organizationSettings?: Record<string, boolean>
publicToken?: string
runtimeEntities?: "ORDER" | "OPPORTUNITY"[]
filePurposes?: string[]
entityTags?: string[]
addressSuggestionsFileUrl?: string
addressSuggestionsFileId?: string
useNewDesign?: boolean
useAustrianLabels?: boolean
enableDarkMode?: boolean
accessMode?: "PUBLIC" | "PRIVATE"
isPublished?: boolean
status?: string
isActive?: boolean
savingProgress?: {
savingMode?: { ... }
supportedVersion?: { ... }
}
thirdPartyCookies?: boolean
}
validationRules?: Record<string, string | Record<string, string>>
createdBy?: string
updatedBy?: string
__lastModifiedAt?: string
createdAt: string
lastModifiedAt: string
// ...
}

JourneyFeatureFlagsโ€‹

type JourneyFeatureFlags = {
featureFlags?: Record<string, unknown>
}

JourneyAuditInfoโ€‹

type JourneyAuditInfo = {
createdAt: string
lastModifiedAt: string
deletedAt?: string
version: number
revisions: number
}

S3Referenceโ€‹

type S3Reference = {
bucket: string
key: string
}

TemplateSettingsโ€‹

Template Settings for document generation

type TemplateSettings = {
custom_margins?: {
top?: number
bottom?: number
}
suggested_margins?: {
top?: number
bottom?: number
}
display_margin_guidelines?: boolean
enable_data_table_margin_autofix?: boolean
template_with_datatable?: boolean
enabled_template_settings_persistence?: boolean
misconfigured_margins?: boolean
file_entity_id?: string // uuid
}

GenerateDocumentResponseโ€‹

type GenerateDocumentResponse = {
job_id?: string // uuid
job_status?: "STARTED" | "PROCESSING" | "SUCCESS" | "FAILED"
message?: string
pdf_output?: {
preview_url?: string
output_document?: {
filename?: { ... }
s3ref?: { ... }
}
}
docx_output?: {
preview_url?: string
output_document?: {
filename?: { ... }
s3ref?: { ... }
}
}
variable_payload?: {
additionalProperties?: string
}
template_settings?: {
custom_margins?: {
top?: { ... }
bottom?: { ... }
}
suggested_margins?: {
top?: { ... }
bottom?: { ... }
}
display_margin_guidelines?: boolean
enable_data_table_margin_autofix?: boolean
template_with_datatable?: boolean
enabled_template_settings_persistence?: boolean
misconfigured_margins?: boolean
file_entity_id?: string // uuid
}
}

GenerateDocumentRequestโ€‹

type GenerateDocumentRequest = {
file_id: string
context_data: {
additionalProperties?: string
}
language?: string
}

GetSettingsForJourneyโ€‹

type GetSettingsForJourney = {
organizationId?: string
canary?: boolean
thirdPartyCookies?: boolean
}

ButtonOptionโ€‹

A single button option data

type ButtonOption = {
value?: string
label?: string
}

ValidationRuleRefโ€‹

References to validation rules organized by blocks and fields. Maps block IDs to either rule IDs (for block-level rules) or rule references (for field-level rules).

type ValidationRuleRef = Record<string, string | Record<string, string>>

RuleRefโ€‹

Field-level rule references within a block. Maps field names to rule IDs.

type RuleRef = Record<string, string>