[POST] .../v1/docinventory/lock
Locks inventory document for editing. Use this method to lock one or more inventory documents before editing headers, changing rows, moving rows or closing/opening the document in workflows that follow the document lock contract. The request body must contain a non-empty ids array with positive document IDs and the stock inventory tariff option must be enabled; the RBAC permission check for Lock is currently disabled in this controller. The response reports how many document lock rows changed and locked documents expose current_user_blocked in DocInventory/Get for the current request user. Business errors such as missing body, missing ids, invalid IDs, disabled tariff option, lock conflicts, database failures or persistent lock errors are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| ids | Array of Int64 | Required | Inventory document IDs. |
Request Example
{
"ids": [
1
]
}
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
}
}