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. It has to be provided in the YYYY-MM-DD format according to ISO 8601.

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. It has to be provided in the YYYY-MM-DD format according to ISO 8601.

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.

results matching ""

    No results matching ""