Edit
[POST] .../v1/inventoryoperation/edit
Updates item lines in an inventory count document. Update counted quantities and/or prices on existing inventory operation rows. The request body is an array, requires the inventory operation edit permission, must contain 1 to 250 rows and each row must identify an existing operation id; actual_quantity and price must be non-negative and within the documented numeric limits when provided. All target rows must belong to inventory documents that pass operation membership checks and the parent document lock contract; update_actual_quantity controls whether the supplied actual_quantity replaces or increments the stored value. Errors such as missing body, empty or oversized batch, invalid row fields, no editable values, denied access, operation or document not found, closed/deleted document restrictions, lock failure, storage errors or no affected rows are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| actual_quantity | Decimal | Optional | New actual counted quantity for the inventory row. |
| id | Int64 | Required | Inventory operation ID to update. |
| order | Int64 | Optional | Operation order inside the document. If null, the stored order is not changed. Ignored for database versions earlier than 407. |
| price | Decimal | Optional | Inventory row price. |
| update_actual_quantity | Boolean | Optional | When changed manually, this value is applied only if update_actual_quantity is true. Otherwise, the sent actual_quantity is added to the actual_quantity stored in the database. |
Request Example
[
{
"actual_quantity": 1.0,
"id": 1,
"order": 1,
"price": 1.0,
"update_actual_quantity": true
}
]
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Update | Update operation result. |
Response Example
{
"ok": true,
"result": {
"ids": [
null
],
"row_affected": 1
}
}