[POST] .../v1/productionoperation/edit
Edits production operations. Use this method to update one or more produced item rows before the parent production document is posted. The request body is a JSON array batch where every item must contain an operation id; quantity 0 means no quantity change and non-zero quantity values must be positive whole numbers that do not exceed 999999999. Production must be enabled, the first operation's parent document must be unposted, not deleted and locked by the current user and the current request user must have production operation edit permission. The response returns row_affected and ids for edited rows; null, empty or oversized arrays, invalid ids or quantities, disabled production, denied access, lock conflicts, posted documents, missing operations and storage failures are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | Int64 | Required | Production operation ID to update. |
| quantity | Decimal | Optional | New produced item quantity. If 0, quantity is not changed; non-zero values must be positive whole numbers and cannot exceed 999999999. |
Request Example
[
{
"id": 8401,
"quantity": 12
}
]
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": [
8401
]
}
}