Request a user journey based on the criteria supplied.

[Q] How do I interact with this API?

This endpoint replies in one of two ways:

  • [1] Return a 200 status code response indicating that data is available in the cache.
  • [2] Return a 202 status code response indicating that data is not in the cache and needs to be computed.

When facing a 202 response, you should periodically (every 1-5 seconds) check for the request to return a 200 response.

Important Notes:

  • When using the below option force_recompute, you may use this once every 60 seconds. If you attempt to call the request again without removing this property (for follow-up requests), you will receive a 429 response.
  • Not receiving a 200 response after some time (greater than 60 seconds) is a sign there is a problem. You should reach out to your support contact to diagnose the issue.

Request [POST]

Request Body

{
    "property_id":"D#1007491775344160808",
    "organization_id":"848WN4oEUgisKrV9dY9Ni6",
    "filter":{
        "start_event":"LINK_TRACKING_CLICK", // From what event should the journey compute from?
        "end_event":"ITEM_PURCHASED" // From what event should the journey compute to?
    },
    "force_recompute": false // Invalidate the cached result and recompute. Rate-limited.
}

Response (Status Code 200)

The response will always be compressed by Brotli. The below response object shows you what the uncompressed data will look like. To see the actual response you will receive, check the compressed response example following the one below.

{
    "starting_event": "6eEtWiFrRoeV2pn4sR4BnX", // The Starting Event ID (LINK_TRACKING_CLICK)
    "ending_event": "qZL3MUSCwzczHegqzwA9qB", // The Ending Event (ITEM_PURCHASED)
    "path_index": [
        "6eEtWiFrRoeV2pn4sR4BnXqZL3MUSCwzczHegqzwA9qB",
        "3yyJonMWB3zsq2LKMNpQCgqZL3MUSCwzczHegqzwA9qB"
    ], // The Long-Form Path Index
    "path_user_count_total": 3, // How many unique users were apart of the overall journeys taken?
    "paths": [
        {
            "count": 2, // How many users took this path?
            "path": [
                "3yyJonMWB3zsq2LKMNpQCg", 
                "qZL3MUSCwzczHegqzwA9qB"
            ], // What are the unique ID's of the events in chronological order?
            "bds": "3yyJonMWB3zsq2LKMNpQCgqZL3MUSCwzczHegqzwA9qB", // The Long-Form Path Index for this Path
            "event_data": [ // A selection of event_data objects for aggregation. This can inform you more about what each node of the path had in common.
                {
                    "e_begin_type": "VERIFICATION_SUCCESS",
                    "e_ip": "1.1.1.2",
                    "e_ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36",
                    "e_linked_record": "mBahkVqFPkxFzpTjAwBfxT",
                    "EVENT_ID": "3yyJonMWB3zsq2LKMNpQCg"
                },
                {
                    "gas": "1259128312",
                    "token_id": "48248284283",
                    "EVENT_ID": "qZL3MUSCwzczHegqzwA9qB"
                },
                {
                    "e_begin_type": "VERIFICATION_SUCCESS",
                    "e_ip": "1.1.1.3",
                    "e_ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36",
                    "e_linked_record": "fqfbjhjkirxFzpTjAwBfxT",
                    "EVENT_ID": "3yyJonMWB3zsq2LKMNpQCg"
                },
                {
                    "gas": "1239128312",
                    "token_id": "48248284283",
                    "EVENT_ID": "qZL3MUSCwzczHegqzwA9qB"
                }
            ],
            "percentage": 66.67 // The amount of users who took this path in comparison to other paths, as a percentage.
        },
        {
            "count": 1,
            "path": [
                "6eEtWiFrRoeV2pn4sR4BnX",
                "qZL3MUSCwzczHegqzwA9qB"
            ],
            "bds": "6eEtWiFrRoeV2pn4sR4BnXqZL3MUSCwzczHegqzwA9qB",
            "event_data": [
                {
                    "e_target": "https://customer-glf9jm19pc9dk56w.cloudflarestream.com/519a05331fd65bd4db737568917ef234/watch",
                    "e_link_id": "f27b28xSkvWq",
                    "e_device_type": 0,
                    "e_source_type": "LINK::REFERRED",
                    "e_source_referral": "https://t.co/",
                    "e_source_country": "IE",
                    "e_source_city": "Dublin",
                    "EVENT_ID": "6eEtWiFrRoeV2pn4sR4BnX"
                },
                {
                    "gas": "1239128312",
                    "token_id": "48248284283",
                    "EVENT_ID": "qZL3MUSCwzczHegqzwA9qB"
                }
            ],
            "percentage": 33.33
        }
    ]
}
{
    "success": true,
    "data": {
        "ready": true,
        "compressed": "G2UGAIzTFfOihMW5/9Orqs371TGa8K5aiBMAy9Zh6eo7cE5aP4kPQBWFXUv7L==",
        "compression": "brotli"
    },
    "error": "",
    "error_text": ""
}

Response (Status Code 202)

The computed data is not available yet, retry the request periodically until it becomes available.

{
    "success": true,
    "data": {
        "ready": false,
        "compressed": "",
        "compression": "brotli"
    },
    "error": "",
    "error_text": ""
}