---
title: "Spending summary by period"
method: GET
path: "/v1/companies/{id}/spending_summary"
tags: ["Company"]
---

# Spending summary by period

`GET /v1/companies/{id}/spending_summary`

## Request

- Base URL: `https://api.cardda.com`
- URL: `https://api.cardda.com/v1/companies/{id}/spending_summary`
- Auth: HTTP bearer

Returns the company's spending aggregated by time period for a given product.
Granularity is `day` when `start_month` equals `end_month`, otherwise
`month`. The `product` query param selects the source: `cards`, `transfers`
or `pay`. An unrecognized `product` yields an empty array.

Amounts are integers in the record's currency (currency codes are returned
upper-cased).

## Path parameters

- `id` string, required

## Query parameters

- `product` 'cards' | 'transfers' | 'pay', required
- `start_month` string, required
- `end_month` string, required

## Parameters

- `#/paths/~1v1~1users/get/parameters/0` (unresolved $ref)

## Response `200`

Spending grouped by period.

- object[]
  - `currency` string
  - `amount` integer

## Other responses

- `401`: Unauthorized
- `404`: Company not found

---

[API](https://skmtc.dev/cardda/apis/organization-api.md) - [All operations](https://skmtc.dev/cardda/apis/organization-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cardda/apis/organization-api/revisions/32a4430278a8?raw)
