Edit

[POST] .../v1/docaccountmovement/edit

Edits account transfer document. Use this method to update an unposted account transfer document or its additional field values before posting. The request requires the account movement edit permission and the finance account movement tariff option; id is required, the document must exist, must not be posted and the controller requires paired positive amount_sended and amount_received when amounts are changed. The method can change date, sent and received amounts, description, attached_user_id and custom field values; additional fields require the additional fields tariff option and overdraft checks are repeated when amounts are changed and overdraft is disabled. Business errors such as missing body, invalid id or amount pairing, denied access, disabled tariff option, unavailable additional fields, already posted document, document not found, no editable fields, insufficient sender balance, excessive description length, database failures or action log failures are returned as HTTP 200 ErrorResult.

Request Parameters

Name Type Required Description
amount_received Decimal Optional New received amount with up to 3 decimal places. The sent and received amount fields are updated only when both values are greater than 0.
amount_sended Decimal Optional New sent amount with up to 3 decimal places. The sent and received amount fields are updated only when both values are greater than 0.
attached_user_id Int64 Optional Responsible user patch value. Null or 0 leaves it unchanged; a positive ID sets a responsible user.
date Int64 Optional New transfer date as Unix time in seconds. Values less than or equal to 0 leave the existing date unchanged.
description String Optional Document note patch value. Null leaves it unchanged; an empty string clears the note. Maximum length is 300 characters.
fields Array of FieldValueEdit Optional Custom field values to add, update or remove.
id Int64 Required Required account movement document ID.

Request Example

{
  "id": 31,
  "date": 1714554000,
  "amount_sended": 125000.000,
  "amount_received": 125000.000,
  "description": "Updated cash deposit amount",
  "attached_user_id": 5
}

Response Parameters

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

Response Example

{
  "ok": true,
  "result": {
    "row_affected": 1
  }
}