---
title: "Reads the calls customers' apps made to the store over the API and MCP over a period, by channel and client."
---

> 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}/calls/stats`

## Authentication

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

## Path parameters

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

## Query parameters

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

### TypeScript

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

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

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

print(response.text)
```

## Responses

### 200

Reads the calls customers' apps made to the store over the API and MCP over a period, by channel and client.

#### Example

```json
{
  "time_zone": "string",
  "from": "string",
  "to": "string",
  "previous_range": {
    "from": "string",
    "to": "string"
  },
  "bucket": "string",
  "rolled_through": "string",
  "covered_from": "string",
  "calls": {
    "current": 0,
    "previous": 0
  },
  "estimated": true,
  "by_channel": [
    {
      "calls": {
        "current": 0,
        "previous": 0
      },
      "estimated": true,
      "channel": "string"
    }
  ],
  "by_client": {
    "total": 0,
    "clients": [
      {
        "calls": {
          "current": 0,
          "previous": 0
        },
        "estimated": true,
        "client": {
          "id": "string",
          "name": "string"
        },
        "channel": "string"
      }
    ]
  },
  "unattributed": {
    "calls": {
      "current": 0,
      "previous": 0
    },
    "estimated": true
  },
  "series": [
    {
      "start": "string",
      "end": "string",
      "calls": 0,
      "previous_calls": 0,
      "estimated": true
    }
  ]
}
```

- `time_zone` (`callStats.response.200.time_zone`; string, required)
- `from` (`callStats.response.200.from`; string, required)
- `to` (`callStats.response.200.to`; string, required)
- `previous_range` (`callStats.response.200.previous_range`; object, required)
  - `from` (`callStats.response.200.previous_range.from`; string, required)
  - `to` (`callStats.response.200.previous_range.to`; string, required)
- `bucket` (`callStats.response.200.bucket`; string, required)
- `rolled_through` (`callStats.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` (`callStats.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`
- `calls` (`callStats.response.200.calls`; object, required)
  - `current` (`callStats.response.200.calls.current`; number, required)
  - `previous` (`callStats.response.200.calls.previous`; any of, required)
    - any of: `number`, `null`
- `estimated` (`callStats.response.200.estimated`; boolean, required) — Counted from sampled data, so the figures are estimates.
- `by_channel` (`callStats.response.200.by_channel`; array<object>, required) — By the channel: `api` or `mcp`.
  - `calls` (`callStats.response.200.by_channel.calls`; object, required)
    - `current` (`callStats.response.200.by_channel.calls.current`; number, required)
    - `previous` (`callStats.response.200.by_channel.calls.previous`; any of, required)
      - any of: `number`, `null`
  - `estimated` (`callStats.response.200.by_channel.estimated`; boolean, required) — Counted from sampled data, so the figures are estimates.
  - `channel` (`callStats.response.200.by_channel.channel`; string, required)
- `by_client` (`callStats.response.200.by_client`; object, required) — The clients with the most calls in the range, and how many called at all.
  - `total` (`callStats.response.200.by_client.total`; number, required)
  - `clients` (`callStats.response.200.by_client.clients`; array<object>, required)
    - `calls` (`callStats.response.200.by_client.clients.calls`; object, required)
      - `current` (`callStats.response.200.by_client.clients.calls.current`; number, required)
      - `previous` (`callStats.response.200.by_client.clients.calls.previous`; any of, required)
        - any of: `number`, `null`
    - `estimated` (`callStats.response.200.by_client.clients.estimated`; boolean, required) — Counted from sampled data, so the figures are estimates.
    - `client` (`callStats.response.200.by_client.clients.client`; object, required)
      - `id` (`callStats.response.200.by_client.clients.client.id`; string, required)
      - `name` (`callStats.response.200.by_client.clients.client.name`; any of, required)
        - any of: `string`, `null`
    - `channel` (`callStats.response.200.by_client.clients.channel`; string, required)
- `unattributed` (`callStats.response.200.unattributed`; object, required) — Calls through no client, such as a customer's own token.
  - `calls` (`callStats.response.200.unattributed.calls`; object, required)
    - `current` (`callStats.response.200.unattributed.calls.current`; number, required)
    - `previous` (`callStats.response.200.unattributed.calls.previous`; any of, required)
      - any of: `number`, `null`
  - `estimated` (`callStats.response.200.unattributed.estimated`; boolean, required) — Counted from sampled data, so the figures are estimates.
- `series` (`callStats.response.200.series`; array<object>, required)
  - `start` (`callStats.response.200.series.start`; string, required)
  - `end` (`callStats.response.200.series.end`; string, required)
  - `calls` (`callStats.response.200.series.calls`; number, required)
  - `previous_calls` (`callStats.response.200.series.previous_calls`; any of, required)
    - any of: `number`, `null`
  - `estimated` (`callStats.response.200.series.estimated`; boolean, required) — Counted from sampled data, so the figures are estimates.

### 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` (`callStats.response.default.type`; string, required)
  - format `uri`
- `title` (`callStats.response.default.title`; string, required)
- `status` (`callStats.response.default.status`; integer, required)
- `detail` (`callStats.response.default.detail`; string, required)
- `code` (`callStats.response.default.code`; string, optional)
- `context` (`callStats.response.default.context`; object, optional)
- `reached_core` (`callStats.response.default.reached_core`; boolean, optional)
- `core_answer` (`callStats.response.default.core_answer`; string, optional)


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