Lock
[POST] .../v1/docinout/lock
Locks warehouse goods receipt or write-off documents for editing. Lock one or more warehouse goods receipt/write-off documents before editing, changing rows, posting, cancelling posting or deletion workflows that follow the document lock contract. The stock receipt/expense tariff option must be enabled; the body must contain a non-empty ids array with positive document IDs and the RBAC permission check for Lock is currently disabled. The response reports how many document lock rows changed and locked documents expose current_user_blocked in DocInOut/Get for the current request user. Errors such as missing body, missing ids, invalid IDs, disabled tariff option, lock conflicts, storage errors or lock errors are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| ids | Array of Int64 | Required | Required non-empty array of positive stock receipt/write-off document IDs. |
Request Example
{
"ids": [
42
]
}
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
}
}