create_account
POST /api/v1/commands/create_account
Base URL: https://boringbooks.io.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
code | string | yes | Account code, unique per ledger Min length: 1. Max length: 255. |
ledger_id | string (uuid) | yes | External id of the ledger this account belongs to |
name | string | yes | Min length: 1. Max length: 255. |
type | string | yes | One of the five account types One of: asset, liability, equity, revenue, expense. |
contra | boolean | no | Balance runs against the type's normal side Default: false. |
postable | boolean | no | A leaf that journals may post to Default: true. |
Example:
{
"code": "1000",
"ledger_id": "11111111-1111-4111-8111-111111111111",
"name": "Cash",
"type": "asset"
}
Response (200)
| Field | Type | Required | Description |
|---|---|---|---|
code | string | yes | |
id | string (uuid) | yes | External id of the new account |
name | string | yes | |
type | string | yes |
Errors
Every error response is a single error object with a closed type and a refining code. The codes, and the conventions every operation shares, are in llms-full.txt.