Edit

[POST] .../v1/docadditionalexpensesoperation/edit

Edits operations additional expenses. Use this batch method to update service row quantity, price/cost, VAT value or order in an editable additional expenses document. The request body is an array, requires the additional expenses operation edit permission, must contain 1 to 250 rows and each row must identify an existing operation id with at least one editable value. The operations must belong to the additional expenses document type, the parent document must pass operation document checks and a linked parent purchase must satisfy its lock contract; price updates write both cost and price fields. Business errors such as missing body, empty or oversized batch, invalid row fields, no editable values, denied access, operation or document mismatch, posted/blocked/deleted document state, parent purchase lock failure, numeric overflow, database failures or action log failures are returned as HTTP 200 ErrorResult.

Request Parameters

Name Type Required Description
cost Decimal Optional cost field. The current API implementation does not use this value to update the operation.
id Int64 Required Additional expenses operation ID to update.
order Int64 Optional Operation order. If NULL, the database value is not changed. Ignored for database versions earlier than 363.
price Decimal Optional New item price with up to 3 decimal places. Must be greater than or equal to 0 when supplied; the current implementation writes it into both cost and price columns.
quantity Decimal Optional New item quantity with up to 3 decimal places. Must be greater than 0 when supplied.
vat_value Decimal Optional VAT rate value with up to 2 decimal places. -1 means without VAT; null leaves it unchanged.

Request Example

[
  {
    "id": 5001,
    "quantity": 1.000,
    "price": 275000.000,
    "order": 20,
    "vat_value": -1.00
  }
]

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": [
      5001
    ]
  }
}