Create Account
Endpoint: POST /accounts
Authentication: Bearer Token (required)
Description
Creates a new account in the general ledger. Accounts can be of various types (ASSET, EXPENSE, etc.) and categories (CURRENT, OPERATING, etc.).
Request
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Content-Type | string | Yes | Must be application/json |
| Authorization | string | Yes | Bearer token for authentication |
Request Body
{
"name": "Stock Adjustment",
"description": "Stock adjustment offset account",
"alternateAccountNumber": null,
"type": "EXPENSE",
"category": "OPERATING",
"ledger": "GL",
"partyType": "COMPANY",
"party": "Ellis Class Electronics",
"companyStringId": "bf754600-4935-4946-baf3-dec48ee936e9",
"currencyStringId": "0cb02a6b-dd2c-4179-bca7-236c72a1d3fb",
"customerStringId": null
}
Request Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The name of the account |
| description | string | No | A description of the account's purpose |
| alternateAccountNumber | string | No | An alternate identifier for the account |
| type | string | Yes | The account type. One of: ASSET, LIABILITY, EQUITY, REVENUE, EXPENSE |
| category | string | Yes | The account category. One of: CURRENT, NON_CURRENT, OPERATING, NON_OPERATING |
| ledger | string | Yes | The ledger type. Must be GL (General Ledger) |
| partyType | string | Yes | The type of party associated with the account. One of: COMPANY, CUSTOMER, SUPPLIER |
| party | string | Yes | The name of the party associated with the account |
| companyStringId | string | Yes | The UUID of the company that owns the account |
| currencyStringId | string | Yes | The UUID of the currency for the account |
| customerStringId | string | No | The UUID of the customer (required if partyType is CUSTOMER) |