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

# API reference statistics

> Pull shop statistics for inquiries, orders, sales, newsletter, product ratings, transactions, and access via the Admin Interface API statistics endpoint.

The `statistics/` endpoint lets you retrieve various statistics for your online shop from our shop system. Through the interface you can query statistics for form inquiries, transactions and payment methods, product ratings, orders and sales, and access statistics.

## Supported methods

List of all supported methods.

| **Command/Info**    | **Endpoints**            | **GET**               | **POST**              | **PUT**             | **DELETE**          |
| ------------------- | ------------------------ | --------------------- | --------------------- | ------------------- | ------------------- |
| **Inquiries**       | statistics/inquiries     | <Icon icon="check" /> | <Icon icon="ban" />   | <Icon icon="ban" /> | <Icon icon="ban" /> |
| **Orders**          | statistics/orders        | <Icon icon="ban" />   | <Icon icon="check" /> | <Icon icon="ban" /> | <Icon icon="ban" /> |
| **Sales**           | statistics/sales         | <Icon icon="check" /> | <Icon icon="check" /> | <Icon icon="ban" /> | <Icon icon="ban" /> |
| **Newsletter**      | statistics/newsletter    | <Icon icon="check" /> | <Icon icon="ban" />   | <Icon icon="ban" /> | <Icon icon="ban" /> |
| **Product ratings** | statistics/productrating | <Icon icon="ban" />   | <Icon icon="check" /> | <Icon icon="ban" /> | <Icon icon="ban" /> |
| **Transactions**    | statistics/transactions  | <Icon icon="check" /> | <Icon icon="ban" />   | <Icon icon="ban" /> | <Icon icon="ban" /> |
| **Access**          | statistics/access        | <Icon icon="check" /> | <Icon icon="ban" />   | <Icon icon="ban" /> | <Icon icon="ban" /> |

## Data persistence for statistics

The statistics data of the shop system is stored in three different aggregation levels:

* **Hourly data (per hour)**\
  This data provides the finest level of detail and enables precise analysis of short-term events, e.g. peaks in ordering behavior during a promotion.\
  → *Storage duration: 3 weeks*\
  After that, the data is deleted automatically to limit the data volume.
* **Daily data (per day)**\
  This aggregation is suitable for medium- to long-term evaluations, for example to observe weekly trends or campaign progress.\
  → *Storage duration: 3 months*
* **Monthly data (per month)**\
  This data is geared towards long-term analyses, e.g. to evaluate seasonal fluctuations or annual sales development.\
  → *Storage duration: 3 years*

This staggered storage ensures that many details are available in the short term, while in the long term only aggregated information is retained.

## Resources

### Data table for inquiries

| **Name**                       | **Type** | **Meaning**                                                                   |
| ------------------------------ | -------- | ----------------------------------------------------------------------------- |
| **contact** (name of the form) | Object   | Contains information about the form.                                          |
| **timestamp**                  | String   | Time of aggregation (e.g. the start of a month or day. ISO 8601 format, UTC). |
| **value**                      | Integer  | Number of inquiries in the respective time interval.                          |

#### Example

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "contact": [
        {
            "timestamp": "2025-05-16T00:00:00.000Z",
            "value": 2
        }
    ]
}
```

### Data table for orders

| **Name**                | **Type** | **Meaning**                                                                         |
| ----------------------- | -------- | ----------------------------------------------------------------------------------- |
| `accountTypeGuest`      | Integer  | Number of orders placed by guest customers (without a customer account).            |
| `accountTypeNew`        | Integer  | Number of orders placed by newly registered customers.                              |
| `accountTypeRegistered` | Integer  | Number of orders from existing registered customers.                                |
| `amount`                | Float    | Total revenue of the orders without vouchers and shipping costs.                    |
| `amountTotal`           | Float    | Total revenue including all vouchers and shipping costs — the actual total paid.    |
| `country`               | String   | Country code (e.g. "DE", "AT") of the order, in accordance with ISO 3166-1 Alpha-2. |
| `currency`              | String   | Currency used for the order, in accordance with ISO 4217 (e.g. "EUR", "USD").       |
| `deviceTypeDesktop`     | Integer  | Number of orders placed via a desktop device.                                       |
| `deviceTypeMobile`      | Integer  | Number of orders placed via a mobile device (smartphone).                           |
| `deviceTypeTablet`      | Integer  | Number of orders placed via a tablet.                                               |
| `itemsCount`            | Integer  | Total number of items (line items) in the captured orders.                          |
| `logDate`               | String   | Time of data aggregation (e.g. the start of a month or day. ISO 8601 format, UTC).  |
| `ordersCount`           | Integer  | Total number of captured orders within the period.                                  |
| `platformTypeApp`       | Integer  | Number of orders placed via a mobile app platform.                                  |
| `platformTypeWeb`       | Integer  | Number of orders completed via the web platform (browser).                          |
| `subshopId`             | String   | ID of the subshop in which the orders took place.                                   |
| `totalDiscount`         | Float    | Sum of all granted discounts across all orders in the period.                       |
| `voucherCount`          | Integer  | Number of redeemed vouchers across all orders.                                      |
| `voucherValue`          | Float    | Total redeemed voucher value across all orders.                                     |

#### Example

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "accountTypeGuest": 0,
    "accountTypeNew": 0,
    "accountTypeRegistered": 3,
    "amount": 15,
    "amountTotal": 17.9,
    "country": "DE",
    "currency": "€",
    "deviceTypeDesktop": 3,
    "deviceTypeMobile": 0,
    "deviceTypeTablet": 0,
    "itemsCount": 4,
    "logDate": "2025-05-20T14:00:00Z",
    "ordersCount": 3,
    "platformTypeApp": 0,
    "platformTypeWeb": 3,
    "subshopId": "deutsch",
    "totalDiscount": 0,
    "voucherCount": 1,
    "voucherValue": 8.95
}
```

### Data table for sales

#### For `GET statistics/sales`

| **Name**                         | **Type** | **Meaning**                                                                        |
| -------------------------------- | -------- | ---------------------------------------------------------------------------------- |
| `timestamp`                      | String   | Time of data aggregation (e.g. the start of a month or day. ISO 8601 format, UTC). |
| `value.deutsch` (any subshop ID) | Float    | Revenue in the subshop.                                                            |

#### Example

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "timestamp": "2025-04-22T22:00:00.000Z",
    "value": {
        "deutsch": 1150.64
    }
}
```

#### For `POST statistics/sales/product`

| **Name**    | **Type** | **Meaning**                                  |
| ----------- | -------- | -------------------------------------------- |
| `logDate`   | String   | Time of data aggregation.                    |
| `productId` | String   | Unique ID of the product that was purchased. |
| `sales`     | Integer  | Number of sales.                             |
| `subshopId` | String   | Subshop in which the product was purchased.  |

#### Example

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "logDate": "2025-05-13 00:00:00",
    "productId": "143-68071",
    "sales": 1,
    "subshopId": "deutsch"
}Data table for newsletters
```

| **Name**    | **Type** | **Meaning**                                                                        |
| ----------- | -------- | ---------------------------------------------------------------------------------- |
| `timestamp` | String   | Time of data aggregation (e.g. the start of a month or day. ISO 8601 format, UTC). |
| `value`     | Integer  | Value assigned to the timestamp.                                                   |

#### Example

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "timestamp": "2025-04-25T00:00:00.000Z",
    "value": 3
}
```

### Statistics for transactions and payment methods

| **Name**          | **Type** | **Meaning**                                                                                                                                                                                                                                                        |
| ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **country**       | String   | Country code from the order (ISO 3166-1 Alpha-2, e.g. "DE").                                                                                                                                                                                                       |
| **id**            | Integer  | Unique ID of the statistics record.                                                                                                                                                                                                                                |
| **orderData**     | Object   | Contains order data.                                                                                                                                                                                                                                               |
| **paymentMethod** | String   | Name of the payment method used.                                                                                                                                                                                                                                   |
| **paymentStatus** | Integer  | Status of the payment. <br /> Possible values: <br /> `0 = Pending` <br /> `1 = Finished` <br /> `2 = Error` <br /> `3 = Redirected` <br /> `4 = Canceled` <br /> `5 = Rejected` <br /> `6 = CanceledByAdmin` <br /> `7 = Refunded` <br /> `8 = RefundedPartially` |
| **subshopId**     | String   | Technical ID of the affected subshop.                                                                                                                                                                                                                              |
| **total**         | Float    | Total revenue for this record (in the respective currency).                                                                                                                                                                                                        |

#### Example

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "computop-hosted": {},
    "dummy": {},
    "freeFields": {
        "agb.checked": "true",
        "agb.merchantText": "agb text here",
        "comment.text": ""
    },
    "general": {
        "dateTime": "2025-04-23T08:26:14Z",
        "orderId": "531",
        "sessionId": "012bb5b99f69e976d4ae297ef1dcfdc59790d0ecb3756126b6f4fd08663c5790",
        "shopId": "test-mgoepfrich",
        "shopLanguage": "Deutsch",
        "subshopId": "deutsch",
        "testMode": false
    },
    "order": {
        "currencyIso": "EUR",
        "currencySymbol": "€",
        "defaultTaxRate": "0.1900000",
        "delivererId": "dhl",
        "delivererOrderText": "DHL",
        "deliveryCost": "0.00",
        "deliveryTaxRate": "0.1900000",
        "paymentId": "bill",
        "paymentOrderText": "Rechnung",
        "priceType": "gross",
        "referer": "https://test-mgoepfrich.shop.websale.net/",
        "subreferer": "",
        "subtotal": "1055.67",
        "tax": "168.55",
        "total": "1055.67",
        "totalCommission": "0.00",
        "totalDiscount": "0.00",
        "totalVoucher": "0.00",
        "totalWeight": 0
    },
    "orderList": {
        "item": [
            {
                "basketId": "a954f8529d0a00df2f84",
                "discount": "0.00",
                "extraFields": {},
                "isAutoBasket": false,
                "isChangeable": true,
                "isRemovable": true,
                "isVisible": true,
                "itemNumber": "BD-0001",
                "name": "Damen NOOS High-Waist Curvy Skinny Jeans",
                "orgPrice": "0.00",
                "price": "31.99",
                "productId": "100-69659",
                "quantity": "33.00",
                "singleTotal": "31.99",
                "taxId": "19",
                "taxRate": "0.1900000",
                "total": "1055.67",
                "variantId": "2",
                "variantSelection": [
                    {
                        "attributeId": "Größe",
                        "optionId": "M"
                    }
                ],
                "weight": 0
            }
        ]
    },
    "paypal-checkout": {
        "executePayPalResponse": "",
        "expressCheckout": "false",
        "orderID": "",
        "paymentAction": "CAPTURE",
        "paymentID": "",
        "paymentMode": "PayPal",
        "paypalStatus": ""
    },
    "paypal-plus": {},
    "shippingAddress": null,
    "vouchers": null
}
```

## Methods for inquiries

### GET statistics/inquiries

This method returns statistical evaluations for the inquiry functions used in the shop (e.g. contact form, call-back service, complaint, etc.). The data is returned separately for each subshop and can be aggregated by hour, day or month.

The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To retrieve the data, the corresponding permissions to read statistics must be available.

#### Example

The example shown evaluates the number of inquiries in the period from 2024-02-29 to 2025-02-28 month by month — for the `deutsch` and `english` subshops.

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/inquiries/?from=2024-02-29T23:00:00.066Z&to=2025-02-28T22:59:59.066Z&aggregation=months&filter_eq[subshopId]=deutsch&filter_eq[subshopId]=english
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "deutsch": {
        "contact": [
            {
                "timestamp": "2024-10-01T00:38:42.000Z",
                "value": 4
            }
        ]
    }
}
```

#### Filter fields

`subshopID`

#### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from`, `to` or `aggregation` parameters are missing.    |
| 400 Bad Request         | "invalidValue"  |                                                              |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

### GET statistics/inquiries/duration

The processing times of the inquiries are returned. `value` indicates how many days were needed for processing. `count` indicates how often the value occurs.

The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To retrieve the data, the corresponding permissions to read statistics must be available.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/inquiries/duration/?from=2024-02-29T23:00:00.353Z&to=2025-02-28T22:59:59.353Z&filter_eq[subshopId]=deutsch&filter_eq[subshopId]=english
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "deutsch": {
        "contact": [
            {
                "count": 2,
                "value": 3
            }
        ],
        "productQuestion": [
            {
                "count": 1,
                "value": 6
            },
            {
                "count": 1,
                "value": 13
            }
        ]
    }
}
```

#### Filter fields

`subshopID`

#### Error codes

| **Error**        | **Type**       | **Reason**                                                   |
| ---------------- | -------------- | ------------------------------------------------------------ |
| 401 Unauthorized |                | Not authorized: you are not logged in.                       |
| 403 Forbidden    |                | You do not have the required permissions to read statistics. |
| 400 Bad Request  | "missing"      | The `from` or `to` parameters are missing.                   |
| 400 Bad Request  | "invalidValue" | `from` or `to` do not contain valid ISO 8601 time values.    |

## Methods for order statistics

### POST statistics/orders/hours

This endpoint returns hourly aggregated order statistics for the specified period.

In the request body, subshops can optionally be specified in order to restrict the evaluation. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/orders/hours?from=2025-04-30T22:00:00.000Z&to=2025-05-13T22:00:00.000Z
```

#### Request body

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "subshops": [
        "deutsch",
        "englisch"
    ]
}
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "accountTypeGuest": 0,
            "accountTypeNew": 0,
            "accountTypeRegistered": 1,
            "amount": 5,
            "amountTotal": 8.95,
            "country": "DE",
            "currency": "€",
            "deviceTypeDesktop": 1,
            "deviceTypeMobile": 0,
            "deviceTypeTablet": 0,
            "feeTotalOrder": 0.08,
            "itemsCount": 1,
            "logDate": "2025-05-20T14:00:00Z",
            "ordersCount": 1,
            "platformTypeApp": 0,
            "platformTypeWeb": 1,
            "subshopId": "deutsch",
            "totalDiscount": 0,
            "voucherCount": 0,
            "voucherValue": 0
        }
    ]
}
```

#### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

### POST statistics/orders/days

This endpoint returns daily aggregated order statistics for the specified period.

In the request body, subshops can optionally be specified in order to restrict the evaluation. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/orders/days?from=2025-04-30T22:00:00.000Z&to=2025-05-13T22:00:00.000Z
```

#### Request body

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "subshops": [
        "deutsch",
        "englisch"
    ]
}
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "accountTypeGuest": 0,
            "accountTypeNew": 0,
            "accountTypeRegistered": 2,
            "amount": 66.98,
            "amountTotal": 66.98,
            "country": "DE",
            "currency": "€",
            "deviceTypeDesktop": 2,
            "deviceTypeMobile": 0,
            "deviceTypeTablet": 0,
            "feeTotalOrder": 6.98,
            "itemsCount": 2,
            "logDate": "2025-05-16T00:00:00Z",
            "ordersCount": 2,
            "platformTypeApp": 0,
            "platformTypeWeb": 2,
            "subshopId": "deutsch",
            "totalDiscount": 0,
            "voucherCount": 0,
            "voucherValue": 0
        }
    ]
}
```

#### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

### POST statistics/orders/months

This endpoint returns monthly aggregated order statistics for the specified period.

In the request body, subshops can optionally be specified in order to restrict the evaluation. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/orders/months?from=2025-04-30T22:00:00.000Z&to=2025-05-13T22:00:00.000Z
```

#### Request body

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "subshops": [
        "deutsch",
        "englisch"
    ]
}
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "accountTypeGuest": 24,
            "accountTypeNew": 0,
            "accountTypeRegistered": 146,
            "amount": 23573.4,
            "amountTotal": 22705.61,
            "country": "DE",
            "currency": "€",
            "deviceTypeDesktop": 170,
            "deviceTypeMobile": 0,
            "deviceTypeTablet": 0,
            "feeTotalOrder": 235.73,
            "itemsCount": 311,
            "logDate": "2025-05-01T00:00:00Z",
            "ordersCount": 170,
            "platformTypeApp": 0,
            "platformTypeWeb": 170,
            "subshopId": "deutsch",
            "totalDiscount": 0,
            "voucherCount": 11,
            "voucherValue": 887.54
        }
    ]
}
```

#### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## Methods for sales

### GET statistics/sales

This endpoint returns revenues in the specified period, grouped by subshop and a selectable aggregation interval.

The aggregation can be in hours, days or months. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

#### Example

The example shown aggregates revenue in the period from 2025-04-22 to 2025-04-28 day by day.

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/sales?from=2025-04-22T22:00:00.000Z&to=2025-04-28T22:00:00.000Z&aggregation=days
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
[
    {
        "timestamp": "2025-04-22T22:00:00.000Z",
        "value": {
            "deutsch": 1150.64
        }
    },
    {
        "timestamp": "2025-04-23T22:00:00.000Z",
        "value": {}
    },
    {
        "timestamp": "2025-04-24T22:00:00.000Z",
        "value": {
            "deutsch": 323.91
        }
    },
    {
        "timestamp": "2025-04-25T22:00:00.000Z",
        "value": {}
    },
    {
        "timestamp": "2025-04-26T22:00:00.000Z",
        "value": {}
    },
    {
        "timestamp": "2025-04-27T22:00:00.000Z",
        "value": {
            "deutsch": 183.92
        }
    }
]
```

#### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from`, `to` or `aggregation` parameters are missing.    |
| 400 Bad Request         | "invalidValue"  |                                                              |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

### GET statistics/soldProducts

This endpoint returns sales figures in the specified period, grouped by subshop and a selectable aggregation interval.

The aggregation can be in hours, days or months. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

#### Example

The example shown aggregates sales figures in the period from 2025-07-02 to 2025-09-30 month by month.

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/soldProducts?from=2025-07-02T22:00:00.612Z&to=2025-09-30T21:59:59.612Z&aggregation=months
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
[
    {
        "timestamp": "2025-07-02T00:00:00.000Z",
        "value": {
            "deutsch": 9
        }
    },
    {
        "timestamp": "2025-08-02T00:00:00.000Z",
        "value": {
            "deutsch": 15
        }
    },
    {
        "timestamp": "2025-09-02T00:00:00.000Z",
        "value": {}
    }
]
```

#### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from`, `to` or `aggregation` parameters are missing.    |
| 400 Bad Request         | "invalidValue"  |                                                              |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

### POST statistics/sales/product

This endpoint returns the sales figures of selected products in the specified period, grouped by date and subshop.

The query is performed by providing a list of product IDs in the request body. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/sales/product?from=2025-04-30T22:00:00.000Z&to=2025-05-13T22:00:00.000Z
```

#### Request body

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "productIds": [
        "100-41232",
        "143-68071"
    ]
}
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "logDate": "2025-05-13 00:00:00",
            "productId": "143-68071",
            "sales": 1,
            "subshopId": "deutsch"
        }
    ]
}
```

#### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## Methods for newsletter statistics

### GET statistics/newsletter/subscribed

This endpoint returns the number of new newsletter subscribers in the specified period, grouped by the provided aggregation interval.

The evaluation can be restricted to individual subshops via the `subshopId` filter. Without the `filter_eq[subshopId]` parameter, all subshops are taken into account. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/newsletter/subscribed?from=2024-05-31T22:00:00.462Z&to=2025-05-31T21:59:59.462Z&aggregation=months&filter_eq[subshopId]=deutsch
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
[
    {
        "timestamp": "2025-04-25T00:00:00.000Z",
        "value": 3
    },
    {
        "timestamp": "2025-04-29T00:00:00.000Z",
        "value": 4
    }
]
```

#### Filter fields

`subshopId`

#### Error codes

| **Error**        | **Type**        | **Reason**                                                   |
| ---------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden    |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request  | "missing"       | The `aggregation` parameter is missing.                      |
| 400 Bad Request  | "invalidFormat" | `from` or `to` do not contain valid ISO 8601 time values.    |
| 400 Bad Request  | "invalidFormat" |                                                              |

### GET statistics/newsletter/unsubscribed

This endpoint returns the number of newsletter unsubscribes in the specified period, grouped by the provided aggregation interval.

The evaluation can be restricted to specific subshops via the `subshopId` filter. Without the `filter_eq[subshopId]` parameter, all subshops are taken into account. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/newsletter/unsubscribed?from=2025-04-12T22:00:00.926Z&to=2025-05-12T21:59:59.926Z&aggregation=days&filter_eq[subshopId]=deutsch&filter_eq[subshopId]=englisch
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
[
    {
        "timestamp": "2025-04-25T00:00:00.000Z",
        "value": 1
    }
]
```

#### Filter fields

`subshopId`

#### Error codes

| **Error**        | **Type**        | **Reason**                                                   |
| ---------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden    |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request  | "missing"       | The `aggregation` parameter is missing.                      |
| 400 Bad Request  | "invalidFormat" | `from` or `to` do not contain valid ISO 8601 time values.    |
| 400 Bad Request  | "invalidFormat" |                                                              |

## Methods for product rating statistics

### POST statistics/productrating

This endpoint returns all captured product ratings in the specified period, including rating texts, points, approval status and other metadata.

In addition to the rating, the results also contain information such as subshop, product ID, the rater and any merchant comments. If the `type` field contains the values `1` (`MostRated`) or `2` (`BestRated`), average values and the number of ratings may also occur.

It is possible to consider only specific subshops and, with `type=0`, only specific products. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, permissions to read statistics are required.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/productrating?from=2024-05-14T22:00:00.000Z&to=2025-05-15T10:49:09.230Z
```

#### Request body

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "subshops": [
        "deutsch",
        "englisch"
    ],
    "limit": 5,
    "type": 2
}
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "accountId": "37",
            "accountType": 2,
            "anonymous": false,
            "answeredAt": "2025-04-24 12:25:41",
            "approval": true,
            "avgRating": 4.5,
            "categoryId": "",
            "createdAt": "2025-04-23 12:52:14",
            "description": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Animi illum odit accusantium, ipsum pariatur laborum quos dolor nulla error deserunt placeat minima tempore vitae harum alias necessitatibus facere quae quidem!",
            "disapprovalReason": "",
            "id": 1,
            "merchantComment": "Das ist ein Test Kommentar.",
            "orderId": "536",
            "points": 4,
            "productId": "101-41470",
            "productType": "standard",
            "subject": "Lorem ipsum dolor sit amet consectetur",
            "subshopId": "deutsch"
        },
        {
            "accountId": "39",
            "accountType": 2,
            "anonymous": false,
            "answeredAt": "",
            "approval": false,
            "avgRating": 4.7,
            "categoryId": "",
            "createdAt": "2025-04-23 13:13:49",
            "description": "cool",
            "disapprovalReason": "",
            "id": 2,
            "merchantComment": "",
            "orderId": "553",
            "points": 5,
            "productId": "101-41470",
            "productType": "standard",
            "subject": "oh yea",
            "subshopId": "deutsch"
        },
        {
            "accountId": "37",
            "accountType": 2,
            "anonymous": true,
            "answeredAt": "2025-04-29 08:31:00",
            "approval": false,
            "avgRating": 3,
            "categoryId": "",
            "createdAt": "2025-04-24 12:39:19",
            "description": "asdfasdf Test 1233",
            "disapprovalReason": "Falsche angabe.",
            "id": 5,
            "merchantComment": "",
            "orderId": "557",
            "points": 3,
            "productId": "103-91837",
            "productType": "standard",
            "subject": "Verbesserung",
            "subshopId": "deutsch"
        },
        ...
    ]
}
```

#### Error codes

| **Error**        | **Type**       | **Reason**                                                                                     |
| ---------------- | -------------- | ---------------------------------------------------------------------------------------------- |
| 401 Unauthorized |                | Not authorized: you are not logged in.                                                         |
| 403 Forbidden    |                | You do not have the required permissions to read statistics.                                   |
| 400 Bad Request  | "missing"      | The `from` or `to` parameters are missing.                                                     |
| 400 Bad Request  | "invalidValue" | `from` or `to` do not contain valid ISO 8601 time values.<br />Statistics could not be loaded. |

### POST statistics/productrating/average

This endpoint returns the average rating value of all captured product ratings in the specified period.

The evaluation covers all ratings across all subshops. If the `"subshops"` field is provided, only the listed subshops are taken into account. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, permissions to read statistics are required.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/productrating/average?from=2024-05-14T22:00:00.000Z&to=2025-05-15T10:55:44.323Z
```

#### Request body

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "subshops": [
        "deutsch",
        "englisch"
    ]
}
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "data": "4.0"
}
```

#### Error codes

| **Error**        | **Type**       | **Reason**                                                                                     |
| ---------------- | -------------- | ---------------------------------------------------------------------------------------------- |
| 401 Unauthorized |                | Not authorized: you are not logged in.                                                         |
| 403 Forbidden    |                | You do not have the required permissions to read statistics.                                   |
| 400 Bad Request  | "missing"      | The `from` or `to` parameters are missing.                                                     |
| 400 Bad Request  | "invalidValue" | `from` or `to` do not contain valid ISO 8601 time values.<br />Statistics could not be loaded. |

### POST statistics/productrating/count

This endpoint returns the total number of all captured product ratings in the specified period.

The count covers all ratings regardless of their approval status. If the `"subshops"` field is provided, only the listed subshops are taken into account. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, permissions to read statistics are required.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/productrating/count?from=2024-05-14T22:00:00.000Z&to=2025-05-15T10:55:44.323Z
```

#### Request body

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "subshops": [
        "deutsch",
        "englisch"
    ]
}
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "data": 4
}
```

#### Error codes

| **Error**        | **Type**       | **Reason**                                                                                     |
| ---------------- | -------------- | ---------------------------------------------------------------------------------------------- |
| 401 Unauthorized |                | Not authorized: you are not logged in.                                                         |
| 403 Forbidden    |                | You do not have the required permissions to read statistics.                                   |
| 400 Bad Request  | "missing"      | The `from` or `to` parameters are missing.                                                     |
| 400 Bad Request  | "invalidValue" | `from` or `to` do not contain valid ISO 8601 time values.<br />Statistics could not be loaded. |

### POST statistics/productrating/averagecount

This endpoint returns the average rating value per product in the specified period.

The evaluation covers all ratings across all subshops. If the `"subshops"` field is provided, only the listed subshops are taken into account. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, permissions to read statistics are required.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/productrating/averagecount?from=2024-05-14T22:00:00.000Z&to=2025-05-15T10:55:44.323Z
```

#### Request body

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "subshops": [
        "deutsch",
        "englisch"
    ]
}
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "data": "1.3333"
}
```

#### Error codes

| **Error**        | **Type**       | **Reason**                                                                                     |
| ---------------- | -------------- | ---------------------------------------------------------------------------------------------- |
| 401 Unauthorized |                | Not authorized: you are not logged in.                                                         |
| 403 Forbidden    |                | You do not have the required permissions to read statistics.                                   |
| 400 Bad Request  | "missing"      | The `from` or `to` parameters are missing.                                                     |
| 400 Bad Request  | "invalidValue" | `from` or `to` do not contain valid ISO 8601 time values.<br />Statistics could not be loaded. |

## Methods for transactions & payment methods

### GET statistics/transactions

This endpoint returns a list of transactions with detailed order and payment information for the specified period, grouped by the selected aggregation interval.

The evaluation can be restricted to individual subshops via the `subshopId` filter. If no subshop ID is provided at all, no data is returned. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, permissions to read statistics are required.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/transactions?from=2024-02-29T23:00:00.635Z&to=2025-02-28T22:59:59.635Z&aggregation=months&filter_eq[subshopId]=deutsch&filter_eq[subshopId]=english
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "country": "Deutschland",
            "createdAt": "2024-10-10T12:00:00.000Z",
            "orderData": {
              ...
            },
            "paymentMethod": "PayPal Checkout (PayLater)",
            "paymentStatus": 4,
            "subshopId": "deutsch",
            "total": 11
        },
        {
            "country": "Deutschland",
            "createdAt": "2024-10-10T12:00:00.000Z",
            "orderData": {
                ...
            },
            "paymentMethod": "Rechnung",
            "paymentStatus": 1,
            "subshopId": "deutsch",
            "total": 11
        },
        ...
    ]
}
```

#### Filter fields

`subshopID`

#### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from`, `to` or `aggregation` parameters are missing.    |
| 400 Bad Request         | "invalidValue"  |                                                              |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

### GET statistics/transactions/tableData

This endpoint returns a tabular overview of the revenues, grouped by payment method and country, for the specified period.

The data is sorted by country and can additionally be limited via the `subshopId` and `country` filters. If no subshop ID or country is provided, no data is returned. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, permissions to read statistics are required.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/transactions/tableData?size=100&filter_eq[subshopId]=deutsch&filter_eq[subshopId]=english&filter_eq[country]=Deutschland&from=2025-05-09T22:00:00.681Z&to=2025-05-16T21:59:59.681Z&aggregation=days
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "country": "Deutschland",
            "paymentMethod": "PayPal Checkout",
            "total": 8.949999809265137
        },
        {
            "country": "Deutschland",
            "paymentMethod": "Sichere Zahlungsart",
            "total": 8.949999809265137
        }
    ]
}
```

#### Filter fields

`subshopID`, `country`

#### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from`, `to` or `aggregation` parameters are missing.    |
| 400 Bad Request         | "invalidValue"  |                                                              |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

### GET statistics/transactions/countries

This endpoint returns a list of all countries from which orders were placed in the shop.

The returned country values can be used for filtering in other transaction endpoints.

To use it, permissions to read statistics are required.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/transactions/countries
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": ["Deutschland"]
}
```

#### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

### GET statistics/transactions/methods

This endpoint returns a list of all payment methods used in the shop that have been captured in the transaction data.

The listed payment methods can be used for filtering in further statistical evaluations.

To use it, permissions to read statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/transactions/methods
```

### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        "Min Rechnung",
        "PayPal Checkout",
        "PayPal Checkout (PayLater)",
        "Rechnung",
        "Sichere Zahlungsart",
        "Vorauskasse"
    ]
}
```

### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

# Methods for access statistics

## GET statistics/access/currentVisitors

This endpoint returns the current number of visitors as well as the comparison value at the same time on the previous day.

The evaluation can be restricted to specific subshops via the `subshopId` filter or performed across subshops. Without the `filter_eq[subshopId]` parameter, all are taken into account.

To use it, read permissions for statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/currentVisitors
```

### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "numVisitors": 161,
    "numVisitorsYesterday": 50
}
```

### Filter fields

`subshopID`

### Error codes

| **Error**        | **Type** | **Reason**                                                   |
| ---------------- | -------- | ------------------------------------------------------------ |
| 401 Unauthorized |          | Not authorized: you are not logged in.                       |
| 403 Forbidden    |          | You do not have the required permissions to read statistics. |

## GET statistics/access/visitors

This endpoint returns the number of visitors (human users only) in the specified period, grouped by an aggregation interval.

The evaluation can be restricted to specific subshops via the `subshopId` filter. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/visitors?from=2025-03-31T22:00:00.000Z&to=2025-07-31T21:59:59.000Z&aggregation=month&filter_eq[subshopId]=deutsch&filter_eq[subshopId]=english
```

### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "count": 0,
            "key": 1740787200000,
            "key_as_string": "2025-03-01T00:00:00.000Z",
            "uniqueVisitors": {
                "value": 0
            }
        },
        {
            "count": 3212,
            "key": 1743465600000,
            "key_as_string": "2025-04-01T00:00:00.000Z",
            "uniqueVisitors": {
                "value": 1
            }
        },
        {
            "count": 9777,
            "key": 1746057600000,
            "key_as_string": "2025-05-01T00:00:00.000Z",
            "uniqueVisitors": {
                "value": 1
            }
        },
        {
            "count": 1346,
            "key": 1748736000000,
            "key_as_string": "2025-06-01T00:00:00.000Z",
            "uniqueVisitors": {
                "value": 1
            }
        }
    ]
}
```

### Filter fields

`subshopID`

### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from`, `to` or `aggregation` parameters are missing.    |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## GET statistics/access/robots

This endpoint returns the number of accesses by search engine bots in the specified period.

The data lets you evaluate bot traffic to the shop. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/robots?from=2025-05-19T12:58:15.873Z&to=2025-05-31T21:59:59.999Z
```

### Response

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
5623
```

### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## GET statistics/access/all

This endpoint returns the total number of visitors in the specified period.

The evaluation can be restricted to specific subshops via the `subshopId` filter. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/all?from=2025-05-08T22:00:00.795Z&to=2025-05-15T21:59:59.795Z&filter_eq[subshopId]=deutsch&filter_eq[subshopId]=englisch
```

### Response

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
171
```

### Filter fields

`subshopID`

### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## GET statistics/access/httpCodes

This endpoint returns an overview of how often certain HTTP status codes occurred in the specified period, including the associated paths.

The data lets you analyze system responses (e.g. 200, 301, 500) to different access requests. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/httpCodes?from=2025-05-01T07:51:51.600Z&to=2025-05-15T07:51:51.600Z
```

### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "count": 125742,
            "key": "200",
            "subStats": [
                {
                    "count": 86880,
                    "key": "/"
                },
                {
                    "count": 364,
                    "key": "/?wsvc=View&view=basket.htm"
                },
                {
                    "count": 308,
                    "key": "/?wsvc=View&view=error.htm"
                },
                {
                    "count": 98,
                    "key": "/?wsvc=Product&productId=140-23474"
                },
                {
                    "count": 97,
                    "key": "/checkout?step=3&payDelivChange=true"
                },
                ...
            ]
        },
        {
            "count": 536,
            "key": "302",
            "subStats": [
                {
                    "count": 119,
                    "key": "/?wsvc=View&view=basket.htm"
                },
                {
                    "count": 70,
                    "key": "/checkout?step=3&payDelivChange=true"
                },
                {
                    "count": 63,
                    "key": "/"
                },
                {
                    "count": 22,
                    "key": "/Bekleidung/Damen_NOOS_High-Waist_Curvy_Skinny_Jeans?varid=2"
                },
                {
                    "count": 22,
                    "key": "/checkout?step=2"
                },
                ...
            ]
        },
        {
            "count": 299,
            "key": "301",
            "subStats": [
                {
                    "count": 134,
                    "key": "/robots.txt"
                },
                {
                    "count": 23,
                    "key": "/favicon.ico"
                },
                {
                    "count": 9,
                    "key": "/(Null)"
                },
                {
                    "count": 6,
                    "key": "/checkout?step=3&payDelivChange=true"
                },
                {
                    "count": 3,
                    "key": "/.env"
                },
                {
                    "count": 3,
                    "key": "/_profiler/phpinfo"
                },
                {
                    "count": 2,
                    "key": "/?wsvc=View&view=account%2femailVerify.htm"
                },
                ...
            ]
        },
        {
            "count": 2,
            "key": "500",
            "subStats": [
                {
                    "count": 2,
                    "key": "/?wsvc=View&view=account%2fwatchlist.htm"
                }
            ]
        }
    ]
}
```

### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## GET statistics/access/os

This endpoint returns an overview of how often certain operating systems were used for accesses to the shop in the specified period.

The evaluation can be selectively restricted to individual subshops and device types via the `subshopId` and `device` filters. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/os?from=2025-05-01T07:51:51.598Z&to=2025-05-15T07:51:51.598Z&filter_eq[subshopId]=deutsch
```

### Response:

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}

    "items": [
        {
            "count": 86565,
            "key": "Other"
        },
        {
            "count": 36141,
            "key": "Android"
        },
        {
            "count": 3675,
            "key": "Windows"
        },
        {
            "count": 193,
            "key": "Linux"
        },
        {
            "count": 3,
            "key": "Mac OS X"
        },
        {
            "count": 2,
            "key": "iOS"
        }
    ]
}
```

### Filter fields

`subshopID`, `device`

### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## GET statistics/access/browser

This endpoint returns an evaluation of how often certain browsers — grouped by versions — were used in the specified period.

The analysis can be restricted to specific subshops and device types via the `subshopId` and `device` filters. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/browser?from=2025-05-01T07:51:51.599Z&to=2025-05-15T07:51:51.599Z&filter_eq[subshopId]=deutsch
```

### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "count": 86404,
            "group by major-version": {
                "buckets": [
                    {
                        "count": 86404,
                        "key": "1"
                    }
                ],
                "doc_count_error_upper_bound": 0,
                "sum_other_doc_count": 0
            },
            "key": "Go-http-client"
        },
        {
            "count": 36064,
            "group by major-version": {
                "buckets": [
                    {
                        "count": 36064,
                        "key": "2"
                    }
                ],
                "doc_count_error_upper_bound": 0,
                "sum_other_doc_count": 0
            },
            "key": "Googlebot"
        },
        {
            "count": 3363,
            "group by major-version": {
                "buckets": [
                    {
                        "count": 2566,
                        "key": "136"
                    },
                    {
                        "count": 755,
                        "key": "135"
                    },
                    {
                        "count": 17,
                        "key": "81"
                    },
                    ...
                ],
                "doc_count_error_upper_bound": 0,
                "sum_other_doc_count": 0
            },
            "key": "Chrome"
        },
        {
            "count": 372,
            "group by major-version": {
                "buckets": [
                    {
                        "count": 332,
                        "key": "138"
                    },
                    {
                        "count": 29,
                        "key": "137"
                    },
                    {
                        "count": 8,
                        "key": "120"
                    },
                    {
                        "count": 3,
                        "key": "136"
                    }
                ],
                "doc_count_error_upper_bound": 0,
                "sum_other_doc_count": 0
            },
            "key": "Firefox"
        },
        ...
    ]
}
```

### Filter fields

`subshopID`, `device`

### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## GET statistics/access/action

This endpoint returns an overview of how often certain shop actions were performed in the specified period.

The evaluation can be restricted to specific subshops via the `subshopId` filter. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/action?from=2025-04-15T07:51:51.601Z&to=2025-05-15T07:51:51.601Z&filter_eq[subshopId]=deutsch
```

### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "count": 87563,
            "key": "StartpageShow"
        },
        {
            "count": 37134,
            "key": "ProductShow"
        },
        {
            "count": 3824,
            "key": "ViewShow"
        },
        {
            "count": 1106,
            "key": "CategoryShow"
        },
        {
            "count": 259,
            "key": "BasketItemAdd"
        },
        {
            "count": 160,
            "key": "InquirySend"
        },
        {
            "count": 138,
            "key": "SearchShow"
        },
        {
            "count": 113,
            "key": "CheckPasswordStrength"
        },
        {
            "count": 109,
            "key": "WatchListItemAdd"
        },
        {
            "count": 106,
            "key": "Login"
        }
    ]
}
```

### Filter fields

`subshopID`

### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## GET statistics/access/importantActionsRate

This endpoint returns information about how many sessions in which important actions were performed. These include:

* Order
* Voucher redemption
* Registration
* Address update
* Submission of an inquiry
* Adding a product to the cart

If the `aggregation` parameter is set (`hour`, `day` or `month`; **without "s"**), the output is grouped by time. In addition, a restriction to specific subshops can be applied via the `subshopId` filter. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To determine the rate for aggregated data, the sum of `totalSessionCount.value` for each subshop should first be calculated. Then the `totalSessionCount.value` values should be divided by the sum.

To use it, read permissions for statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/importantActionsRate?from=2025-04-20T22:00:00.770Z&to=2025-05-20T21:59:59.770Z&aggregation=day&filter_eq[subshopId]=deutsch&filter_eq[subshopId]=english
```

### Response (aggregated data)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "count": 16,
            "key": 1747008000000,
            "key_as_string": "2025-05-12T00:00:00.000Z",
            "subshops": {
                "buckets": [
                    {
                        "count": 16,
                        "key": "deutsch",
                        "totalSessionCount": {
                            "value": 16
                        }
                    }
                ],
                "doc_count_error_upper_bound": 0,
                "sum_other_doc_count": 0
            }
        },
        {
            "count": 1,
            "key": 1747094400000,
            "key_as_string": "2025-05-13T00:00:00.000Z",
            "subshops": {
                "buckets": [
                    {
                        "count": 1,
                        "key": "deutsch",
                        "totalSessionCount": {
                            "value": 1
                        }
                    }
                ],
                "doc_count_error_upper_bound": 0,
                "sum_other_doc_count": 0
            }
        },
        {
            "count": 3,
            "key": 1747180800000,
            "key_as_string": "2025-05-14T00:00:00.000Z",
            "subshops": {
                "buckets": [
                    {
                        "count": 3,
                        "key": "deutsch",
                        "totalSessionCount": {
                            "value": 3
                        }
                    }
                ],
                "doc_count_error_upper_bound": 0,
                "sum_other_doc_count": 0
            }
        },
        {
            "count": 11,
            "key": 1747267200000,
            "key_as_string": "2025-05-15T00:00:00.000Z",
            "subshops": {
                "buckets": [
                    {
                        "count": 11,
                        "key": "deutsch",
                        "totalSessionCount": {
                            "value": 11
                        }
                    }
                ],
                "doc_count_error_upper_bound": 0,
                "sum_other_doc_count": 0
            }
        }
    ]
}
```

### Response (non-aggregated data)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "totalSessionCount": 58,
    "convertedSessionCount": 17,
    "convertedSessionRatio": 0.29310344827586204
}
```

### Filter fields

`subshopID`

### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## GET statistics/access/products

This endpoint returns a list of the most-visited products in the specified period, including access counts and product names.

The evaluation can be restricted to specific subshops via the `subshopId` filter. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/products?from=2025-05-08T22:00:00.395Z&to=2025-05-15T21:59:59.395Z&filter_eq[subshopId]=deutsch&filter_eq[subshopId]=englisch
```

### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "count": 108,
            "key": "144-11648",
            "max_score": 6.618824,
            "name": "Flyer Option 2"
        },
        {
            "count": 95,
            "key": "140-23474",
            "max_score": 6.618824,
            "name": "Flyer Option 1"
        },
        {
            "count": 50,
            "key": "163-44034",
            "max_score": 6.618824,
            "name": "Kapuzenjacke"
        },
        {
            "count": 16,
            "key": "153-83280",
            "max_score": 6.618824,
            "name": "Straight Fit Jeans"
        },
        ...
    ]
}
```

### Filter fields

`subshopID`

### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## GET statistics/access/categories

This endpoint returns a list of the most-visited categories in the specified period, including access counts and category names.

The evaluation can be restricted to specific subshops via the `subshopId` filter. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/categories?from=2025-05-14T12:00:00.167Z&to=2025-05-15T11:59:59.167Z&filter_eq[subshopId]=deutsch&filter_eq[subshopId]=englisch
```

### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "count": 73,
            "key": "104-40827",
            "max_score": 6.9967184,
            "name": "Sale"
        },
        {
            "count": 49,
            "key": "101-64607",
            "max_score": 6.9967184,
            "name": "Elektronik & Computer"
        },
        {
            "count": 39,
            "key": "100-14213",
            "max_score": 6.9967184,
            "name": "Bekleidung"
        },
        {
            "count": 35,
            "key": "102-42333",
            "max_score": 6.9967184,
            "name": "Drucksachen"
        },
        {
            "count": 32,
            "key": "106-25201",
            "max_score": 6.9967184,
            "name": "Tiernahrung"
        },
        {
            "count": 25,
            "key": "105-19647",
            "max_score": 6.9967184,
            "name": "Personalisierte Artikel"
        },
        ...
    ]
}
```

### Filter fields

`subshopID`

### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## GET statistics/access/devices

This endpoint returns an overview of how often certain device types were used for accesses to the shop in the specified period.

The evaluation can be restricted to specific subshops via the `subshopId` filter. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/devices?from=2025-05-08T22:00:00.381Z&to=2025-05-15T21:59:59.381Z&filter_eq[subshopId]=deutsch&filter_eq[subshopId]=englisch
```

### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "count": 61747,
            "key": "Spider"
        },
        {
            "count": 1490,
            "key": "Other"
        },
        {
            "count": 96,
            "key": "Nexus 5"
        },
        {
            "count": 23,
            "key": "Nexus 5X"
        },
        {
            "count": 3,
            "key": "Mac"
        },
        {
            "count": 2,
            "key": "iPhone"
        }
    ]
}
```

### Filter fields

`subshopID`

### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## GET statistics/access/devicesList

This endpoint returns a list of all captured devices with which the shop was accessed, including the respective access counts.

The data lets you analyze which end devices were used for shop visits. Unlike [GET statistics/access/devices](#1012-get-statistics-access-devices), the time range does not need to be specified.

To use it, read permissions for statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/devicesList
```

### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "count": 122513,
            "key": "Spider"
        },
        {
            "count": 10107,
            "key": "Other"
        },
        {
            "count": 137,
            "key": "Nexus 5"
        },
        {
            "count": 102,
            "key": "Nexus 5X"
        },
        {
            "count": 65,
            "key": "Mac"
        },
        {
            "count": 11,
            "key": "Samsung SM-J111F"
        },
        {
            "count": 10,
            "key": "K"
        },
        {
            "count": 5,
            "key": "iPhone"
        },
        {
            "count": 4,
            "key": "M2004J15SC"
        },
        {
            "count": 3,
            "key": "Samsung SM-G930V"
        },
        {
            "count": 3,
            "key": "Samsung SM-G965U"
        },
        {
            "count": 2,
            "key": "Samsung SM-G965F"
        },
        {
            "count": 1,
            "key": "Generic Feature Phone"
        },
        {
            "count": 1,
            "key": "HTC One M9"
        },
        {
            "count": 1,
            "key": "Huawei Crawler"
        },
        {
            "count": 1,
            "key": "Nokia E7-00"
        },
        {
            "count": 1,
            "key": "SM-T580"
        },
        {
            "count": 1,
            "key": "XiaoMi Mi MIX 2S"
        },
        {
            "count": 1,
            "key": "XiaoMi Redmi 6"
        },
        {
            "count": 1,
            "key": "XiaoMi Redmi Note 4"
        }
    ]
}
```

### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## GET statistics/access/clicksCountPerSession

This endpoint returns the average number of clicks per visit (session) in the specified period, calculated exactly without rounding.

The evaluation can be restricted to individual subshops via the `subshopId` filter. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/clicksCountPerSession?from=2025-05-08T22:00:00.387Z&to=2025-05-15T21:59:59.387Z&filter_eq[subshopId]=deutsch&filter_eq[subshopId]=english
```

### Response

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
15.444444444444445
```

### Filter fields

`subshopID`

### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## GET statistics/access/clicksCountPerUser

This endpoint returns the average number of clicks per visitor in the specified period.

The evaluation can be restricted to specific subshops via the `subshopId` filter. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/clicksCountPerUser?from=2025-04-15T22:00:00.942Z&to=2025-05-15T21:59:59.942Z&filter_eq[subshopId]=deutsch&filter_eq[subshopId]=english
```

### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "averageClicksCount": 8
}
```

### Filter fields

`subshopID`

### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## GET statistics/access/trafficPeaks

This endpoint returns the times with the highest simultaneous user counts (traffic peaks) within a defined period, separated by subshop.

Aggregation is done by `hours`, `days` or `months` and is required. In addition, a targeted restriction to individual subshops can be applied via the `subshopId` filter. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/trafficPeaks?from=2025-05-13T22:00:00.394Z&to=2025-05-20T21:59:59.394Z&aggregation=days&filter_eq[subshopId]=deutsch&filter_eq[subshopId]=english
```

### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "maxUsers": 2,
            "subshopId": "deutsch",
            "timestamp": "2024-10-25T17:02:34.000Z"
        },
        {
            "maxUsers": 2,
            "subshopId": "english",
            "timestamp": "2024-10-25T17:02:34.000Z"
        },
        {
            "maxUsers": 2,
            "subshopId": "deutsch",
            "timestamp": "2024-12-11T14:11:07.000Z"
        },
        {
            "maxUsers": 0,
            "subshopId": "english",
            "timestamp": "2024-12-11T14:11:07.000Z"
        },
        {
            "maxUsers": 0,
            "subshopId": "deutsch",
            "timestamp": "2025-01-30T18:35:06.000Z"
        },
        {
            "maxUsers": 0,
            "subshopId": "english",
            "timestamp": "2025-01-30T18:35:06.000Z"
        },
        {
            "maxUsers": 2,
            "subshopId": "deutsch",
            "timestamp": "2025-03-02T05:04:12.000Z"
        },
        {
            "maxUsers": 0,
            "subshopId": "english",
            "timestamp": "2025-03-02T05:04:12.000Z"
        }
    ]
}
```

### Filter fields

`subshopID`

### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from`, `to` or `aggregation` parameters are missing.    |
| 400 Bad Request         | "invalidValue"  |                                                              |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## GET statistics/access/sessionsWithoutRouting

This endpoint returns the number of sessions without further navigation in the shop (bounces) for a specific period, optionally grouped by time and subshop.

If the `aggregation` parameter is set (`hour`, `day` or `month`; **without "s"**), the output is grouped by time. In addition, a restriction to specific subshops can be applied via the `subshopId` filter. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To calculate the bounce rate for aggregated data, first fetch the number of sessions for each subshop with GET statistics/access/totalSessionCount and divide `filteredSessionsCount.value` by this number. For non-aggregated data — simply divide the response by the number of sessions in the same period.

To use it, read permissions for statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/sessionsWithoutRouting?from=2025-05-08T22:00:00.226Z&to=2025-05-15T21:59:59.226Z&aggregation=day&filter_eq[subshopId]=deutsch&filter_eq[subshopId]=englisch
```

### Response (aggregated data)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "count": 0,
            "key": 1746662400000,
            "key_as_string": "2025-05-08T00:00:00.000Z",
            "subshops": {
                "buckets": [],
                "doc_count_error_upper_bound": 0,
                "sum_other_doc_count": 0
            }
        },
        {
            "count": 225,
            "key": 1746748800000,
            "key_as_string": "2025-05-09T00:00:00.000Z",
            "subshops": {
                "buckets": [
                    {
                        "count": 224,
                        "filteredSessionsCount": {
                            "value": 17
                        },
                        "key": "deutsch",
                        "sessions": {
                            "buckets": [
                                {
                                    "count": 1,
                                    "key": "0be4a6fc98c6f6ae5cb62ce74389970e2f6e498602ae9b311fa31661bab87cda",
                                    "logs_per_session": {
                                        "value": 1
                                    }
                                },
                                {
                                    "count": 1,
                                    "key": "0f87fa4ba5e977dfeb7e6efa1090ba0ae23cbad879920764b9ef662084aeacee",
                                    "logs_per_session": {
                                        "value": 1
                                    }
                                },
                                ...
                            ],
                            "doc_count_error_upper_bound": 0,
                            "sum_other_doc_count": 0
                        }
                    },
                    {
                        "count": 1,
                        "filteredSessionsCount": {
                            "value": 1
                        },
                        "key": "englisch",
                        "sessions": {
                            "buckets": [
                                {
                                    "count": 1,
                                    "key": "9812acafed4ec9b861a36d93c4ab5ecc233a4878816d28115f80c9753f60a1f3",
                                    "logs_per_session": {
                                        "value": 1
                                    }
                                }
                            ],
                            "doc_count_error_upper_bound": 0,
                            "sum_other_doc_count": 0
                        }
                    }
                ],
                "doc_count_error_upper_bound": 0,
                "sum_other_doc_count": 0
            }
        },
        {
            "count": 45,
            "key": 1746835200000,
            "key_as_string": "2025-05-10T00:00:00.000Z",
            "subshops": {
                "buckets": [
                    {
                        "count": 45,
                        "filteredSessionsCount": {
                            "value": 45
                        },
                        "key": "deutsch",
                        "sessions": {
                            "buckets": [
                                {
                                    "count": 1,
                                    "key": "03d8ace9db7bcf1561085682171bde8ca5f61f31c90a86012ece5991c384f8b4",
                                    "logs_per_session": {
                                        "value": 1
                                    }
                                },
                                {
                                    "count": 1,
                                    "key": "07cba5bf5610783ef77f4a5890f8d974b081f0b4dd137ccd6a28e049d6c50dc5",
                                    "logs_per_session": {
                                        "value": 1
                                    }
                                },
                                ...
                            ],
                            "doc_count_error_upper_bound": 0,
                            "sum_other_doc_count": 0
                        }
                    }
                ],
                "doc_count_error_upper_bound": 0,
                "sum_other_doc_count": 0
            }
        },
        ...
    ]
}
```

### Response (non-aggregated data)

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
3.0
```

### Filter fields

`subshopID`

### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## GET statistics/access/totalSessionCount

This endpoint returns the total number of all sessions in the specified period, optionally grouped by an aggregation interval.

If the `aggregation` parameter is set (`hour`, `day` or `month`; **without "s"**), the output is grouped by time. In addition, a restriction to specific subshops can be applied via the `subshopId` filter. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/totalSessionCount?from=2025-05-08T22:00:00.226Z&to=2025-05-15T21:59:59.226Z&aggregation=day&filter_eq[subshopId]=englisch
```

### Response (aggregated data)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "count": 3,
            "key": 1744761600000,
            "key_as_string": "2025-04-16T00:00:00.000Z",
            "uniqueSessions": {
                "value": 3
            }
        },
        {
            "count": 24,
            "key": 1744848000000,
            "key_as_string": "2025-04-17T00:00:00.000Z",
            "uniqueSessions": {
                "value": 8
            }
        },
        {
            "count": 1,
            "key": 1744934400000,
            "key_as_string": "2025-04-18T00:00:00.000Z",
            "uniqueSessions": {
                "value": 1
            }
        },
        {
            "count": 2,
            "key": 1745020800000,
            "key_as_string": "2025-04-19T00:00:00.000Z",
            "uniqueSessions": {
                "value": 2
            }
        },
        {
            "count": 1,
            "key": 1745107200000,
            "key_as_string": "2025-04-20T00:00:00.000Z",
            "uniqueSessions": {
                "value": 1
            }
        },
        {
            "count": 1,
            "key": 1745193600000,
            "key_as_string": "2025-04-21T00:00:00.000Z",
            "uniqueSessions": {
                "value": 1
            }
        },
        {
            "count": 386,
            "key": 1745280000000,
            "key_as_string": "2025-04-22T00:00:00.000Z",
            "uniqueSessions": {
                "value": 35
            }
        },
        ...
    ]
}
```

### Response (non-aggregated data)

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
25544
```

### Filter fields

`subshopID`

### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## GET statistics/access/referer

This endpoint returns a list of the referrer domains through which visitors reached the shop in the specified period.

The evaluation can be restricted to individual subshops via the `subshopId` filter. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/referer?from=2025-05-08T22:00:00.388Z&to=2025-05-15T21:59:59.388Z&filter_eq[subshopId]=deutsch&filter_eq[subshopId]=englisch
```

### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "count": 1089,
            "key": "test-mgoepfrich.shop.websale.net"
        },
        {
            "count": 143,
            "key": "localhost:8000"
        },
        {
            "count": 5,
            "key": "test-mgoepfrich-en.shop.websale.net"
        },
        {
            "count": 3,
            "key": "test-mgoepfrich.shop.websale.net:443"
        },
        {
            "count": 3,
            "key": "websale.atlassian.net"
        },
        {
            "count": 2,
            "key": "185.126.240.133:80"
        },
        {
            "count": 1,
            "key": "www.google.com"
        }
    ]
}
```

### Filter fields

`subshopID`

### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## GET statistics/access/countries

This endpoint returns an overview of the number of page views by country of origin in the specified period.

The evaluation can be restricted to specific subshops via the `subshopId` filter. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/countries?from=2025-04-15T22:00:00.225Z&to=2025-05-15T21:59:59.225Z&filter_eq[subshopId]=deutsch&filter_eq[subshopId]=englisch
```

### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "count": 73684,
            "key": "DE"
        },
        {
            "count": 36390,
            "key": "US"
        },
        {
            "count": 21731,
            "key": "AT"
        },
        {
            "count": 125,
            "key": "SG"
        },
        {
            "count": 22,
            "key": "CA"
        },
        {
            "count": 20,
            "key": "SC"
        },
        {
            "count": 19,
            "key": "IE"
        },
        {
            "count": 17,
            "key": "CH"
        },
        {
            "count": 11,
            "key": "FR"
        },
        {
            "count": 7,
            "key": "AU"
        }
    ]
}
```

### Filter fields

`subshopID`

### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## GET statistics/access/lengthOfStay

This endpoint returns the average length of stay in seconds for a defined period, optionally grouped by a supplied aggregation interval.

The `aggregation` parameter should always be present. The aggregation is done using the values `hours`, `days` or `months`; with other values, no aggregation occurs. In addition, the evaluation can be restricted to specific subshops via the `subshopId` filter. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/lengthOfStay?from=2024-05-31T22:00:00.168Z&to=2025-05-31T21:59:59.168Z&aggregation=months&filter_eq[subshopId]=deutsch&filter_eq[subshopId]=english
```

### Response (aggregated data)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "subshopId": "deutsch",
            "timestamp": "2025-02-26 08:41:12",
            "value": 162
        },
        {
            "subshopId": "deutsch",
            "timestamp": "2025-03-01 16:21:41",
            "value": 37
        },
        {
            "subshopId": "deutsch",
            "timestamp": "2024-11-07 15:31:17",
            "value": 857
        },
        {
            "subshopId": "english",
            "timestamp": "2024-11-06 13:41:37",
            "value": 610
        }
    ]
}
```

### Response (non-aggregated data)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "subshopId": "deutsch",
            "timestamp": "2024-11-06 13:41:37",
            "value": 352
        }
    ]
}
```

### Filter fields

`subshopID`

### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from`, `to` or `aggregation` parameters are missing.    |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

### GET statistics/access/allPageViews

This endpoint returns the total number of all page views in the specified period, optionally grouped by time interval and subshop.

If the `aggregation` parameter is provided (`hour`, `day` or `month`; **without "s"**), the data is returned grouped accordingly. Via the `subshopId` filter the evaluation can be restricted to individual subshops. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/allPageViews?from=2025-05-14T09:00:00.247Z&to=2025-05-15T08:59:59.247Z&aggregation=hour&filter_eq[subshopId]=deutsch&filter_eq[subshopId]=englisch
```

#### Response (aggregated data)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "count": 2649,
            "key": 1746662400000,
            "key_as_string": "2025-05-08T00:00:00.000Z",
            "subshops": {
                "buckets": [
                    {
                        "count": 1390,
                        "key": "deutsch"
                    },
                    {
                        "count": 1259,
                        "key": "englisch"
                    }
                ],
                "doc_count_error_upper_bound": 0,
                "sum_other_doc_count": 0
            }
        },
        {
            "count": 8209,
            "key": 1746748800000,
            "key_as_string": "2025-05-09T00:00:00.000Z",
            "subshops": {
                "buckets": [
                    {
                        "count": 4383,
                        "key": "deutsch"
                    },
                    {
                        "count": 3826,
                        "key": "englisch"
                    }
                ],
                "doc_count_error_upper_bound": 0,
                "sum_other_doc_count": 0
            }
        },
        {
            "count": 7727,
            "key": 1746835200000,
            "key_as_string": "2025-05-10T00:00:00.000Z",
            "subshops": {
                "buckets": [
                    {
                        "count": 3897,
                        "key": "deutsch"
                    },
                    {
                        "count": 3830,
                        "key": "englisch"
                    }
                ],
                "doc_count_error_upper_bound": 0,
                "sum_other_doc_count": 0
            }
        },
        ...
    ]
}
```

#### Response (non-aggregated data)

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
13126
```

#### Filter fields

`subshopID`

#### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

### GET statistics/access/accountType

This endpoint returns an evaluation of the customer types that accessed the shop in the specified period.

The analysis is optionally filtered by one or more subshops. Without a filter, all subshops are taken into account. The time range is defined via the `from` and `to` parameters in ISO 8601 format.

Possible values for `accountType`:

`-1` → Not selected\
`0` → Guest\
`1` → New customer\
`2` → Customer

To use it, read permissions for statistics are required.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/accountType?from=2024-05-31T22:00:00.979Z&to=2025-05-31T21:59:59.979Z&filter_eq[subshopId]=deutsch&filter_eq[subshopId]=english
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "accountType": -1,
            "data": 33
        },
        {
            "accountType": 1,
            "data": 1
        },
        {
            "accountType": 2,
            "data": 15
        }
    ]
}
```

#### Filter fields

`subshopID`

#### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

### GET statistics/access/browserList

This endpoint returns a list of all browsers used to access the shop, including the respective access counts.

The data is used to analyze the browsers in use among shop visitors. Unlike [GET statistics/access/browser](#107-get-statistics-access-browser), the time range does not need to be specified.

To use it, read permissions for statistics are required.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/browserList
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "count": 22228,
            "key": "Chrome"
        },
        {
            "count": 33,
            "key": "Firefox"
        },
        {
            "count": 21,
            "key": "Edge"
        }
    ]
}
```

#### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

### GET statistics/access/OSList

This endpoint returns an overview of all operating systems through which accesses to the shop occurred, including the respective access counts.

The data lets you evaluate the platforms used by shop visitors. Unlike [GET statistics/access/os](https://websale.atlassian.net/wiki/spaces/WSDOKU/pages/3058532957/API-Referenz+Statistiken#106-get-statistics-access-os), the time range does not need to be specified.

To use it, read permissions for statistics are required.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/OSList
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "count": 81353,
            "key": "Other"
        },
        {
            "count": 32327,
            "key": "Android"
        },
        {
            "count": 9243,
            "key": "Windows"
        },
        {
            "count": 411,
            "key": "Linux"
        },
        {
            "count": 65,
            "key": "Mac OS X"
        },
        {
            "count": 14,
            "key": "Ubuntu"
        },
        {
            "count": 3,
            "key": "iOS"
        },
        {
            "count": 1,
            "key": "Maemo"
        },
        {
            "count": 1,
            "key": "Symbian^3"
        }
    ]
}
```

#### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

### GET statistics/access/actionsList

This endpoint returns a list of all actions captured in the shop and their respective frequencies.

The data tells you how often certain user actions such as page views or checkout steps were performed. Unlike [GET statistics/access/action](https://websale.atlassian.net/wiki/spaces/WSDOKU/pages/3058532957/API-Referenz+Statistiken#108-get-statistics-access-action), the time range does not need to be specified.

To use it, read permissions for statistics are required.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/access/actionsList
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "count": 1043627,
            "key": "ViewShow"
        },
        {
            "count": 663337,
            "key": "StartpageShow"
        },
        {
            "count": 387712,
            "key": "CategoryShow"
        },
        {
            "count": 95638,
            "key": "ProductShow"
        },
        {
            "count": 32215,
            "key": "SearchShow"
        },
        {
            "count": 25625,
            "key": "CheckoutSetFreeFields"
        },
        {
            "count": 22610,
            "key": "CheckoutAccountTypeSelect"
        },
        {
            "count": 11619,
            "key": "CheckoutConfirm"
        },
        {
            "count": 9457,
            "key": "DirectOrderAdd"
        },
        {
            "count": 7931,
            "key": "InquirySend"
        },
        ...
    ]
}
```

#### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## Additional endpoints

### GET statistics/newlyRegistered

This endpoint returns the number of new registrations in the specified period, grouped by a selectable aggregation interval.

The time range is defined via the `from` and `to` parameters in ISO 8601 format. The aggregation is done in hours, days or months; other values are converted automatically accordingly.

To use it, read permissions for statistics are required.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/newlyRegistered?from=2025-04-27T22:00:00.000Z&to=2025-05-9T14:53:01.470Z&aggregation=days
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
[
    {
        "timestamp": "2025-04-27T22:00:00.000Z",
        "value": 1
    },
    {
        "timestamp": "2025-04-28T22:00:00.000Z",
        "value": 1
    },
    {
        "timestamp": "2025-04-29T22:00:00.000Z",
        "value": 4
    },
    {
        "timestamp": "2025-04-30T22:00:00.000Z",
        "value": 0
    },
    {
        "timestamp": "2025-05-01T22:00:00.000Z",
        "value": 0
    },
    {
        "timestamp": "2025-05-02T22:00:00.000Z",
        "value": 0
    },
    {
        "timestamp": "2025-05-03T22:00:00.000Z",
        "value": 0
    },
    {
        "timestamp": "2025-05-04T22:00:00.000Z",
        "value": 2
    },
    {
        "timestamp": "2025-05-05T22:00:00.000Z",
        "value": 0
    },
    {
        "timestamp": "2025-05-06T22:00:00.000Z",
        "value": 6
    },
    {
        "timestamp": "2025-05-07T22:00:00.000Z",
        "value": 0
    },
    {
        "timestamp": "2025-05-08T22:00:00.000Z",
        "value": 3
    }
]
```

#### Error codes

| **Error**        | **Type**       | **Reason**                                                   |
| ---------------- | -------------- | ------------------------------------------------------------ |
| 401 Unauthorized |                | Not authorized: you are not logged in.                       |
| 403 Forbidden    |                | You do not have the required permissions to read statistics. |
| 400 Bad Request  | "missing"      | The `from`, `to` or `aggregation` parameters are missing.    |
| 400 Bad Request  | "invalidValue" |                                                              |

### POST statistics/visitors

This endpoint returns the daily visitor numbers of the subshops for a freely selectable period.

The time range is defined via the `from` and `to` parameters in ISO 8601 format.

To use it, read permissions for statistics are required.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/statistics/visitors?from=2025-04-19T22:00:00.000Z&to=2025-05-14T15:07:02.027Z
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "appUsersNumber": 0,
            "date": "2025-04-20T00:00:00Z",
            "ordersNumber": 0,
            "subshopId": "deutsch",
            "visitorsNumber": 2
        },
        {
            "appUsersNumber": 0,
            "date": "2025-04-21T00:00:00Z",
            "ordersNumber": 0,
            "subshopId": "deutsch",
            "visitorsNumber": 1
        },
        {
            "appUsersNumber": 0,
            "date": "2025-04-22T00:00:00Z",
            "ordersNumber": 0,
            "subshopId": "deutsch",
            "visitorsNumber": 18
        },
        {
            "appUsersNumber": 0,
            "date": "2025-04-23T00:00:00Z",
            "ordersNumber": 4,
            "subshopId": "deutsch",
            "visitorsNumber": 14
        },
        {
            "appUsersNumber": 0,
            "date": "2025-04-24T00:00:00Z",
            "ordersNumber": 0,
            "subshopId": "deutsch",
            "visitorsNumber": 12
        },
        {
            "appUsersNumber": 0,
            "date": "2025-04-25T00:00:00Z",
            "ordersNumber": 1,
            "subshopId": "deutsch",
            "visitorsNumber": 8
        },
        {
            "appUsersNumber": 0,
            "date": "2025-04-26T00:00:00Z",
            "ordersNumber": 0,
            "subshopId": "deutsch",
            "visitorsNumber": 15
        },
        {
            "appUsersNumber": 0,
            "date": "2025-04-28T00:00:00Z",
            "ordersNumber": 1,
            "subshopId": "deutsch",
            "visitorsNumber": 24
        },
        {
            "appUsersNumber": 0,
            "date": "2025-04-28T00:00:00Z",
            "ordersNumber": 0,
            "subshopId": "englisch",
            "visitorsNumber": 19
        },
        ...
    ]
}
```

#### Error codes

| **Error**               | **Type**        | **Reason**                                                   |
| ----------------------- | --------------- | ------------------------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.                       |
| 403 Forbidden           |                 | You do not have the required permissions to read statistics. |
| 400 Bad Request         | "missing"       | The `from` or `to` parameters are missing.                   |
| 400 Bad Request         | "invalidValue"  | `from` or `to` do not contain valid ISO 8601 time values.    |
| 503 Service Unavailable | "internalError" | Statistics could not be loaded.                              |

## Support

Bei technischen Fragen und Hilfestellungen ist unser Support-Team für Sie erreichbar: [Zum Kundenportal](https://websale.atlassian.net/servicedesk/customer/portal/6)

Bitte senden Sie uns eine möglichst detaillierte Beschreibung sowie Screenshots, Requests/Antworten, damit wir Ihre Anfrage zeitnah und zielführend beantworten können.
