List transactions

This endpoint allows to list transactions for accounts of a consumer.

Request

POST /insights/v1/storage/transactions/list HTTP/1.1
Content-Type: application/json; charset=utf-8
Authorization: Token <Token>
Host: <Host>
{
    "insights_consumer_id": String,
    "insights_account_ids": ?Array<String>,
    "days": ?Integer,
    "from_date": ?Date,
    "to_date": ?Date,
    "max_amount": ?Integer,
    "min_amount": ?Integer,
    "transaction_type": ?Enum<'DEBIT', 'CREDIT'>
    "states": ?Array<Enum<'PROCESSED', 'PENDING', 'CANCELED', 'FAILED', 'UNKNOWN'>>
    "category_ids": ?Array<String>,
    "brand_ids": ?Array<String>,
    "order": ?Array<OptionsOrderBy>,
    "pagination": ?{
        "size": Integer,
        "offset": Integer
    }
}

insights_consumer_id String, required

The insights_consumer_id parameter identifies the consumer whose transactions are returned.

insights_account_ids String[], optional

The list of accounts, identified by the insights_account_id, which will filter all transactions from the consumer to only those accounts. If missing, all accounts of the insights_consumer_id will be used.

days Integer, optional

This parameter offers to provide a timeframe without need to calculate dates. If the days property is set, the parameters from_date and to_date will be derived from current day (today) minus the given number of days. The timeframe for which the list should be generated can be set by specifying either the from_date and to_date parameters or this days parameter. If no timeframe is specified, the default timeframe of the last 62 days will be used.

from_date Date (String: "YYYY-MM-DD"), optional

The from_date parameter (in combination with the to_date parameter) will be used as the inclusive start date for this timeframe.

The timeframe for which the list should be generated can be set by specifying either the from_date and to_date parameters or the days parameter. If no timeframe is specified, the default timeframe of the last 62 days will be used.

to_date Date (String: "YYYY-MM-DD"), optional

The to_date parameter (in combination with the from_date parameter) will be used as the inclusive end date for this timeframe.

The timeframe for which the list should be generated can be set by specifying either the from_date and to_date parameters or the days parameter. If no timeframe is specified, the default timeframe of the last 62 days will be used.

max_amount Integer, optional

Filter the transactions to include only transactions with amount less or equal the max_amount parameter. The amount needs to be provided in the smallest unit of currency. See the amount parameter of the amount object.

min_amount Integer, optional

Filter the transactions to include only transactions with an amount of at least min_amount. The amount needs to be provided in the smallest unit of currency. See the amount parameter of the amount object.

transaction_type Enum, optional

Filter to only get transactions in either state DEBIT or CREDIT.

states Enum[], optional

Filters the transactions to only include transactions with a transaction state in the given list.

category_ids String[], optional

Filter the transactions to include only transactions matching the categories identified by the category_ids. The id must match a category from the Category List.

brand_ids String[], optional

Filter the transactions to include only transactions matching the brands identified by the brand_ids.

order OptionsOrderBy[], optional

Use this parameter to return the transactions in a specific order.

pagination.size Integer, required

Maximum number of transactions returned in one response. The default is 200, the maximum is 1000.

pagination.offset Integer, required

Number of transactions that are skipped. The default is 0, the maximum is 1000.

OptionsOrderBy

{
    "order": ?Enum<'ASC', 'DESC'>,
    "field": Enum<'AMOUNT','DATE','CATEGORY','BRAND','AMOUNT_WITH_TYPE'>
}

order Enum, optional

Sets the direction of order: ascending or descending. The default setting is ascending.

field Enum, required

The transactions will be ordered by the field from this enum.

The difference between AMOUNT and AMOUNT_WITH_TYPE is that AMOUNT orders the transactions by amount without considering the transaction type. The AMOUNT_WITH_TYPE considers the transaction type and orders DEBIT transactions with a negative amount and CREDIT transactions with a positive amount.

Response

{
    "data": {
        "from_date": Date,
        "to_date": Date,
        "transactions": Array<CategorizedTransaction>,
        "pagination": PaginationResponse
    }
}

data.transactions CategorizedTransaction[], always present

List of all transactions for the account(s) in insights_account_ids with added data about categories and brands.

data.from_date Date (String: "YYYY-MM-DD"), always present

The starting date used to generate this list.

data.to_date Date (String: "YYYY-MM-DD"), always present

The end date used to generate this list.

data.pagination PaginationResponse, always present

Pagination object which contains various information about the current and possible previous/next page.

Example request

{
    "insights_consumer_id": "6c03aff-8fa0046-ffae74-b0cbc-4d5fd1",
    "pagination": {
        "size": 5,
        "offset": 0
    }
}

Example response

{
    "data": {
        "from_date": "2022-07-28",
        "to_date": "2022-09-28",
        "transactions": [
            {
                "insights_transaction_id": "transaction_id_1",
                "reference": "Transfer",
                "amount": {
                    "amount": 15000,
                    "currency": "EUR"
                },
                "booking_date": "2022-09-27",
                "type": "DEBIT",
                "categories": [
                    {
                        "id": "993c3e5f-b615-5aad-9f57-f4b16994ebc2",
                        "name": "Transfers"
                    }
                ],
                "insights_account_id": "d21a79b6-ca8a-4657-a8e0-8425eb10b47c"
            },
            {
                "insights_transaction_id": "transaction_id_2",
                "reference": "Salary",
                "amount": {
                    "amount": 300000,
                    "currency": "EUR"
                },
                "counter_party": {
                    "holder_name": "Small Company"
                },
                "booking_date": "2022-09-24",
                "type": "CREDIT",
                "categories": [
                    {
                        "id": "8f7614f5-845d-5463-b145-8a1d57a40bd4",
                        "name": "Salary & Wages & Paycheck"
                    }
                ],
                "insights_account_id": "d21a79b6-ca8a-4657-a8e0-8425eb10b47c"
            }
        ],
        "pagination": {
            "count": 2,
            "offset": 0,
            "next": {
                "size": 5,
                "offset": 5
            }
        }
    }
}

results matching ""

    No results matching ""