[POST] .../v1/inventoryoperation/addbulk
Creates operation inventory c bulk adding items. Use this method to bulk-add inventory operation rows by item group_ids and/or department_ids instead of sending each item manually. The request requires the inventory operation add permission, document_id and update_actual_quantity are required, actual_quantity must be non-negative and within the numeric limit and the parent inventory document must pass the same editability and lock checks as InventoryOperation/Add. The method loads matching non-deleted items through the item catalog, inserts or restores rows, applies the inventory document price type and either replaces or increments actual_quantity according to update_actual_quantity. Business errors such as missing body, invalid document_id, no matching items, denied access, closed/deleted/full document restrictions, lock failure, quantity overflow, item lookup failures, database failures or persistent validation errors are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| actual_quantity | Decimal | Optional | Actual item quantity. Default value: 0. |
| department_ids | Array of Int64 | Optional | Item section IDs. |
| document_id | Int64 | Required | Inventory document ID. |
| group_ids | Array of Int64 | Optional | Item group IDs. |
| update_actual_quantity | Boolean | Required | Item quantity update mode: true - update, false - do not update and add to the existing quantity instead. |
Request Example
{
"actual_quantity": 1.0,
"department_ids": [
1
],
"document_id": 1,
"group_ids": [
1
],
"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
}
}