---
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`

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/banking-api.md) · [All operations](https://skmtc.dev/cardda/apis/banking-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cardda/banking-api/revisions/ff1aeb3fda8b/schema)
