[POST] .../v1/orderfrompartneroperation/add
Creates operation order from partner. Use this method to add one or more requested item lines to a DocOrderFromPartner customer order before the order is converted into a wholesale shipment. The request body is a JSON array batch; every operation must contain document_id, item_id, positive quantity up to 999999999, discounted price from 0 to 99999999999, non-negative price2, optional vat_value and optional description up to 300 characters and all array items must reference the same document_id. The parent DocOrderFromPartner must be locked by the current user and eligible for editing and the item must be an active non-compound leaf item; null, empty or oversized arrays, invalid values, mixed document_ids, denied access or document/item state conflicts are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| description | String | Optional | Operation note. Maximum length is 300 characters. |
| document_id | Int64 | Required | Order-from-partner document ID. |
| item_id | Int64 | Required | Item ID. |
| price | Decimal | Required | Discounted item price. Required; zero is allowed, negative values are rejected and the value must be no greater than 99999999999. |
| price2 | Decimal | Required | Original item price before discount. Required; zero is allowed and negative values are rejected. |
| quantity | Decimal | Required | Ordered item quantity. Must be greater than zero and no greater than 999999999. |
| vat_value | Decimal | Optional | VAT rate value. If omitted, the API uses the item's VAT value; use -1 for no VAT. |
Request Example
[
{
"document_id": 4601,
"item_id": 1001,
"quantity": 12,
"price": 15,
"price2": 18,
"vat_value": 12,
"description": "Customer order line"
}
]
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,
"ids": [
8501
]
}
}