---
title: "Spending by merchant"
method: GET
path: "/v1/companies/{id}/spending_per_merchant"
tags: ["Company"]
---

# Spending by merchant

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

## Request

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

Returns the company's spending aggregated by merchant for a given product
over the requested month range. 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 merchant.

- 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.dev/cardda/apis/banking-api/revisions/ff1aeb3fda8b?raw)
