Skip to main content
BlueAI
Home/Accounting/Accounts

Accounts

Create, update, and delete chart of accounts. Seed default accounts.

|

Endpoints

GET/api/v1/accounting/accountsList accounts
POST/api/v1/accounting/accountsCreate 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/seedSeed default accounts
GET/api/v1/accounting/accounts

List accounts

Authentication requiredInclude session cookie or Bearer token

Query Parameters

NameTypeRequiredDescription
search
stringOptionalSearch by account name or code
account_type
stringOptionalFilter by account type (asset / liability / equity / revenue / expense)
limit
integerOptionalNumber of items to return (default: 100, max: 500)
offset
integerOptionalOffset 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/accounts

Create an account

Authentication requiredInclude session cookie or Bearer token

Request Body

NameTypeRequiredDescription
code
stringRequiredAccount code
name
stringRequiredAccount name
account_type
stringRequiredAccount type (asset / liability / equity / revenue / expense)
parent_id
stringOptionalParent account ID
description
stringOptionalDescription
tax_category
stringOptionalTax 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 requiredInclude session cookie or Bearer token

Path Parameters

NameTypeRequiredDescription
id
stringOptionalAccount ID

Request Body

NameTypeRequiredDescription
code
stringOptionalAccount code
name
stringOptionalAccount name
account_type
stringOptionalAccount type (asset / liability / equity / revenue / expense)
parent_id
stringOptionalParent account ID
description
stringOptionalDescription
tax_category
stringOptionalTax 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 requiredInclude session cookie or Bearer token

Path Parameters

NameTypeRequiredDescription
id
stringOptionalAccount 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/seed

Seed default accounts

Create a standard Japanese chart of accounts in bulk. Used during initial setup.

Authentication requiredInclude 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>"