Accounts

Update a portfolio account

Applies the supplied fields to one Chart of Accounts row. Omitted fields are unchanged and an explicit null parentAccountNumber detaches the account. A newly requested parent must have the same account type as the child and must not carry journal activity. Returning the canonical account response also requires ledger-account view permission. Advanced Ledger is required after the existing account permissions; unavailable Advanced Ledger returns HTTP 403 (FeatureNotEnabledError).

patch/v1/portfolios/{portfolioSlug}/accounts/{accountNumber}

Request

  • Base URL: https://api.tokenbooks.io (the document declares no server; this is the origin it was published from)
  • URL: https://api.tokenbooks.io/v1/portfolios/{portfolioSlug}/accounts/{accountNumber}
  • Auth: API key in header x-api-key

Path parameters

accountNumberstring required

Current portfolio-unique ledger account number.

portfolioSlugstring required

Workspace-scoped portfolio slug

Request body

accountNumberstring

New portfolio-unique ledger account number.

namestring

New ledger account name.

isActiveboolean

New active state.

parentAccountNumberstring nullable

New parent account number, or null to detach from any parent.

paymentLabelstring nullable

New payment label, or null to clear it.

Response

The account after the update in the shared account row shape.

accountNumberstring required

Ledger account number.

namestring required

Ledger account name.

paymentLabelstring nullable required

Optional label shown in payment account selection.

accountType'ASSET' | 'LIABILITY' | 'EQUITY' | 'INCOME' | 'EXPENSE' required

Top-level account type.

subTypestring required

Persisted account subtype.

normalBalanceType'DR' | 'CR' required

Debit or credit normal-balance side.

isActiveboolean required

Whether the account is currently marked active.

origin'SYSTEM_MANAGED' | 'SYSTEM_DEFAULT' | 'USER_MANAGED' required

Which code path created this account: engine-managed, engine fallback, or user-created. A user-created value may also mean the one-time backfill migration could not disambiguate an older row.

Changes

No recorded changes to this operation across all 1 revision of this API.