---
title: "Count authorised transactions by CardBrand"
method: POST
path: "/public/countTransactionsByCardBrand"
tags: ["Merchant Portal services API"]
---

# Count authorised transactions by CardBrand

`POST /public/countTransactionsByCardBrand`

## Request

- Base URL: `https://test.tecs.at/merchantservices`
- URL: `https://test.tecs.at/merchantservices/public/countTransactionsByCardBrand`
- Auth: HTTP bearer

Returns count transaction by given dates (from-to) and group by card brand.<br>

Required role for operation: MP_CORPORATE or TE_MERCHANT_TERMINAL_MANAGEMENT.<br>
Create MPauditlog record with event type : DashboardTransactionsCountByCardBrand (23).<br>

Returns periods: HOUR, DAY, MONTH, YEAR<br>
Period is computed by the following criteria:<br>
- If days between date (from-to) <= 1, returns period HOUR and counts transactions by hours 
- If days between date (from-to) <= 31, returns period DAY and counts transactions by days, datePart in format yyyy-MM-dd
- If days between date (from-to) <= 365, returns period MONTH and counts transactions by months, datePart in format yyyy-MM
- Otherwise returns period YEAR and counts transactions by years     

Supports authentication with the following types of tokens:<br>
- Bearer <token>, which is a Bearer token authentication. The bearer token is a cryptic string, usually generated by the server in response to a login request.

## Request body

- TransactionsCountRequest
  - `transactionDateFrom` string, date-time, required
  - `transactionDateTo` string, date-time, required
  - `period` string

## Response `200`

Successful operation

- TransactionsCountCardBrandResponse
  - `responseCode` integer
  - `responseMessage` string
  - `transactionDateFrom` string, date-time
  - `transactionDateTo` string, date-time
  - `period` string
  - `transactionsCount` TransactionCount[]
    - `amount` integer
    - `datePart` string

## Other responses

- `400`: Bad request
- `401`: Unauthenticated - Authentication failed
- `403`: Unauthorized - Missing role TE_MERCHANT_TERMINAL_MANAGEMENT or MP_CORPORATE
- `500`: Internal server error

## Changes

- **2026-11-03** `6e0e5a5a2b2f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bluefin-com/apis/merchant-services/changes/public/countTransactionsByCardBrand/post.md)

---

[API](https://skmtc.dev/bluefin-com/apis/merchant-services.md) - [All operations](https://skmtc.dev/bluefin-com/apis/merchant-services/llms.txt) - [OpenAPI document](https://skmtc.dev/bluefin-com/apis/merchant-services/revisions/6e0e5a5a2b2f?raw)
