Skip to content

交易分类 API

公共数据结构

TransactionCategoryType

类型描述
1integer收入
2integer支出
3integer转账

TransactionCategoryInfoResponse

字段类型描述
idstring交易分类 ID
namestring交易分类名称
parentIdstring父交易分类 ID
typeTransactionCategoryType交易分类类型
iconstring交易分类图标 ID
colorstring交易分类图标颜色(十六进制颜色代码 RRGGBB
commentstring交易分类描述
displayOrderinteger交易分类显示顺序
hiddenboolean交易分类是否隐藏
subCategoriesTransactionCategoryInfoResponse[]子交易分类列表

获取所有交易分类列表

API 路径

transaction/categories/list.json

HTTP 方法

GET

请求参数

返回数据结构

Map<TransactionCategoryType, TransactionCategoryInfoResponse[]>

添加交易分类

API 路径

transaction/categories/add.json

HTTP 方法

POST

请求体 Content-Type

application/json

请求数据结构

TransactionCategoryCreateRequest

字段类型必选描述
namestring必选交易分类名称
typeTransactionCategoryType必选交易分类类型
parentIdstring可选父交易分类 ID(一级交易分类为 "0"
iconstring必选交易分类图标 ID
colorstring必选交易分类图标颜色(十六进制颜色代码 RRGGBB
commentstring可选交易分类描述

返回数据结构

TransactionCategoryInfoResponse

Released under the MIT License.