Skip to content

Transaction API

Common Data Structure

TransactionType

ValueTypeDescription
1integerBalance Modification
2integerIncome
3integerExpense
4integerTransfer

TransactionInfoResponse

FieldTypeDescription
idstringTransaction ID
timeSequenceIdstringTransaction time sequence ID
typeTransactionTypeTransaction type
categoryIdstringTransaction category ID
categoryTransactionCategoryInfoResponseTransaction category object
timeintegerTransaction unix time
utcOffsetintegerTransaction time zone offset (minutes)
sourceAccountIdstringSource account ID
sourceAccountAccountInfoResponseSource account object
destinationAccountIdstringDestination account ID
destinationAccountAccountInfoResponseDestination account object
sourceAmountintegerSource amount
destinationAmountintegerDestination amount
hideAmountbooleanWhether to hide the amount
tagIdsstring[]Transaction tag IDs
tagsTransactionTagInfoResponse[]Transaction tag objects
picturesTransactionPictureInfoBasicResponse[]Transaction picture list
commentstringTransaction description
geoLocationTransactionGeoLocationResponseTransaction geographic location
editablebooleanWhether the transaction is editable

TransactionPictureInfoBasicResponse

FieldTypeDescription
pictureIdstringTransaction picture ID
originalUrlstringTransaction picture URL

TransactionGeoLocationRequest

FieldTypeDescription
latitudefloatLatitude
longitudefloatLongitude

TransactionGeoLocationResponse

FieldTypeDescription
latitudefloatLatitude
longitudefloatLongitude

Get transactions list

API Path

transactions/list.json

HTTP Method

GET

Request Header

HeaderDescription
X-Timezone-OffsetTime zone offset (minutes)

Request Parameters

FieldTypeRequiredDescription
typeintegerOptionalFilter transaction by transaction type (1: Balance modification, 2: Income, 3: Expense, 4: Transafer)
category_idsstringOptionalFilter transaction by transaction category IDs (separated by ,)
account_idsstringOptionalFilter transaction by account IDs (separated by ,)
tag_filterstringOptionalFilter transactions by tags (multiple tag groups are supported, separate groups with ;. Each tag group uses the format type:tag_id1,tag_id2,... where type defines the filter mode, 0: transaction contains all tags in the group, 1: transaction contains any tag in the group, 2: transaction does not contain all tags in the group, 3: transaction does not contain any tag in the group)
amount_filterstringOptionalFilter transaction by amount (Greater than amount: gt:{amount}, Less than amount: lt:{amount}, Equal amount: eq:{amount}, Not equal amount: ne:{amount}, Between two amounts: bt:{min_amount}:{max_amount}, Not between two amounts: ne:{min_amount}:{max_amount})
keywordstringOptionalFilter transaction by keyword
max_timeintegerOptionalThe maximum time sequence ID (Set to 0 if you want to get the latest transactions)
min_timeintegerOptionalThe minimum time sequence ID
pageintegerOptionalSpeicifed page number
countintegerRequiredThe count of transactions per page (maximum is 50)
with_countbooleanOptionalWhether to get the total count of all transactions
with_picturesbooleanOptionalWhether to get the picture IDs
trim_accountbooleanOptionalWhether to get the account ID instead of account object
trim_categorybooleanOptionalWhether to get the transaction category ID instead of category object
trim_tagbooleanOptionalWhether to get the tag IDs instead of tag object

Response Data Structure

TransactionInfoPageWrapperResponse[]

FieldTypeDescription
itemsTransactionInfoResponse[]The transaction list
nextTimeSequenceIdintegerThe next cursor (max_time parameter) when requesting older data
totalCountintegerThe total count of transactions

Add transaction

API Path

transactions/add.json

HTTP Method

POST

Request Body Content-Type

application/json

Request Data Structure

TransactionCreateRequest

FieldTypeRequiredDescription
typeTransactionTypeRequiredTransaction type
categoryIdstringRequiredTransaction category ID
timeintegerRequiredTransaction unix time
utcOffsetintegerRequiredTransaction time zone offset (minutes)
sourceAccountIdstringRequiredSource account ID
destinationAccountIdstringOptionalDestination account ID
sourceAmountintegerRequiredSource amount
destinationAmountintegerOptionalDestination amount
hideAmountbooleanOptionalWhether to hide the amount
tagIdsstring[]OptionalTransaction tag IDs
pictureIdsstring[]OptionalTransaction picture IDs
commentstringOptionalTransaction description
geoLocationTransactionGeoLocationRequestOptionalTransaction geographic location

Released under the MIT License.