---
title: "Reads a product's views, visitors, checkouts started and orders over a period, by channel."
---

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

Path: Sherpo merchant API › product

`GET /v1/stores/{store}/products/{product}/traffic/stats`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `product:read`

## Path parameters

- `store` (`productTrafficStats.path.store`; string, required) — The store's id.
- `product` (`productTrafficStats.path.product`; string, required) — An id, or `slug:<slug>`.
  - minLength 1

## Query parameters

- `from` (`productTrafficStats.query.from`; string, optional)
  - format `date`
- `to` (`productTrafficStats.query.to`; string, optional)
  - format `date`
- `bucket` (`productTrafficStats.query.bucket`; string, optional)
  - one of `"day"`, `"week"`, `"month"`

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/traffic/stats' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/traffic/stats';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/traffic/stats"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Reads a product's views, visitors, checkouts started and orders over a period, by channel.

#### Example

```json
{
  "time_zone": "string",
  "from": "string",
  "to": "string",
  "previous_range": {
    "from": "string",
    "to": "string"
  },
  "bucket": "string",
  "rolled_through": "string",
  "covered_from": "string",
  "product_views": {
    "current": 0,
    "previous": 0
  },
  "checkouts_started": {
    "current": 0,
    "previous": 0
  },
  "orders": {
    "current": 0,
    "previous": 0
  },
  "rates": {
    "current": {
      "view_to_checkout": 0,
      "checkout_to_order": 0,
      "view_to_order": 0
    },
    "previous": {
      "view_to_checkout": 0,
      "checkout_to_order": 0,
      "view_to_order": 0
    }
  },
  "estimated": true,
  "visitors": {
    "current": 0,
    "previous": 0
  },
  "by_channel": [
    {
      "views": {
        "current": 0,
        "previous": 0
      },
      "visitors": {
        "current": 0,
        "previous": 0
      },
      "estimated": true,
      "channel": "string"
    }
  ],
  "series": [
    {
      "start": "string",
      "end": "string",
      "product_views": 0,
      "checkouts_started": 0,
      "orders": 0,
      "previous_product_views": 0,
      "previous_checkouts_started": 0,
      "previous_orders": 0,
      "estimated": true,
      "visitors": 0,
      "previous_visitors": 0
    }
  ]
}
```

- `time_zone` (`productTrafficStats.response.200.time_zone`; string, required)
- `from` (`productTrafficStats.response.200.from`; string, required)
- `to` (`productTrafficStats.response.200.to`; string, required)
- `previous_range` (`productTrafficStats.response.200.previous_range`; object, required)
  - `from` (`productTrafficStats.response.200.previous_range.from`; string, required)
  - `to` (`productTrafficStats.response.200.previous_range.to`; string, required)
- `bucket` (`productTrafficStats.response.200.bucket`; string, required)
- `rolled_through` (`productTrafficStats.response.200.rolled_through`; any of, required) — The latest store-local day the totals are rolled up through, null before the first; later days count nothing yet.
  - any of: `string`, `null`
- `covered_from` (`productTrafficStats.response.200.covered_from`; any of, required) — The earliest store-local day the totals hold, null before the first; earlier days count nothing.
  - any of: `string`, `null`
- `product_views` (`productTrafficStats.response.200.product_views`; object, required) — Products shown to customers; the merchant's own visits and other callers who are no customer are left out.
  - `current` (`productTrafficStats.response.200.product_views.current`; number, required)
  - `previous` (`productTrafficStats.response.200.product_views.previous`; any of, required)
    - any of: `number`, `null`
- `checkouts_started` (`productTrafficStats.response.200.checkouts_started`; object, required) — Carts started, each counted for the product of its first line alone.
  - `current` (`productTrafficStats.response.200.checkouts_started.current`; number, required)
  - `previous` (`productTrafficStats.response.200.checkouts_started.previous`; any of, required)
    - any of: `number`, `null`
- `orders` (`productTrafficStats.response.200.orders`; object, required) — Orders through the store's own checkout (never a renewal, nor one recorded through the API or by hand) on the days the totals cover, a test purchase included.
  - `current` (`productTrafficStats.response.200.orders.current`; number, required)
  - `previous` (`productTrafficStats.response.200.orders.previous`; any of, required)
    - any of: `number`, `null`
- `rates` (`productTrafficStats.response.200.rates`; object, required) — Rates over the steps above, which count apart, so one may reach past 1.
  - `current` (`productTrafficStats.response.200.rates.current`; object, required)
    - `view_to_checkout` (`productTrafficStats.response.200.rates.current.view_to_checkout`; any of, required)
      - any of: `number`, `null`
    - `checkout_to_order` (`productTrafficStats.response.200.rates.current.checkout_to_order`; any of, required)
      - any of: `number`, `null`
    - `view_to_order` (`productTrafficStats.response.200.rates.current.view_to_order`; any of, required)
      - any of: `number`, `null`
  - `previous` (`productTrafficStats.response.200.rates.previous`; any of, required)
    - any of: `object`, `null`
- `estimated` (`productTrafficStats.response.200.estimated`; boolean, required) — Views or carts counted from sampled data, so the figures are estimates.
- `visitors` (`productTrafficStats.response.200.visitors`; object, required) — The product's daily unique visitors, summed over the days.
  - `current` (`productTrafficStats.response.200.visitors.current`; number, required)
  - `previous` (`productTrafficStats.response.200.visitors.previous`; any of, required)
    - any of: `number`, `null`
- `by_channel` (`productTrafficStats.response.200.by_channel`; array<object>, required) — The product's views and visitors by the channel they came through.
  - `views` (`productTrafficStats.response.200.by_channel.views`; object, required) — Pages, products and entries shown, scaled back from sampling.
    - `current` (`productTrafficStats.response.200.by_channel.views.current`; number, required)
    - `previous` (`productTrafficStats.response.200.by_channel.views.previous`; any of, required)
      - any of: `number`, `null`
  - `visitors` (`productTrafficStats.response.200.by_channel.visitors`; object, required) — Unique visitors of each day, summed over the days: no visitor is followed from one day to the next, so one person on three days counts three times.
    - `current` (`productTrafficStats.response.200.by_channel.visitors.current`; number, required)
    - `previous` (`productTrafficStats.response.200.by_channel.visitors.previous`; any of, required)
      - any of: `number`, `null`
  - `estimated` (`productTrafficStats.response.200.by_channel.estimated`; boolean, required) — Counted from sampled data, so the figures are estimates.
  - `channel` (`productTrafficStats.response.200.by_channel.channel`; string, required)
- `series` (`productTrafficStats.response.200.series`; array<object>, required)
  - `start` (`productTrafficStats.response.200.series.start`; string, required)
  - `end` (`productTrafficStats.response.200.series.end`; string, required)
  - `product_views` (`productTrafficStats.response.200.series.product_views`; number, required)
  - `checkouts_started` (`productTrafficStats.response.200.series.checkouts_started`; number, required)
  - `orders` (`productTrafficStats.response.200.series.orders`; number, required)
  - `previous_product_views` (`productTrafficStats.response.200.series.previous_product_views`; any of, required)
    - any of: `number`, `null`
  - `previous_checkouts_started` (`productTrafficStats.response.200.series.previous_checkouts_started`; any of, required)
    - any of: `number`, `null`
  - `previous_orders` (`productTrafficStats.response.200.series.previous_orders`; any of, required)
    - any of: `number`, `null`
  - `estimated` (`productTrafficStats.response.200.series.estimated`; boolean, required) — Views or carts counted from sampled data, so the figures are estimates.
  - `visitors` (`productTrafficStats.response.200.series.visitors`; number, required)
  - `previous_visitors` (`productTrafficStats.response.200.series.previous_visitors`; any of, required)
    - any of: `number`, `null`

### default

A problem; see https://api.sherpo.io/merchant/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`productTrafficStats.response.default.type`; string, required)
  - format `uri`
- `title` (`productTrafficStats.response.default.title`; string, required)
- `status` (`productTrafficStats.response.default.status`; integer, required)
- `detail` (`productTrafficStats.response.default.detail`; string, required)
- `code` (`productTrafficStats.response.default.code`; string, optional)
- `context` (`productTrafficStats.response.default.context`; object, optional)
- `reached_core` (`productTrafficStats.response.default.reached_core`; boolean, optional)
- `core_answer` (`productTrafficStats.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/merchant-api/reference/product-traffic-stats/index.md
