Skip to content

Product Insights

GET /cdp/insights/products ranks products from local completed-order line items. It does not call the live product catalog; when a catalog title is unavailable, the response degrades to the product id and line-item title already present on the order.

Requires the beta:cdp-commerce permission on your brand.

The ranking unnests every completed order’s line items, so the read is always bounded below to keep the response fast at high order volumes. The default is a 30-day window, and its lower bound is anchored to the effective upper bound rather than always to now:

You passWindow ranked
Nothing[now − 30 days, now]
created_at_lte only[created_at_lte − 30 days, created_at_lte]
created_at_gte (with or without created_at_lte)Exactly your bounds — no default injected

So an created_at_lte-only historical query returns the 30 days ending at your cutoff — e.g. ?created_at_lte=2026-03-31 ranks the 30 days up to 2026-03-31, not an empty window. An explicit created_at_gte always overrides the default and is taken verbatim (a created_at_gte with no created_at_lte runs from that bound through now). Very wide explicit windows over a high-volume store can be slow.

GET /cdp/insights/products
Authorization: Bearer vyg_…
ParamTypeDefaultDescription
created_at_gtestring30 days before upper boundInclusive lower order created_at bound, ISO 8601. Omitted ⇒ defaults to 30 days before the effective upper bound (created_at_lte if given, else now).
created_at_ltestringnowInclusive upper order created_at bound, ISO 8601. Omitted ⇒ now.
{
"scope": "your-shop.myshopify.com",
"top_by_revenue": [
{
"product_id": "101",
"title": "Serum",
"quantity": 3,
"order_count": 2,
"customer_count": 1,
"revenue": "75.00",
"repeat_purchase_rate": 1
}
],
"top_by_order_count": []
}

revenue is a decimal string in the order currency. repeat_purchase_rate is the share of customers who bought that product in at least two completed orders.

StatusWhen
400A date filter is not a valid ISO 8601 date/time.
401Missing or invalid credential.
403Brand not enrolled in the commerce beta (beta_not_enabled), or no connected Shopify integration (integration_not_connected).
405Non-GET method.