API documentation
Method list
Test your request
Changelog


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
order_idintID of the order to split
items_to_splitarrayA list of products to move to the new order. Each item must contain fields listed below
| - order_product_idintID of the product in the original order (from getOrders) method
| - quantityintQuantity to be moved (must be less than or equal to the original quantity)
delivery_cost_to_splitfloatOptional. 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.
statusvarchar(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_idintID of the newly created order



Sample
Input data:
Output data:
A sample request in PHP: