addOrderBySplit
Creates a new order by splitting selected products from an existing order. The new order inherits all fields and information from the original one.
Input parameters
Output data:
A sample request in PHP:
order_id | int | ID of the order to split |
items_to_split | array | A list of products to move to the new order. Each item must contain fields listed below |
| - order_product_id | int | ID of the product in the original order (from getOrders) method |
| - quantity | int | Quantity to be moved (must be less than or equal to the original quantity) |
delivery_cost_to_split | float | Optional. Delivery cost (net or gross, depending on order) to transfer to the new order. This amount will be deducted from the original order and assigned to the new one. Must not exceed the current delivery price. |
Output data
The method returns the data in JSON format.
status | varchar(30) | SUCCESS - request executed correctly ERROR - an error occurred during an API request. Error details will be described in 2 additional returned fields: error_message and error_code |
new_order_id | int | ID of the newly created order |
Sample
Input data:Output data:
A sample request in PHP: