latestSwagger 2.02026-08-20196638916.1 KB

23d8982b533d

Data v1.Search

Query transactions

Queries transactions based on multiple parameters and returns a response containing transactions and their corresponding statistics matching the query. The query contains both fixed parameters and parameters parsed from the free text queryString. All the commands below are typically applied per word in the query and if multiple commands are found, they are concatenated with an AND operation (OR does not exist).

Query string commands

TypeDescriptionKeywords
TagsSearches specifically for transactions with tags.Words starting with '#'.
Amount SpanSearches for transactions within the given amount span. Keywords here depend on the locality of the user.over, under, more than, less than, around
Date/Time SpanSearches for transactions within the given date/time span. Keywords here depend on the locality of the user.weekdays, weekends, today, yesterday, this week/month/year, last week/month/year, week #.
CategorySearches specifically for transactions with the specified category. Keywords here depend on the locality of the user.Restaurant, Bar
post/api/v1/search

Request body

accountsstring[]

A list of account IDs to filter by.

categoriesstring[]

A list of category IDs to filter by. Could either be leaf node categories, such as the category ID corresponding to expenses:food.restaurants, or groups of categories, such as the category ID corresponding to expenses:food.

endDatestring date-time

The end date of the result.

externalIdsstring[]

A list of external IDs to filter by.

includeUpcomingboolean

Indicates if result should include upcoming transactions.

limitinteger

The limit for the result, used for paging. Defaults to 50 if not set or set to 0.

maxAmountnumber double

Maximum amount to filter the results. Negative values can be set for expenses.

minAmountnumber double

Minimum amount to filter the results. Negative values can be set for expenses.

offsetinteger

The offset for the result, used for paging.

order'ASC' | 'DESC'

The order of the result.

queryStringstring

The string query.

sort'SCORE' | 'DATE' | 'ACCOUNT' | 'DESCRIPTION' | 'AMOUNT' | 'CATEGORY'

The sort order of the result.

startDatestring date-time

The start date of the result.

Example request

{
  "accounts": [
    "87fa44ec11c4426e889a963add92b69e"
  ],
  "categories": [
    "953c4eda24554a61a9653a479e70fc96"
  ],
  "endDate": "1455740874875",
  "externalIds": [
    "953c4eda24554a61a9653a479e70fc96"
  ],
  "limit": 20,
  "maxAmount": 68.42,
  "minAmount": -50.49,
  "offset": 20,
  "order": "ASC",
  "queryString": "Food this week",
  "sort": "DATE",
  "startDate": "1455740874875"
}

Response

Successful operation.