Update Account Type
PUT/api/ledger/accounts/:nominalCode/type
Reclassify a GL account's type (the account-class enum).
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):
- No-op (same type) → always allowed.
- 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.
- No posted journal lines → the type may change to anything.
- 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
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.