Skip to main content
GET
Retrieve analytics chart data

Authorizations

Authorization
string
header
required

Sign in to the admin dashboard and use the resulting ID token for a store and operation you can access. The authenticated dashboard cookie is accepted when the Authorization header is absent. Missing or insufficient access returns 401.

Query Parameters

chart_type
string
required

For metrics: order_stats, visitor_stats, page_view_stats, event_stats. For stats: unique_visitors, top_customers, associated_campaigns, ce_item_stats, state_wise_shipments_delivery, state_wise_shipping_performance, average_shipping_time_per_courier, shipping_performance_by_courier, average_time_between_subsequent_purchases, city_wise_shipping_performance, overall_shipping_performance, checkout_funnel, product_checkout_funnel. For records, no chart data is returned. product_checkout_funnel requires product_id and variant_id.

date_from
string<date-time>
required
date_to
string<date-time>
required
interval
enum<string>
Available options:
hour,
day,
week,
month
product_id
string

Required for product_checkout_funnel.

query_type
enum<string>
required
Available options:
metrics,
stats,
records
timezone
string
required

IANA timezone, for example Asia/Kolkata.

variant_id
string

Required for product_checkout_funnel: a variant ID or JSON-encoded array of IDs. Empty, null and none strings select all variants.

Response

OK

message
string
required
success
boolean
required
content
AnalyticsChartsInfo · object
required

stats queries return SQL rows; metrics queries return date/metrics buckets and lifetime_stats; records queries return neither array.