[POST] .../v1/docordertomovement/edit
Edits transfer order document. Use this method to update a movement order header before its state restrictions or locks prevent changes. The document id and a valid DocOrderToMovement status_id are required by the current validation path; optional date, stock_receiver_id and attached_user_id update only when their change marker is present. Date 0 means no change, stock_receiver_id 0 or negative means no change, attached_user_id null means no change and attached_user_id 0 clears the responsible user. The document must be locked by the current user and the caller must have movement order edit permission; missing body, invalid id/status, unavailable stock movement order tariff, stock access errors, missing update fields, lock conflicts, denied access or storage failures are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| attached_user_id | Int64 | Optional | Responsible user ID. Null means no change, 0 clears the responsible user and a positive value assigns that user. |
| date | Int64 | Optional | Document date as Unix time in seconds. If 0, the stored date is not changed. |
| id | Int64 | Required | Movement order document ID. |
| status_id | Int64 | Required | Movement order status ID. Required by the current persistent validation and must belong to DocOrderToMovement document type. |
| stock_receiver_id | Int64 | Optional | Receiver stock ID. If 0 or negative, the stored receiver stock is not changed. |
Request Example
{
"id": 4401,
"date": 1767229200,
"stock_receiver_id": 12,
"status_id": 3,
"attached_user_id": 5
}
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
}
}