---
title: "Turnover over a period, compared with the same period one year earlier and with the period of equal length immediately before it"
method: GET
path: "/v1/statistics/turnovercomparison"
tags: ["Statistics"]
---

# Turnover over a period, compared with the same period one year earlier and with the period of equal length immediately before it

`GET /v1/statistics/turnovercomparison`

## Request

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

## Query parameters

- `from` string, date
- `to` string, date
- `year` integer
- `expenses` boolean
- `paid` boolean

## Response `200`

OK

- TurnoverComparisonResult: A period against the two references that make it readable: the same period one year earlier, and the period of equal length immediately before it.
  - `current` TurnoverPeriodValue: A turnover total over a period
    - `label` string, nullable: Display label: the year for a whole calendar year, otherwise the bounds
    - `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: Total turnover amount (tax excluded)
  - `precedingPeriod` TurnoverPeriodValue: A turnover total over a period
    - `label` string, nullable: Display label: the year for a whole calendar year, otherwise the bounds
    - `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: Total turnover amount (tax excluded)
  - `previousYear` TurnoverPeriodValue: A turnover total over a period
    - `label` string, nullable: Display label: the year for a whole calendar year, otherwise the bounds
    - `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: Total turnover amount (tax excluded)

## Changes

- **2026-09-14** `4f7fa64cf9e3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/altoviz/apis/altoviz-api/changes/v1/statistics/turnovercomparison/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)
