> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omnicommerce.sg/llms.txt
> Use this file to discover all available pages before exploring further.

# Analytics API

> One route per workspace analytics dashboard: growth, traffic, products, pricing, ads, orders, video, profit, AI traffic, stores, and reports.

Each analytics dashboard in the workspace has its own route with the same numbers, so you can rebuild any of them in your own app. Every route requires `analytics:read`.

## Routes

| Route | Dashboard | Returns |
| - | - | - |
| `GET /api/v1/analytics/overview` | Growth Intelligence → Overview | Sales, traffic, and profit KPIs, daily trend, funnel, channel mix, top and lagging products, next actions |
| `GET /api/v1/analytics/traffic` | Growth Intelligence → Traffic | Funnel, daily trend, products ranked by lost conversion, diagnostics, videos that drive traffic |
| `GET /api/v1/analytics/products` | Growth Intelligence → Products | Per-product sales, traffic, price, stock, profit, and ads, plus ranked insights |
| `GET /api/v1/analytics/pricing` | Growth Intelligence → Pricing | Margin, velocity, stock cover, prices, competitor median, and a recommendation per product |
| `GET /api/v1/analytics/ads` | Growth Intelligence → Ads | 28-day ad KPIs and per-product sales and ad metrics by period |
| `GET /api/v1/analytics/orders` | Growth Intelligence → Orders | Order KPIs, daily trend, status and marketplace mix, top products |
| `GET /api/v1/analytics/content` | Growth Intelligence → Video / LIVE | Views, clicks, orders, and GMV by day, by type, and per video |
| `GET /api/v1/analytics/profit` | Insights → P\&L Analysis | Revenue, costs, fees, and profit; waterfall, breakdowns, most and least profitable products |
| `GET /api/v1/analytics/ai-traffic` | Insights → AI Traffic | Visits and crawls from AI assistants by source, route, country, and product |
| `GET /api/v1/analytics/stores` | Insights → Analytics | Seller Centre shop metrics: visitors, followers, buyer funnel, app and web split |
| `GET /api/v1/analytics/reports` | Insights → Business Reports | Headline KPIs, top products, marketplace mix, alerts, settlement totals, data quality |

Session members need the same access as in the app; `profit` also needs finance access.

## Query parameters

Every route except `ai-traffic` accepts:

| Parameter | Description |
| - | - |
| `from`, `to` | Inclusive `YYYY-MM-DD` range. Defaults to the last 30 days, including today. At most 366 days. |
| `marketplace` | Comma-separated marketplaces. |
| `country` | Comma-separated countries. One country selects its currency. |
| `store` | Comma-separated store ids from `GET /api/v1/marketplaces/connected`. |
| `currency` | ISO currency. Defaults to the single country's currency, otherwise SGD. |
| `timeZone` | IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to `Asia/Singapore`. |

Extra parameters:

* `products`: `q` (name or SKU), `productId` (up to 50 comma-separated product or variant UUIDs), `limit` (default 50, max 100). Pass one `productId` to show a product's performance on its own page.
* `profit`: `sku` (comma-separated).
* `ai-traffic`: `from`, `to`, `timeZone`, `source`, `trafficType` (`indexing`, `click_through`, `page_view`, `assistant`), `route`, and `country`. Values for `source` and `route` come back in `data.filterOptions`. A range longer than 365 days is shortened to the last 365.

Unknown values return `400` instead of being ignored.

## Responses

Each route returns `data` with the dashboard's numbers and `data.filters` with the range, filters, currency, and time zone that were applied.

* Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted, so call once per currency when you sell in several.
* Fields ending in `ChangePercent` compare against the previous period of equal length (`previousFrom` to `previousTo`). They are `null` when that period has no data. Show "—" rather than "+100%".
* `coverage` says which data sources had data, so you can tell "zero" from "not connected".
* Buyers are never listed. Repeat-buyer counts are included in `orders`.

## SDK

```ts theme={null}
const overview = await client.analytics.getOverview({
  from: "2026-09-01",
  to: "2026-09-30",
  timeZone: "Asia/Kuala_Lumpur",
});
console.log(overview.data.kpis.netSales, overview.data.filters.currency);

const product = await client.analytics.getProducts({ productId });
```

```python theme={null}
traffic = client.analytics.get_traffic(from_="2026-09-01", to="2026-09-30")
```

```bash theme={null}
omni analytics get-profit --from 2026-09-01 --to 2026-09-30
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.