东子个人博客

记账本API文档

  1. 1. 默认模块
  2. 2. Authentication
  3. 3. 记录
    1. 3.1. POST 添加记录
      1. 3.1.1. 请求参数
      2. 3.1.2. 返回结果
      3. 3.1.3. 返回数据结构
    2. 3.2. GET 输出记录列表
      1. 3.2.1. 请求参数
      2. 3.2.2. 返回结果
      3. 3.2.3. 返回数据结构
    3. 3.3. POST 补录记录
      1. 3.3.1. 请求参数
      2. 3.3.2. 返回结果
      3. 3.3.3. 返回数据结构
    4. 3.4. GET 输出某个分类下的所有记录
      1. 3.4.1. 请求参数
      2. 3.4.2. 返回结果
      3. 3.4.3. 返回数据结构
    5. 3.5. GET 依据备注搜索记录
      1. 3.5.1. 请求参数
      2. 3.5.2. 返回结果
      3. 3.5.3. 返回数据结构
  4. 4. 分类
    1. 4.1. POST 创建分类
      1. 4.1.1. 请求参数
      2. 4.1.2. 返回结果
      3. 4.1.3. 返回数据结构
    2. 4.2. GET 获取分类列表
      1. 4.2.1. 返回结果
      2. 4.2.2. 返回数据结构
    3. 4.3. GET 获取所有分类列表
      1. 4.3.1. 返回结果
      2. 4.3.2. 返回数据结构
    4. 4.4. POST 修改分类状态
      1. 4.4.1. 请求参数
      2. 4.4.2. 返回结果
      3. 4.4.3. 返回数据结构
  5. 5. 数据模型

默认模块

Base URLs:

Authentication

记录

POST 添加记录

POST /bill-api/records/add/index.php

Body 请求参数

token: ""
money: ""
type: ""
text: ""
cid: ""

请求参数

名称位置类型必选说明
bodybodyobjectnone
» tokenbodystringnone
» moneybodystringnone
» typebodystringnone
» textbodystringnone
» cidbodystring分类id,可选

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

GET 输出记录列表

GET /bill-api/records/list/index.php

请求参数

名称位置类型必选说明
tokenquerystringnone
modequerystringnone
yearquerystringnone
monthquerystringnone
dayquerystring当mode为d时必传

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

POST 补录记录

POST /bill-api/records/added/index.php

Body 请求参数

token: ""
money: ""
type: ""
text: ""
year: ""
month: ""
day: ""

请求参数

名称位置类型必选说明
bodybodyobjectnone
» tokenbodystringnone
» moneybodystringnone
» typebodystringnone
» textbodystringnone
» yearbodystringnone
» monthbodystringnone
» daybodystringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

GET 输出某个分类下的所有记录

GET /bill-api/records/category/

请求参数

名称位置类型必选说明
tokenquerystringnone
cidquerystring分类id

返回示例

200 Response

{
    "status": "success",
    "message": {
        "get": 0,
        "lose": 2,
        "final": -2
    },
    "data": [
        {
            "id": "14b18659b78e4e9fc201016e3590a09ce2fc4eb6",
            "type": "zc",
            "money": 2,
            "text": "测试",
            "createdTime": "2026-07-14 17:18:12"
        }
    ]
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

GET 依据备注搜索记录

GET /bill-api/records/search/

请求参数

名称位置类型必选说明
keywordquerystringnone
tokenquerystringnone

返回示例

200 Response

{
    "status": "success",
    "message": {
        "get": 0,
        "lose": 3,
        "final": -3
    },
    "data": [
        {
            "id": "cd7bfc9156d18fb78399803c6238df2d60fe08ab",
            "type": "zc",
            "money": 3,
            "text": "车费AA",
            "createdTime": "2025-12-06 22:13:25"
        }
    ]
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

分类

POST 创建分类

POST /bill-api/category/add/

Body 请求参数

token: ""
name: ""

请求参数

名称位置类型必选说明
bodybodyobjectnone
» tokenbodystringnone
» namebodystring分类名称

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

GET 获取分类列表

GET /bill-api/category/list/

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

GET 获取所有分类列表

GET /bill-api/category/all_list/

返回示例

200 Response

{
    "status": "success",
    "message": "获取数据成功",
    "data": [
        {
            "id": "4a836403f8c8a18b4447a9b1e5a39c15",
            "name": "2月",
            "createdTime": "2026-07-10 15:19:15",
            "status": "0"
        }
    ]
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

POST 修改分类状态

POST /bill-api/category/status/

Body 请求参数

token: ""
cid: ""
status: ""

请求参数

名称位置类型必选说明
bodybodyobjectnone
» tokenbodystringnone
» cidbodystring分类id
» statusbodystring要修改成的状态码

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

数据模型