Update ledger

PUT/api/v1/ledgers/{ledger_id}

Update an existing ledger account.

Operation ID: update_ledger·View as markdown·OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Parameters

Path

ledger_idstringrequired

Request body

namestring

Ledger name

typestring

Ledger type: asset, liability, equity, revenue, or expense. Used to reclassify an account (e.g. correcting a liability to an asset).

descriptionstring

Ledger description

account_numberstring

Optional account number/code for chart-of-accounts numbering.

statusstring

Ledger status (active, inactive)

debit_creditstring

Debit/credit behavior (debit, credit)

sort_codeinteger

Sort code for chart ordering (e.g. 1000 for assets, 4000 for revenue).

sub_typestring

Ledger sub-type

report_cash_flowboolean

Include in cash flow reports

cash_flow_sectionCashFlowSectionEnum

Cash flow statement section: 'operating' (working capital changes), 'investing' (fixed assets, investments), 'financing' (loans, equity), or 'excluded' (not shown in cash flow statement).

cfs_classCashFlowClassEnum

Indirect-method cash flow classification (e.g. 'ar', 'ppe', 'lt_debt'). See CashFlowClassEnum for full list.

depreciation_tagDepreciationTagEnum

Marks this account as holding capitalizable spend: 'depreciable' or 'amortizable'. Set to null to clear the tag.

editableboolean

Whether journal entries can be manually posted to this account.

parent_idstring

Parent ledger ID for creating child/sub-ledgers

financial_account_typestring

Financial account type: bank_account, credit_card, payments, payroll, loan, prepaid_card, accounts_receivable, accounts_payable. Set to designate this ledger as a financial account.

Responses

200Successful Response

successboolean
messagestring
codestring
dataLedgerResponse

400Bad Request - Invalid input

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

401Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

403Forbidden - Insufficient permissions

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

404Not Found - Resource does not exist

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

422Validation Error

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.