Edit

[POST] .../v1/inoutoperation/edit

Edits operations write-off/cash-in. Use this method to update one or more existing item lines in a DocInOut write-off or receipt document before posting or other state restrictions prevent changes. The request body is a JSON array batch where each item must contain an operation id; optional quantity, order and description fields change only the provided values and description is limited to 300 characters. The parent document must be locked by the current user and eligible for editing, the operation must belong to a DocInOut document and the caller must have edit permission; null, empty or oversized arrays, missing ids, invalid quantity values, denied access or document state conflicts are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
description String Optional Operation note. Maximum length is 300 characters.
id Int64 Required Write-off/receipt operation ID to update.
order Int64 Optional Operation order. If NULL, the database value is not changed. Ignored for database versions earlier than 363.
quantity Decimal Optional New item quantity for the operation row. When provided, it must be greater than zero and no greater than 999999999.

Request Example

[
  {
    "id": 8101,
    "quantity": 2,
    "order": 20,
    "description": "Adjusted damaged quantity"
  }
]

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,
    "ids": [
      8101
    ]
  }
}