Accounts
Create, update, and delete chart of accounts. Seed default accounts.
|
Endpoints
| GET | /api/v1/accounting/accounts | List accounts |
| POST | /api/v1/accounting/accounts | Create an account |
| PATCH | /api/v1/accounting/accounts/{id} | Update an account |
| DELETE | /api/v1/accounting/accounts/{id} | Delete an account |
| POST | /api/v1/accounting/accounts/seed | Seed default accounts |
GET
/api/v1/accounting/accountsList accounts
Authentication required— Include session cookie or Bearer token
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
search | string | Optional | Search by account name or code |
account_type | string | Optional | Filter by account type (asset / liability / equity / revenue / expense) |
limit | integer | Optional | Number of items to return (default: 100, max: 500) |
offset | integer | Optional | Offset for pagination (default: 0) |
Code Examples
curl "https://api.blueai.jp/api/v1/accounting/accounts" \
-H "Cookie: better-auth.session_token=<token>"POST
/api/v1/accounting/accountsCreate an account
Authentication required— Include session cookie or Bearer token
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Required | Account code |
name | string | Required | Account name |
account_type | string | Required | Account type (asset / liability / equity / revenue / expense) |
parent_id | string | Optional | Parent account ID |
description | string | Optional | Description |
tax_category | string | Optional | Tax category |
Code Examples
curl -X POST "https://api.blueai.jp/api/v1/accounting/accounts" \
-H "Cookie: better-auth.session_token=<token>"PATCH
/api/v1/accounting/accounts/{id}Update an account
Authentication required— Include session cookie or Bearer token
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Optional | Account ID |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Optional | Account code |
name | string | Optional | Account name |
account_type | string | Optional | Account type (asset / liability / equity / revenue / expense) |
parent_id | string | Optional | Parent account ID |
description | string | Optional | Description |
tax_category | string | Optional | Tax category |
Code Examples
curl -X PATCH "https://api.blueai.jp/api/v1/accounting/accounts/acc_123e4567e89b12d3a456426614174000" \
-H "Cookie: better-auth.session_token=<token>"DELETE
/api/v1/accounting/accounts/{id}Delete an account
Authentication required— Include session cookie or Bearer token
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Optional | Account ID |
Code Examples
curl -X DELETE "https://api.blueai.jp/api/v1/accounting/accounts/acc_123e4567e89b12d3a456426614174000" \
-H "Cookie: better-auth.session_token=<token>"POST
/api/v1/accounting/accounts/seedSeed default accounts
Create a standard Japanese chart of accounts in bulk. Used during initial setup.
Authentication required— Include session cookie or Bearer token
Code Examples
curl -X POST "https://api.blueai.jp/api/v1/accounting/accounts/seed" \
-H "Cookie: better-auth.session_token=<token>"