LiveRecoverVYG Developer Docs
CDP REST APIAPI Reference

Conversion Funnel

Your brand's browse-to-purchase funnel over a date range, computed from scoped event counts.

GET /cdp/insights/funnel computes your brand's browse-to-purchase conversion funnel over a date range from scoped event counts: product_viewedproduct_added_to_cartcheckout_startedcheckout_completed/order_created. It is the REST twin of the cdp_funnel MCP tool: both return the same stage counts, computed by one shared capability, so the two surfaces cannot drift.

The final stage counts checkout_completed or order_created (whichever your store emits) as a single OR-union. Every stage count is bound to your brand's shop scope — see Tenant Isolation & Scope.

The funnel is evaluated by the underlying search cluster, so it carries a dedicated, tighter rate limit than the rest of the API. Expect 429 under burst and batch your dashboards accordingly.

Query parameters

ParameterTypeDefaultDescription
fromstringOptional ISO-8601 window lower bound (inclusive), e.g. 2026-06-01.
tostringOptional ISO-8601 window upper bound (inclusive), e.g. 2026-06-30.

Omit both to compute the funnel over all in-scope events.

Response 200

{
	"stages": [
		{
			"stage": "product_viewed",
			"eventTypes": ["product_viewed"],
			"count": 1000,
			"conversionFromPreviousPct": null,
			"conversionFromStartPct": null,
			"dropOffFromPreviousPct": null
		},
		{
			"stage": "product_added_to_cart",
			"eventTypes": ["product_added_to_cart"],
			"count": 400,
			"conversionFromPreviousPct": 40,
			"conversionFromStartPct": 40,
			"dropOffFromPreviousPct": 60
		},
		{
			"stage": "checkout_started",
			"eventTypes": ["checkout_started"],
			"count": 150,
			"conversionFromPreviousPct": 37.5,
			"conversionFromStartPct": 15,
			"dropOffFromPreviousPct": 62.5
		},
		{
			"stage": "checkout_completed",
			"eventTypes": ["checkout_completed", "order_created"],
			"count": 60,
			"conversionFromPreviousPct": 40,
			"conversionFromStartPct": 6,
			"dropOffFromPreviousPct": 60
		}
	],
	"dateRange": { "from": null, "to": null },
	"scope": "your-shop.myshopify.com"
}
  • stages — the four funnel stages in order. Each carries its raw count plus, from the second stage on, conversionFromPreviousPct (vs the previous stage), conversionFromStartPct (vs the first stage), and dropOffFromPreviousPct — all percentages rounded to 2 dp, or null when the denominator is zero (never a divide-by-zero). The first stage is the baseline (all ratios null).
  • dateRange — the window echoed back (null bounds when unbounded).
  • scope — your brand's resolved shop domain.

Example

curl -s "https://cdp.vyg.app/cdp/insights/funnel?from=2026-06-01&to=2026-06-30" \
  -H "Authorization: Bearer vyg_your_key_here"

Errors

StatusWhen
400from / to present but not a valid date string (bad_request).
401Missing or invalid credential.
403No connected Shopify integration resolves a scope for the brand.
405Non-GET method.
429Analytics query rate-limited — retry with backoff (rate_limited).
502The CDP could not evaluate the funnel (upstream_error).
503The CDP is temporarily unavailable — retry (upstream_unavailable).

On this page