Skip to main content

Update Account Type

PUT 

/api/ledger/accounts/:nominalCode/type

Reclassify a GL account's type (the account-class enum).

Authorization

Any valid API token can call this endpoint — no specific scope required. Manage tokens.

Authentication: Requires Bearer token. Gated by the accounting.manage_settings permission.

Body: type (required) — one of: Revenue, Expense, Asset, Liability, Equity, Bank, Current, Inventory, Fixed, Directcosts, Currliab, Termliab, Sales.

Tiered guardrail (mirrors NetSuite/SAP/QBO/Xero):

  1. No-op (same type) → always allowed.
  2. System/reserved control account (mapped in accounting settings — A/R, A/P, inventory control, COGS, sales tax) → BLOCKED regardless of posting (422). Re-map the setting to a different account instead.
  3. No posted journal lines → the type may change to anything.
  4. Posted lines exist → the new type must stay in the SAME reclassification group (same statement side AND same normal balance): same-group changes (e.g. Current → Fixed asset, Liability → Equity) are allowed; changes that cross the Balance Sheet ↔ Income Statement boundary or flip the normal balance (e.g. Asset → Expense) are rejected with 422.

Returns the same shape as Get Account Overview so the page header re-renders in place. The change is recorded in the account's activity log.

Request

Responses

OK

Response Headers
    Content-Type