AccountDefinition (v1.0.0)
Defines individual account types within a chart of accounts
AccountDefinition Entity
The AccountDefinition entity defines individual account types within a chart of accounts. Each definition specifies the account’s name, type, and relationship to the parent chart of accounts.
Properties
| Name | Type | Required | Description |
|---|---|---|---|
id | long | Required | Unique identifier for the account definition (primary key) |
name | string | Required | Descriptive name of the account definition |
type | integer | Required | Integer code representing the account category (1xxx=Assets, 2xxx=Liabilities, etc.) |
chart_of_accounts_fk | long | Optional | Foreign key reference to the parent chart of accounts |
Schema
{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "AccountDefinition", "description": "Defines individual account types within a chart of accounts", "properties": { "id": { "type": "integer", "description": "Unique identifier for the account definition (primary key)", "example": 15652 }, "name": { "type": "string", "description": "Descriptive name of the account definition", "example": "MerchantDebt" }, "type": { "type": "integer", "description": "Integer code representing the account category (1xxx=Assets, 2xxx=Liabilities, etc.)", "example": 250800 }, "chart_of_accounts_fk": { "type": "integer", "description": "Foreign key reference to the parent chart of accounts", "example": 15655 } }, "required": ["id", "name", "type"], "additionalProperties": false}Account Types
Account definitions are categorized by integer type codes that correspond to standard accounting categories:
- Type 1xxx: Asset accounts (resources owned by the business)
- Type 2xxx: Liability accounts (debts and obligations)
- Type 3xxx: Equity accounts (owner’s equity and retained earnings)
- Type 4xxx: Revenue accounts (income from business operations)
- Type 5xxx: Expense accounts (costs incurred in operations)
Usage in System
AccountDefinitions are used by:
- PostingRules: Reference specific account definitions for transaction postings
- MerchantAccount: Use definitions to create and manage account balances
- ChartOfAccounts: Organize and group related account definitions
Validation Rules
- Account definition names must be unique within a chart of accounts
- Type must be a valid integer representing the account category
- Must be associated with a valid chart of accounts
- Cannot be deleted if referenced by active posting rules