Edit

[POST] .../v1/purchaseoperation/edit

Edits operation receipt from partner. Use this method to update one or more existing receipt-from-partner item lines after they were created and before the business workflow rejects the change. The request body is a JSON array batch where each item must contain an operation id; optional quantity, cost, price, vat_value, order, additional_expenses_amount and description fields change only the provided values. The response returns row_affected and ids for edited operations and the caller must have purchase-operation edit permission; null, empty or oversized arrays, missing ids, invalid numeric values, denied access or persistent validation failures are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
additional_expenses_amount Decimal Optional Additional expenses amount for the operation.
cost Decimal Optional Item purchase cost.
description String Optional Note.
id Int64 Required Receipt-from-partner operation ID.
order Int64 Optional Operation order. If null, the value is not changed. Ignored for database versions earlier than 363.
price Decimal Optional Item amount.
quantity Decimal Optional Item quantity.
vat_value Decimal Optional VAT rate value.

Request Example

[
  {
    "id": 7001,
    "quantity": 10,
    "cost": 41500,
    "price": 47500,
    "vat_value": 12,
    "description": "Adjusted supplier 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": [
      7001
    ]
  }
}