---
title: "Get chart data"
method: POST
path: "/api/v1/charts/totals"
tags: ["charts"]
---

# Get chart data

`POST /api/v1/charts/totals`

## Request

- Base URL: `https://demo.invoiceninja.com`
- URL: `https://demo.invoiceninja.com/api/v1/charts/totals`
- Auth: none declared. Required headers: `X-API-TOKEN`, `X-Requested-With`
- TypeScript: <https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/docs/api/v1/charts/totals/post.ts> (a function with typed inputs; its response is checked against the schema)

Get chart data

## Query parameters

- `include` string
- `index` string
- `rows` number

## Headers

- `X-API-TOKEN` string, required
- `X-Requested-With` string, required

## Response `200`

json dataset of chart data

## Other responses

- `422`: Validation error
- `429`: Rate Limit Exceeded
- `5XX`: Server error
- `default`: Unexpected Error

## Changes

- **2024-06-06** `8e82a2bd77e0`: 1 breaking, 2 info
  - the response's body type changed from no type to `object` for status `default`
  - added the optional property `code` to the response with the `default` status
  - added the optional property `message` to the response with the `default` status
- **2024-06-05** `e61df65649e2`: 1 breaking, 2 warning
  - the response's body type changed from `object` to no type for status `default`
  - removed the optional property `code` from the response with the `default` status
  - removed the optional property `message` from the response with the `default` status
- **2024-03-09** `9772f0a059b2`: 1 info
  - added the non-success response with the status `429`
- **2024-03-07** `71171a40d629`: 2 breaking, 4 info
  - the response's body type changed from no type to `object` for status `422`
  - the response's body type changed from no type to `object` for status `default`
  - added the optional property `code` to the response with the `default` status
  - added the optional property `errors` to the response with the `422` status
  - …2 more
- **2024-02-18** `88bbc1f38ff7`: 2 breaking, 4 warning
  - the response's body type changed from `object` to no type for status `422`
  - the response's body type changed from `object` to no type for status `default`
  - removed the optional property `code` from the response with the `default` status
  - removed the optional property `errors` from the response with the `422` status
  - …2 more

[Operation history](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/changes/api/v1/charts/totals/post.md)

---

[API](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference.md) - [All operations](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/revisions/bcda1f823746?raw)
