---
title: "Turnover over a period, bucketed, optionally compared against the same period in previous years"
method: GET
path: "/v1/statistics/turnoverevolution"
tags: ["Statistics"]
---

# Turnover over a period, bucketed, optionally compared against the same period in previous years

`GET /v1/statistics/turnoverevolution`

## Request

- Base URL: `https://api.altoviz.com`
- URL: `https://api.altoviz.com/v1/statistics/turnoverevolution`
- Auth: none required
- TypeScript: <https://skmtc.dev/altoviz/apis/altoviz-api/docs/v1/statistics/turnoverevolution/get.ts> (a function with typed inputs; its response is checked against the schema)

## Query parameters

- `from` string, date
- `to` string, date
- `year` integer
- `periodicity` 'Daily' | 'Weekly' | 'Monthly' | 'Quarterly' | 'Annually'
- `compare` integer
- `type` 'Sales' | 'Expenses' | 'Customer' | 'Supplier' | 'Product' | 'Colleague' | 'Margin' | 'Discount': Dimension used to break down turnover evolution
- `cumulative` boolean
- `customerId` integer
- `supplierId` integer
- `colleagueId` integer
- `productId` integer

## Response `200`

OK

- TurnoverEvolutionResult: Turnover bucketed over a period. Every series holds the same number of buckets and bucket N of each series covers the same period shifted by its `offset` in years, so series can be compared index by index.
  - `periodicity` 'Daily' | 'Weekly' | 'Monthly' | 'Quarterly' | 'Annually'
  - `range` DateRangeModel: An inclusive date range
    - `from` string, date: First day of the period
    - `to` string, date: Last day of the period, included
  - `series` PeriodSeriesModel[], nullable: The requested period first, then any comparison periods
    - `buckets` PeriodBucketModel[], nullable: Values, one per bucket
      - `partial` boolean: True when the calendar period was clipped by the requested range, so the bucket holds less than a full month/quarter/week of activity and must not be compared at face value.
      - `range` DateRangeModel: An inclusive date range
        - `from` string, date: First day of the period
        - `to` string, date: Last day of the period, included
      - `value` number, double: Amount (tax excluded)
    - `label` string, nullable: Display label: the year for a whole calendar year, otherwise the bounds
    - `offset` integer: 0 for the requested period, 1 for one calendar year earlier, and so on
    - `range` DateRangeModel: An inclusive date range
      - `from` string, date: First day of the period
      - `to` string, date: Last day of the period, included

## Changes

- **2026-09-14** `4f7fa64cf9e3`: 3 breaking, 1 warning, 15 info
  - the response's body type changed from `array` to `object` for status `200` (media type: text/plain)
  - the response's body type changed from `array` to `object` for status `200` (media type: application/json)
  - the response's body type changed from `array` to `object` for status `200` (media type: text/json)
  - deleted the `query` request parameter `years`
  - …15 more

[Operation history](https://skmtc.dev/altoviz/apis/altoviz-api/changes/v1/statistics/turnoverevolution/get.md)

---

[API](https://skmtc.dev/altoviz/apis/altoviz-api.md) - [All operations](https://skmtc.dev/altoviz/apis/altoviz-api/llms.txt) - [OpenAPI document](https://skmtc.dev/altoviz/apis/altoviz-api/revisions/4f7fa64cf9e3?raw)
