# transactions_history (timeseries)

| Required permit | Rate limit tokens cost | Available intervals |
| --- | --- | --- |
| Reporting:Api:Report:TransactionsHistory | 3 | 1h, 1d, 1w, 1mo |

This report allows you to get information about transactions feeded into the system.

:::note
In some of cases, transactions can be added out of order. Such transactions will be reflected in past data with a delay.

* Receipt scanner transactions can be ingested within 60 days.
:::

## Fields

### loyalty_club_id

| Type | Filterable |
| --- | --- |
| Integer | <Icon icon="material-outline-done"/> (via `X-Customer` header) |

ID of loyalty club.

### event_type

| Type | Filterable |
| --- | --- |
| Enum | <Icon icon="material-outline-done"/> |

Type of transaction event.

This field is an enum, possible values are:

* debit
* refund

### source_type

| Type | Filterable |
| --- | --- |
| Enum | <Icon icon="material-outline-done"/> |

Source of transactions event.

This field is an enum, possible values are:

* api
* receipt_scanner

### store_id

| Type | Filterable |
| --- | --- |
| Integer | <Icon icon="material-outline-done"/> |

ID of store to which transaction is assigned.

### member_attendance_challenge_edition_id

| Type | Filterable |
| --- | --- |
| Integer | <Icon icon="material-outline-done"/> |

ID of attendance challenge edition to which transaction is attributed.

### amount

| Type | Filterable |
| --- | --- |
| Numeric | <Icon icon="material-outline-done"/> |

Value of transaction.

Can be negative (e.g. in refunds).

### member_gender

| Type | Filterable |
| --- | --- |
| String | <Icon icon="material-outline-done"/> |

Gender of member who executed the transaction. See [members report](https://docs.mpc.placewise.com/doc-344016#gender).

### member_age

| Type | Filterable |
| --- | --- |
| String | <Icon icon="material-outline-done"/> |

Age of member who executed the transaction. See [members report](https://docs.mpc.placewise.com/doc-344016#age).

### member_place_id

| Type | Filterable |
| --- | --- |
| Integer | <Icon icon="material-outline-done"/> |

Place ID (location) of member. See [members report](https://docs.mpc.placewise.com/doc-344016#place_id).

### member_city_place_id

| Type | Filterable |
| --- | --- |
| Integer | <Icon icon="material-outline-done"/> |

City place ID (location) of member. See [members report](https://docs.mpc.placewise.com/doc-344016#city_place_id).

### member_country

| Type | Filterable |
| --- | --- |
| String | <Icon icon="material-outline-highlight_off"/> |

Country (location) of member. See [members report](https://docs.mpc.placewise.com/doc-344016#country).


## Query without aggregations

Query returns series with number of transactions.

```json
{
    "interval": "5m",
    "range_timezone": "Europe/Oslo",
    "time_buckets": [
        "2025-08-27T09:25:00.000+02:00",
        "2025-08-27T09:30:00.000+02:00",
    ],
    "series": [
        {
            "label": {},
            "values": [
                3,
                2
            ]
        },
    ],
    "data_points": 2,
    "result_type": "timeseries"
}
```

## Aggregations

### sum_amount

Query returns series with sum of transactions amounts.

### average_amount

Query returns series with average of transaction amount in given timespan.

### average_and_stddev_over_amount

Query returns series with average of transaction amount and standard deviation in given timespan.

### store_id

Query returns series with number of transactions grouped by store_id.

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| store_id | Integer | See in `Fields` |

### sum_amount_by_store_id

Query returns series with sum of transactions amounts grouped by store_id.

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| store_id | Integer | See in `Fields` |

### average_amount_by_store_id

Query returns series with average of transaction amount in given timespan grouped by store_id.

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| store_id | Integer | See in `Fields` |

### average_and_stddev_over_amount_by_store_id

Query returns series with average of transaction amount and standard deviation in given timespan grouped by store_id.

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| store_id | Integer | See in `Fields` |

### source_type

Query returns series with number of transactions grouped by source_type.

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| source_type | Enum | See in `Fields` |

### sum_amount_by_source_type

Query returns series with sum of transactions amounts grouped by source_type.

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| source_type | Enum | See in `Fields` |

### member_age

Query returns series with number of transactions grouped by member_age.

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| member_age | Enum | See in `Fields` |

### sum_amount_by_member_age

Query returns series with sum of transactions amounts grouped by member_age.

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| member_age | Enum | See in `Fields` |

### member_gender

Query returns series with number of transactions grouped by member_gender.

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| member_gender | String | See in `Fields` |

### sum_amount_by_member_gender

Query returns series with sum of transactions amounts grouped by member_gender.

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| member_gender | String | See in `Fields` |

### member_city_place_id

Query returns series with number of transactions grouped by member_city_place_id.

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| member_city_place_id | Integer | See in `Fields` |

### sum_amount_by_member_city_place_id

Query returns series with sum of transactions amounts grouped by member_city_place_id.

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| member_city_place_id | Integer | See in `Fields` |

### member_place_id

Query returns series with number of transactions grouped by member_place_id.

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| member_place_id | Integer | See in `Fields` |


### sum_amount_by_member_place_id

Query returns series with sum of transactions amounts grouped by member_place_id.

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| member_place_id | Integer | See in `Fields` |

### member_created_at

Query returns series with number of transactions grouped by member_created_at (year and month).

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| member_created_at | String(`ISO 8601` timestamp truncated to month) | See in `Fields` |

### sum_amount_by_member_created_at

Query returns series with sum of transactions amounts grouped by member_created_at.

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| member_created_at | String(`ISO 8601` timestamp truncated to month) | See in `Fields` |

### member_country

Query returns series with number of transactions grouped by member_country.

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| member_country | String(`ISO 3166-1 alpha-2`) | See in `Fields` |

### sum_amount_by_member_country

Query returns series with sum of transactions amounts grouped by member_country.

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| member_country | String(`ISO 3166-1 alpha-2`) | See in `Fields` |