---
title: "Get business overview"
method: GET
path: "/analytics"
tags: ["Analytics"]
---

# Get business overview

`GET /analytics`

## Request

- Base URL: `https://api.crevio.co/v1`
- URL: `https://api.crevio.co/v1/analytics`
- Auth: API key in header `Authorization`

Account-wide business pulse in one call: revenue, orders, leads, new customers, and live-site traffic over a date range, each compared against the immediately preceding period of equal length. Defaults to the last 7 days; the range cannot exceed 366 days. Use this as the starting point for any business review — drill into a specific site with GET /sites/{id}/analytics, and into records with the orders/customers list endpoints.

## Query parameters

- `start_date` string, date
- `end_date` string, date

## Response `200`

Business overview for the requested period

- object
  - `object` 'business_overview', required
  - `period` object, required: The resolved date range the metrics cover.
    - `start_date` string, date, required
    - `end_date` string, date, required
    - `days` integer, required
  - `previous_period` object, required: The comparison period: the range of equal length immediately before period.start_date.
    - `start_date` string, date, required
    - `end_date` string, date, required
  - `currency` string, required: Lowercase ISO currency code all monetary amounts are expressed in (the account's display currency).
  - `lifetime_revenue` integer, required: All-time revenue in the account currency, in the smallest currency unit (cents for USD).
  - `revenue` object, required: Revenue in the account currency, in the smallest currency unit (cents for USD), with the preceding period of equal length for comparison and a per-day time series.
    - `total` integer, required
    - `previous_total` integer, required
    - `change_pct` number, nullable: Percent change vs. the previous period; null when the previous period was zero (no baseline).
    - `by_day` object[]: Per-day series with one entry per day in the period; days with no activity are zero-filled.
      - `date` string, date, required
      - `amount` integer, required: Revenue for the day in the account currency, in the smallest currency unit.
  - `orders` object, required: Period totals with the preceding period of equal length for comparison and a per-day time series.
    - `total` number, required
    - `previous_total` number, required
    - `change_pct` number, nullable: Percent change vs. the previous period; null when the previous period was zero (no baseline).
    - `by_day` object[]: Per-day series with one entry per day in the period; days with no activity are zero-filled.
      - `date` string, date, required
      - `count` number, required: Orders created that day (excluding pending and failed).
  - `leads` object, required: Period totals with the preceding period of equal length for comparison and a per-day time series.
    - `total` number, required
    - `previous_total` number, required
    - `change_pct` number, nullable: Percent change vs. the previous period; null when the previous period was zero (no baseline).
    - `by_day` object[]: Per-day series with one entry per day in the period; days with no activity are zero-filled.
      - `date` string, date, required
      - `count` number, required: Leads captured that day.
  - `new_customers` object, required: Period totals with the preceding period of equal length for comparison.
    - `total` number, required
    - `previous_total` number, required
    - `change_pct` number, nullable: Percent change vs. the previous period; null when the previous period was zero (no baseline).
  - `refunds` object, required: Orders created in the period that have since been refunded or partially refunded. Attribution is by order date (refund timestamps are not tracked); amounts are in the account currency, in the smallest currency unit.
    - `count` integer, required
    - `previous_count` integer, required
    - `amount` integer, required
    - `previous_amount` integer, required
  - `top_products` object[], required: Top products by units sold over the period (units, not revenue — per-item revenue attribution is not tracked). Empty when nothing sold.
    - `id` string, nullable: Prefix id of the product (e.g. prod_abc123).
    - `name` string, required
    - `units` integer, required
    - `orders` integer, required: Distinct orders containing the product.
  - `traffic` object, nullable, required: Traffic for the account's live site; null when no site is deployed. Zeros may also mean analytics collection is temporarily degraded.
    - `site_id` string: Prefix id of the live site (e.g. site_abc123).
    - `visitors` object: Period totals with the preceding period of equal length for comparison and a per-day time series.
      - `total` number, required
      - `previous_total` number, required
      - `change_pct` number, nullable: Percent change vs. the previous period; null when the previous period was zero (no baseline).
      - `by_day` object[]: Per-day series with one entry per day in the period; days with no activity are zero-filled.
        - `date` string, date, required
        - `count` number, required: Unique visitors that day.
    - `pageviews` object: Period totals with the preceding period of equal length for comparison.
      - `total` number, required
      - `previous_total` number, required
      - `change_pct` number, nullable: Percent change vs. the previous period; null when the previous period was zero (no baseline).
    - `top_sources` object[]: Top traffic sources by unique visitors over the period.
      - `source` string, required
      - `count` integer, required
    - `top_pages` object[]: Top pages by unique visitors over the period.
      - `path` string, required
      - `count` integer, required

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `429`: Rate limit exceeded — 600 requests per minute per credential. Retry after the number of seconds in `Retry-After`.

---

[API](https://skmtc.dev/crevio/apis/crevio-api-v1.md) · [All operations](https://skmtc.dev/crevio/apis/crevio-api-v1/llms.txt) · [OpenAPI document](https://skmtc.dev/crevio/apis/crevio-api-v1/revisions/2219f18ad651?raw)
