Update account

Update an existing chart of accounts entry. This is a full update: omitted optional fields are cleared and an omitted active deactivates the account, except startingBalances, which is left unchanged when omitted, and type, which cannot be changed. First retrieve the current account from /api/chartofaccounts/{id}, apply your changes, then send back the full object.

Required permission: Accounting Settings

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
int32
required
≥ 1

The id of the account

Body Params

The current version of the account

int32 | null
required

The account's own number, without the parent prefix. Must be greater than zero and unique within its level.

string | null
required

The account's name.

type
object | null
required

The account's type (asset, liability, equity, income, or expense). Set when the account is created and cannot be changed afterwards. On writes, provide the id or code.

parent
object | null

The parent account selection.

boolean | null

Whether the account is a sub-account. When false, any provided parent is ignored.

string | null

The account's description.

boolean | null

Whether the account is active. Equity accounts keep their status in sync with their fund and ignore this on update.

fund
object | null

The account's default fund (id and name). On writes, provide the id; omit to clear the default fund.

category
object | null

The account's category. On writes, provide the id or code.

boolean

Whether the account is a register (bank/checking) account. Only asset and liability accounts can be registers.

boolean

Whether the account is an accounts-receivable account. Only asset accounts can be receivable.

boolean

Whether the account is an accounts-payable account. Only liability accounts can be payable.

boolean

Whether the account is a bad-debt expense account. Only expense accounts can be marked for bad debt.

startingBalances
array of objects | null

The starting balances entered for the account, one per fund. Only asset and liability accounts can carry starting balances. On writes, the list replaces the existing unreconciled starting balances; omit the property to leave them unchanged.

startingBalances
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

401

Authentication is required, or the Ocs-Api-Key header is missing or invalid.

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json