[POST] .../v1/wholesalereturnoperation/edit
Edits operation return to partner. Use this method to update one or more existing item lines in a DocWholeSaleReturn 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, price, price2, vat_value and description fields change only the provided values and description is limited to 300 characters. The operation must belong to a DocWholeSaleReturn document, the parent document must be locked by the current user and eligible for editing and the caller must have edit permission; null, empty or oversized arrays, missing ids, invalid numeric values, denied access, no changed fields 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; null means no change. |
| id | Int64 | Required | Return-from-partner operation ID. |
| order | Int64 | Optional | Operation order. If NULL, the database value is not changed. Ignored for database versions earlier than 363. |
| price | Decimal | Optional | New discounted return price. When provided, it must be zero or greater and no greater than 99999999999. |
| price2 | Decimal | Optional | New return price before discount. When provided, it must be zero or greater and no greater than 99999999999. |
| quantity | Decimal | Optional | New returned item quantity. When provided, it must be greater than zero and no greater than 999999999. |
| vat_value | Decimal | Optional | New VAT rate value. When provided, it must be non-negative or -1 for document/default VAT behavior. |
Request Example
[
{
"id": 9601,
"quantity": 2,
"order": 20,
"price": 49500,
"price2": 52000,
"vat_value": 12,
"description": "Adjusted return 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": [
9601
]
}
}