KakeiFlow API仕様書 (1.0.0)

Download OpenAPI specification:

KakeiFlow の現行 Laravel 実装を基準に再構成した API 仕様です。

認証済み API は Sanctum の Bearer トークンを利用します。

通常の API は success / message / data 形式を返しますが、GET /userGET /dashboardDELETE /delete-user は専用のレスポンス形状です。

Auth

サインアップ・サインイン・パスワード再設定

ユーザー登録

Request Body schema: application/json
required
name
required
string <= 255 characters
email
required
string <email> <= 255 characters
password
required
string <password>

Laravel のデフォルトパスワードルール

password_confirmation
required
string <password>

Responses

Request samples

Content type
application/json
{
  • "name": "takuya",
  • "email": "user@example.com",
  • "password": "Password123!",
  • "password_confirmation": "Password123!"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "サインインしました。",
  • "data": {
    }
}

サインイン

Request Body schema: application/json
required
email
required
string <email>
password
required
string <password>

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "password": "Password123!"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "サインインしました。",
  • "data": {
    }
}

サインアウト

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "サインアウトしました。",
  • "data": null
}

パスワード再設定

Request Body schema: application/json
required
email
required
string <email>
token
required
string
password
required
string <password>

Laravel のデフォルトパスワードルール

password_confirmation
required
string <password>

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "token": "reset-token-from-email",
  • "password": "Password123!",
  • "password_confirmation": "Password123!"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "パスワードを更新しました。",
  • "data": null
}

退会済みアカウント再開

Request Body schema: application/json
required
email
required
string <email>
token
required
string
password
required
string <password>

Laravel のデフォルトパスワードルール

password_confirmation
required
string <password>

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "token": "reset-token-from-email",
  • "password": "Password123!",
  • "password_confirmation": "Password123!"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "アカウントを再開しました。",
  • "data": null
}

User

認証済みユーザー設定

現在のユーザー情報取得

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "takuya",
  • "email": "user@example.com",
  • "email_verified_at": null,
  • "budget": 120000,
  • "deleted": false,
  • "ai_advice_mode": true,
  • "created_at": "2026-04-05T09:00:00.000000Z",
  • "updated_at": "2026-04-05T09:00:00.000000Z"
}

ユーザー名更新

Authorizations:
bearerAuth
Request Body schema: application/json
required
name
required
string <= 30 characters

Responses

Request samples

Content type
application/json
{
  • "name": "takuya"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "ユーザー名を更新しました。",
  • "data": null
}

パスワード更新

Authorizations:
bearerAuth
Request Body schema: application/json
required
current_password
required
string <password>
new_password
required
string <password>

Laravel のデフォルトパスワードルール

new_password_confirmation
required
string <password>

Responses

Request samples

Content type
application/json
{
  • "current_password": "CurrentPassword123!",
  • "new_password": "NewPassword123!",
  • "new_password_confirmation": "NewPassword123!"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "パスワードを更新しました。",
  • "data": null
}

メールアドレス変更用認証コード送信

Authorizations:
bearerAuth
Request Body schema: application/json
required
email
required
string <email> <= 255 characters

Responses

Request samples

Content type
application/json
{
  • "email": "next@example.com"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "認証コードを送信しました。",
  • "data": null
}

メールアドレス変更用認証コード検証

Authorizations:
bearerAuth
Request Body schema: application/json
required
email
required
string <email> <= 255 characters
code
required
string^[0-9]{6}$

Responses

Request samples

Content type
application/json
{
  • "email": "next@example.com",
  • "code": "123456"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "認証コードを確認しました。",
  • "data": null
}

メールアドレス更新

Authorizations:
bearerAuth
Request Body schema: application/json
required
email
required
string <email> <= 255 characters
code
required
string^[0-9]{6}$

Responses

Request samples

Content type
application/json
{
  • "email": "next@example.com",
  • "code": "123456"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "メールアドレスを更新しました。",
  • "data": {
    }
}

月間予算更新

Authorizations:
bearerAuth
Request Body schema: application/json
required
budget
required
integer [ 1 .. 999999999 ]

現行バリデーションでは 1 以上の整数のみ受け付ける

Responses

Request samples

Content type
application/json
{
  • "budget": 120000
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "予算を更新しました。",
  • "data": null
}

AIアドバイスモード更新

Authorizations:
bearerAuth
Request Body schema: application/json
required
ai_advice_mode
required
boolean

Responses

Request samples

Content type
application/json
{
  • "ai_advice_mode": true
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "AIアドバイスモードのフラグを更新しました。",
  • "data": {
    }
}

Categories

カテゴリ管理

カテゴリ一覧取得

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "カテゴリ一覧を取得しました。",
  • "data": [
    ]
}

カテゴリ作成

Authorizations:
bearerAuth
Request Body schema: application/json
required
name
required
string <= 30 characters
transaction_type_id
required
integer (TransactionTypeId)
Enum: 1 2

1 = 収入, 2 = 支出

sort_no
integer or null

新規作成時はサーバー側で自動採番される

Responses

Request samples

Content type
application/json
{
  • "name": "食費",
  • "transaction_type_id": 2,
  • "sort_no": 1
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "カテゴリを登録しました。",
  • "data": {
    }
}

カテゴリ更新

Authorizations:
bearerAuth
path Parameters
id
required
integer >= 1
Example: 1

対象リソースの ID

Request Body schema: application/json
required
name
required
string <= 30 characters
transaction_type_id
required
integer (TransactionTypeId)
Enum: 1 2

1 = 収入, 2 = 支出

sort_no
integer or null

新規作成時はサーバー側で自動採番される

Responses

Request samples

Content type
application/json
{
  • "name": "食費",
  • "transaction_type_id": 2,
  • "sort_no": 1
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "カテゴリを更新しました。",
  • "data": {
    }
}

カテゴリ削除

Authorizations:
bearerAuth
path Parameters
id
required
integer >= 1
Example: 1

対象リソースの ID

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "カテゴリを削除しました。",
  • "data": null
}

カテゴリ並び順更新

Authorizations:
bearerAuth
Request Body schema: application/json
required
sorted_category_ids
required
Array of integers[ items >= 1 ]

Responses

Request samples

Content type
application/json
{
  • "sorted_category_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "カテゴリの並び順を更新しました。",
  • "data": null
}

Transactions

取引管理

取引一覧取得

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "取引一覧を取得しました。",
  • "data": [
    ]
}

取引作成

Authorizations:
bearerAuth
Request Body schema: application/json
required
transaction_date
required
string

入力は Laravel の date バリデーションに通る日時文字列

transaction_type_id
required
integer (TransactionTypeId)
Enum: 1 2

1 = 収入, 2 = 支出

category_id
required
integer >= 1
amount
required
number >= 0
payment_method_id
required
integer >= 1
memo
string or null <= 255 characters

Responses

Request samples

Content type
application/json
{
  • "transaction_date": "2026-04-05 00:00:00",
  • "transaction_type_id": 2,
  • "category_id": 8,
  • "amount": 2258,
  • "payment_method_id": 2,
  • "memo": "スーパーでまとめ買い"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "取引を登録しました。",
  • "data": {
    }
}

取引更新

Authorizations:
bearerAuth
path Parameters
id
required
integer >= 1
Example: 1

対象リソースの ID

Request Body schema: application/json
required
transaction_date
required
string

入力は Laravel の date バリデーションに通る日時文字列

transaction_type_id
required
integer (TransactionTypeId)
Enum: 1 2

1 = 収入, 2 = 支出

category_id
required
integer >= 1
amount
required
number >= 0
payment_method_id
required
integer >= 1
memo
string or null <= 255 characters

Responses

Request samples

Content type
application/json
{
  • "transaction_date": "2026-04-05 00:00:00",
  • "transaction_type_id": 2,
  • "category_id": 8,
  • "amount": 2258,
  • "payment_method_id": 2,
  • "memo": "スーパーでまとめ買い"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "取引を更新しました。",
  • "data": {
    }
}

取引削除

Authorizations:
bearerAuth
path Parameters
id
required
integer >= 1
Example: 1

対象リソースの ID

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "取引を削除しました。",
  • "data": null
}

Payment Methods

支払方法マスタ

支払方法一覧取得

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "支払方法一覧を取得しました。",
  • "data": [
    ]
}

Dashboard

ダッシュボード表示用データ

ダッシュボード表示データ取得

今月の収支サマリ、過去 6 か月の支出推移、最近 5 件の取引、ユーザー設定を返します。 このエンドポイントは共通の success / message / data ラッパーを使いません。

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "user": {
    },
  • "monthly_summary": {
    },
  • "expense_trend": [
    ],
  • "recent_transactions": [
    ]
}

AI Advice

AI アドバイス取得

AIアドバイス取得

認証済みかつ AI アドバイスモード有効時のみ利用できます。 レート制限は 1 分あたり 3 回です。

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "AIアドバイスを取得しました。",
  • "data": {
    }
}

Account

アカウント削除

アカウント削除

Authorizations:
bearerAuth
Request Body schema: application/json
required
password
required
string <password>

Responses

Request samples

Content type
application/json
{
  • "password": "CurrentPassword123!"
}

Response samples

Content type
application/json
{
  • "message": "アカウントを削除しました。"
}