PUT
Edit an account (client account)
Client space Accounting module For: Accountant · Permission: accounting_accounts.update Conditions
  • The accounting module must be included in the plan of the organization.
  • From the client space the book is always the client account’s own book.
  • The record must belong to the selected book.
  • Changing code is refused once the account has journal lines; the code must also stay unique in the book, and sending the account’s own code is allowed.
  • Only name and code can be changed; omitted or null fields keep their current value. The prefix rule on the parent code is not checked again on update.
Part of Set up the books.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

account
string
required

Identifier of the account (27-character KSUID). It must belong to the selected book.

Query Parameters

response
enum<string>
default:none

Response mode. Default none; none answers 204 No Content.

Available options:
none,
resource
fields
string

Comma-separated JSON keys of the root resource (id is always rendered). Available: id, owner_type, code, name, parent_id, normal_balance, is_postable, is_standard, syscohada_template_id, auxiliary_type, auxiliary_id, created_at, updated_at.

include
string

Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: .

Body

application/json
name
string | null

New name of the account. Optional; null or omitted keeps the current name.

code
string | null

New code of the account, unique in the book. Refused once the account has journal lines. Optional; the code is kept when omitted.

Response

Resource (only with response=resource).

id

Identifier of the account (27-character KSUID).

owner_type

Type of book owning the account: organization, company or client.

code

Account code in the chart of accounts, unique within the book.

name

Name of the account.

parent_id

Identifier of the parent account; null for a top-level account.

normal_balance

Side on which the account normally carries its balance: debit or credit.

is_postable
boolean

true when entries can be posted to the account; false for a grouping account that has sub-accounts.

is_standard
boolean

true when the account comes from the standard chart template; accounts added by hand are false.

syscohada_template_id

Identifier of the standard template account this account was created from; null for an account added by hand.

auxiliary_type

Kind of record this account is the third-party account of (customer, vendor, location, cash_register, money_account, payment_route, payment_method, intercompany_counterparty, cheque_transfer); null for an ordinary account.

auxiliary_id

Identifier of the record the account stands for; for a manual customer or supplier account it is the account's own identifier. Null for an ordinary account.

created_at

Date and time the record was created (ISO 8601, UTC).

updated_at

Date and time the record was last changed (ISO 8601, UTC).