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

> 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 › transaction

`GET /v1/stores/{store}/conversion/stats`

## Authentication

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

## Path parameters

- `store` (`conversionStats.path.store`; string, required) — The store's id.

## Query parameters

- `from` (`conversionStats.query.from`; string, optional)
  - format `date`
- `to` (`conversionStats.query.to`; string, optional)
  - format `date`
- `bucket` (`conversionStats.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>/conversion/stats' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/conversion/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>/conversion/stats"

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

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

print(response.text)
```

## Responses

### 200

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

#### 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,
  "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
    }
  ],
  "by_channel": [
    {
      "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,
      "channel": "string"
    }
  ],
  "by_product": {
    "total": 0,
    "covered_from": "string",
    "products": [
      {
        "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,
        "product": {
          "id": "string",
          "title": "string"
        }
      }
    ]
  }
}
```

- `time_zone` (`conversionStats.response.200.time_zone`; string, required)
- `from` (`conversionStats.response.200.from`; string, required)
- `to` (`conversionStats.response.200.to`; string, required)
- `previous_range` (`conversionStats.response.200.previous_range`; object, required)
  - `from` (`conversionStats.response.200.previous_range.from`; string, required)
  - `to` (`conversionStats.response.200.previous_range.to`; string, required)
- `bucket` (`conversionStats.response.200.bucket`; string, required)
- `rolled_through` (`conversionStats.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` (`conversionStats.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` (`conversionStats.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` (`conversionStats.response.200.product_views.current`; number, required)
  - `previous` (`conversionStats.response.200.product_views.previous`; any of, required)
    - any of: `number`, `null`
- `checkouts_started` (`conversionStats.response.200.checkouts_started`; object, required) — Carts started, each counted for the product of its first line alone.
  - `current` (`conversionStats.response.200.checkouts_started.current`; number, required)
  - `previous` (`conversionStats.response.200.checkouts_started.previous`; any of, required)
    - any of: `number`, `null`
- `orders` (`conversionStats.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` (`conversionStats.response.200.orders.current`; number, required)
  - `previous` (`conversionStats.response.200.orders.previous`; any of, required)
    - any of: `number`, `null`
- `rates` (`conversionStats.response.200.rates`; object, required) — Rates over the steps above, which count apart, so one may reach past 1.
  - `current` (`conversionStats.response.200.rates.current`; object, required)
    - `view_to_checkout` (`conversionStats.response.200.rates.current.view_to_checkout`; any of, required)
      - any of: `number`, `null`
    - `checkout_to_order` (`conversionStats.response.200.rates.current.checkout_to_order`; any of, required)
      - any of: `number`, `null`
    - `view_to_order` (`conversionStats.response.200.rates.current.view_to_order`; any of, required)
      - any of: `number`, `null`
  - `previous` (`conversionStats.response.200.rates.previous`; any of, required)
    - any of: `object`, `null`
- `estimated` (`conversionStats.response.200.estimated`; boolean, required) — Views or carts counted from sampled data, so the figures are estimates.
- `series` (`conversionStats.response.200.series`; array<object>, required)
  - `start` (`conversionStats.response.200.series.start`; string, required)
  - `end` (`conversionStats.response.200.series.end`; string, required)
  - `product_views` (`conversionStats.response.200.series.product_views`; number, required)
  - `checkouts_started` (`conversionStats.response.200.series.checkouts_started`; number, required)
  - `orders` (`conversionStats.response.200.series.orders`; number, required)
  - `previous_product_views` (`conversionStats.response.200.series.previous_product_views`; any of, required)
    - any of: `number`, `null`
  - `previous_checkouts_started` (`conversionStats.response.200.series.previous_checkouts_started`; any of, required)
    - any of: `number`, `null`
  - `previous_orders` (`conversionStats.response.200.series.previous_orders`; any of, required)
    - any of: `number`, `null`
  - `estimated` (`conversionStats.response.200.series.estimated`; boolean, required) — Views or carts counted from sampled data, so the figures are estimates.
- `by_channel` (`conversionStats.response.200.by_channel`; array<object>, required) — By the channel each step came through: orders record none, so a channel's orders are the purchases completed through it, and they need not add up to the store's orders.
  - `product_views` (`conversionStats.response.200.by_channel.product_views`; object, required) — Products shown to customers; the merchant's own visits and other callers who are no customer are left out.
    - `current` (`conversionStats.response.200.by_channel.product_views.current`; number, required)
    - `previous` (`conversionStats.response.200.by_channel.product_views.previous`; any of, required)
      - any of: `number`, `null`
  - `checkouts_started` (`conversionStats.response.200.by_channel.checkouts_started`; object, required) — Carts started, each counted for the product of its first line alone.
    - `current` (`conversionStats.response.200.by_channel.checkouts_started.current`; number, required)
    - `previous` (`conversionStats.response.200.by_channel.checkouts_started.previous`; any of, required)
      - any of: `number`, `null`
  - `orders` (`conversionStats.response.200.by_channel.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` (`conversionStats.response.200.by_channel.orders.current`; number, required)
    - `previous` (`conversionStats.response.200.by_channel.orders.previous`; any of, required)
      - any of: `number`, `null`
  - `rates` (`conversionStats.response.200.by_channel.rates`; object, required) — Rates over the steps above, which count apart, so one may reach past 1.
    - `current` (`conversionStats.response.200.by_channel.rates.current`; object, required)
      - `view_to_checkout` (`conversionStats.response.200.by_channel.rates.current.view_to_checkout`; any of, required)
        - any of: `number`, `null`
      - `checkout_to_order` (`conversionStats.response.200.by_channel.rates.current.checkout_to_order`; any of, required)
        - any of: `number`, `null`
      - `view_to_order` (`conversionStats.response.200.by_channel.rates.current.view_to_order`; any of, required)
        - any of: `number`, `null`
    - `previous` (`conversionStats.response.200.by_channel.rates.previous`; any of, required)
      - any of: `object`, `null`
  - `estimated` (`conversionStats.response.200.by_channel.estimated`; boolean, required) — Views or carts counted from sampled data, so the figures are estimates.
  - `channel` (`conversionStats.response.200.by_channel.channel`; string, required)
- `by_product` (`conversionStats.response.200.by_product`; object, required) — The products with the most views in the range, and how many had any step at all; an order line whose product is gone counts in `orders` alone.
  - `total` (`conversionStats.response.200.by_product.total`; number, required)
  - `covered_from` (`conversionStats.response.200.by_product.covered_from`; any of, required) — The first day the product figures hold, which may come after `covered_from`.
    - any of: `string`, `null`
  - `products` (`conversionStats.response.200.by_product.products`; array<object>, required)
    - `product_views` (`conversionStats.response.200.by_product.products.product_views`; object, required) — Products shown to customers; the merchant's own visits and other callers who are no customer are left out.
      - `current` (`conversionStats.response.200.by_product.products.product_views.current`; number, required)
      - `previous` (`conversionStats.response.200.by_product.products.product_views.previous`; any of, required)
        - any of: `number`, `null`
    - `checkouts_started` (`conversionStats.response.200.by_product.products.checkouts_started`; object, required) — Carts started, each counted for the product of its first line alone.
      - `current` (`conversionStats.response.200.by_product.products.checkouts_started.current`; number, required)
      - `previous` (`conversionStats.response.200.by_product.products.checkouts_started.previous`; any of, required)
        - any of: `number`, `null`
    - `orders` (`conversionStats.response.200.by_product.products.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` (`conversionStats.response.200.by_product.products.orders.current`; number, required)
      - `previous` (`conversionStats.response.200.by_product.products.orders.previous`; any of, required)
        - any of: `number`, `null`
    - `rates` (`conversionStats.response.200.by_product.products.rates`; object, required) — Rates over the steps above, which count apart, so one may reach past 1.
      - `current` (`conversionStats.response.200.by_product.products.rates.current`; object, required)
        - `view_to_checkout` (`conversionStats.response.200.by_product.products.rates.current.view_to_checkout`; any of, required)
          - any of: `number`, `null`
        - `checkout_to_order` (`conversionStats.response.200.by_product.products.rates.current.checkout_to_order`; any of, required)
          - any of: `number`, `null`
        - `view_to_order` (`conversionStats.response.200.by_product.products.rates.current.view_to_order`; any of, required)
          - any of: `number`, `null`
      - `previous` (`conversionStats.response.200.by_product.products.rates.previous`; any of, required)
        - any of: `object`, `null`
    - `estimated` (`conversionStats.response.200.by_product.products.estimated`; boolean, required) — Views or carts counted from sampled data, so the figures are estimates.
    - `product` (`conversionStats.response.200.by_product.products.product`; object, required)
      - `id` (`conversionStats.response.200.by_product.products.product.id`; string, required)
      - `title` (`conversionStats.response.200.by_product.products.product.title`; any of, required)
        - any of: `string`, `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` (`conversionStats.response.default.type`; string, required)
  - format `uri`
- `title` (`conversionStats.response.default.title`; string, required)
- `status` (`conversionStats.response.default.status`; integer, required)
- `detail` (`conversionStats.response.default.detail`; string, required)
- `code` (`conversionStats.response.default.code`; string, optional)
- `context` (`conversionStats.response.default.context`; object, optional)
- `reached_core` (`conversionStats.response.default.reached_core`; boolean, optional)
- `core_answer` (`conversionStats.response.default.core_answer`; string, optional)


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