Overview
Chart of accounts tools manage the account structure, hierarchy, and balances.
finance_account_create
Create a new account.
Parameters:
| Parameter | Type | Required | Description |
|---|
account_id | string | Yes | Unique account ID |
account_name | string | Yes | Account name |
account_type | string | Yes | Type: Asset, Liability, Equity, Revenue, Expense |
normal_balance | string | Yes | Normal balance: Debit or Credit |
parent_account_id | string | No | Parent account for hierarchy |
description | string | No | Account description |
is_active | boolean | No | Active status (default: true) |
is_summary | boolean | No | Summary account (no postings) |
finance_account_get
Retrieve an account by ID.
Parameters:
| Parameter | Type | Required | Description |
|---|
account_id | string | Yes | Account ID |
finance_account_list
List accounts with filters.
Parameters:
| Parameter | Type | Required | Description |
|---|
account_type | string | No | Filter by type |
is_active | boolean | No | Filter by active status |
parent_account_id | string | No | Filter by parent |
search | string | No | Search by name or ID |
finance_account_update
Update an account.
Parameters:
| Parameter | Type | Required | Description |
|---|
account_id | string | Yes | Account ID |
account_name | string | No | Updated name |
description | string | No | Updated description |
is_active | boolean | No | Active status |
Account type and normal balance cannot be changed after transactions are posted.
finance_account_delete
Delete an account (only if no transactions).
Parameters:
| Parameter | Type | Required | Description |
|---|
account_id | string | Yes | Account ID |
finance_account_get_balance
Get account balance for a period.
Parameters:
| Parameter | Type | Required | Description |
|---|
account_id | string | Yes | Account ID |
posting_period_id | string | No | Period (default: current) |
as_of_date | string | No | Point-in-time balance |
Response:
{
"account_id": "1000",
"account_name": "Cash",
"balance": 50000.00,
"debit_total": 100000.00,
"credit_total": 50000.00,
"as_of": "2024-01-31"
}
finance_account_get_balances
Get balances for multiple accounts.
Parameters:
| Parameter | Type | Required | Description |
|---|
account_ids | array | Yes | Array of account IDs |
posting_period_id | string | No | Period |
as_of_date | string | No | Point-in-time |
finance_account_get_hierarchy
Get account hierarchy tree.
Parameters:
| Parameter | Type | Required | Description |
|---|
root_account_id | string | No | Start from specific account |
account_type | string | No | Filter by type |
max_depth | number | No | Maximum tree depth |
Response:
{
"accounts": [
{
"account_id": "1000",
"account_name": "Assets",
"children": [
{
"account_id": "1100",
"account_name": "Current Assets",
"children": [
{ "account_id": "1110", "account_name": "Cash" },
{ "account_id": "1120", "account_name": "Accounts Receivable" }
]
}
]
}
]
}
finance_account_move
Move an account in the hierarchy.
Parameters:
| Parameter | Type | Required | Description |
|---|
account_id | string | Yes | Account to move |
new_parent_id | string | Yes | New parent account |