---
title: "Get history statistics"
method: GET
path: "/api/v1/sa/repricer/history/stats"
tags: ["Repricer"]
---

# Get history statistics

`GET /api/v1/sa/repricer/history/stats`

## Request

- Base URL: `https://app.sellerassistant.app` (the document declares no server; this is the origin it was published from)
- URL: `https://app.sellerassistant.app/api/v1/sa/repricer/history/stats`
- Auth: one of:
  - API key in query parameter `api_key`
  - API key in header `X-Api-Key`

Gives the statistics of the repricing runs of the team: the number of runs by type and status, the success rate and the average price change. The history keeps 32 days. A start date before that starts at the 32-day limit.

## Query parameters

- `from_date` string, date
- `to_date` string, date
- `period` string

## Response `200`

Successful response. See HistoryStats schema for details.

- object
  - `data` HistoryStats
    - `period` object, required
      - `from` string, date: Period start date.
      - `to` string, date: Period end date.
    - `products` object, required
      - `total` integer: Total repricer products in team scope.
      - `by_priority` object: Product counts grouped by reprice priority.
      - `by_mode` object: Product counts grouped by effective mode.
    - `operations` object, required
      - `total` integer: Total repricing operations in selected period.
      - `by_type` object: Operation counts grouped by priority/type.
      - `by_status` object: Operation counts grouped by final status.
      - `success_rate` string, decimal: Operation success rate in percent.
    - `prices` object, required
      - `avg_change` string, decimal: Average signed price change.
      - `avg_rise` string, decimal: Average increase among rising price operations.
      - `avg_drop` string, decimal: Average decrease among dropping price operations.
      - `total_drop` string, decimal: Total absolute decrease across dropping operations.
      - `total_rise` string, decimal: Total absolute increase across rising operations.

## Other responses

- `400`: Bad request - validation failed or invalid parameters
- `402`: Payment Required - subscription expired or payment method required
- `403`: Access denied - insufficient permissions, invalid API key, or the API request limit is used up (`public_api_key_limit`)
- `404`: Resource not found
- `422`: Business logic error - operation cannot be completed due to business rules
- `429`: Too many requests - rate limit exceeded
- `503`: A service of ours did not answer. The call is right, and it can run again later.

---

[API](https://skmtc.dev/sellerassistant/apis/seller-assistant-public-api.md) · [All operations](https://skmtc.dev/sellerassistant/apis/seller-assistant-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sellerassistant/apis/seller-assistant-public-api/revisions/5b3ecdbcadb6?raw)
