[POST] .../v1/commercialofferoperation/add
Adds operation to document commercial offer. Use this batch method to add item rows to an editable commercial offer document. The request body is an array of operations, requires the commercial offer operation add permission, must contain 1 to 250 rows, all rows must belong to the same document and each row requires document_id, item_id, positive quantity, non-negative price and valid totals. The parent document must exist, not be deleted or marked for deletion and satisfy the document lock contract; compound items, deleted-mark items and items with children are rejected, while VAT is taken from the item when vat_value is omitted. Business errors such as missing body, empty or oversized batch, invalid fields, mixed document IDs, denied access, document not found, deleted or deletion-marked document, lock failure, compound/deleted/nested item, numeric overflow, database failures or action log failures are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| document_id | Int64 | Required | Commercial offer document ID that receives the operation. |
| item_id | Int64 | Required | Item ID to include in the commercial offer. |
| price | Decimal | Required | Offered item price. Required; zero is allowed and negative values are rejected. |
| quantity | Decimal | Required | Offered item quantity. |
| vat_value | Decimal | Optional | VAT rate value for the commercial offer row. |
Request Example
[
{
"document_id": 1,
"item_id": 1,
"price": 1.0,
"quantity": 1.0,
"vat_value": 1.0
}
]
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
}
}