Edit

[POST] .../v1/account/edit

Edits account. Use this method to update account attributes such as code, name, currency or company linkage while preserving the account identity used by documents. It returns row_affected for the updated record; when code is provided the controller validates that the trimmed value is no longer than 27 characters before calling the persistent layer. The caller must have account edit permission; missing body, invalid field values, denied access, missing records, related-data restrictions and persistent storage errors are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
code String Optional Account code.
currency_id Int64 Optional Account currency ID.
id Int64 Required Account ID.
name String Optional Account name.

Request Example

{
  "code": "string",
  "currency_id": 1,
  "id": 1,
  "name": "string"
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Update Update operation result.

Response Example

{
  "ok": true,
  "result": {
    "ids": [
      null
    ],
    "row_affected": 1
  }
}