API documentation
Method list
Test your request
Changelog


setOrdersMerge
Merges multiple orders into one, based on the selected merge mode.


Input parameters
main_order_idintID of the main order (its shipping and invoice data will be retained).
order_ids_to_mergearrayList of other order IDs to merge. Must not include main_order_id.
merge_modestringMerge mode: technical_merge (creates a new technical order without changing the originals) or into_main_order (moves items into the main order and deletes the others).
sum_delivery_costsboolWhether to sum delivery costs: true (add up all shipping costs from merged orders) or false (keep only the main order’s shipping cost).



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
merged_order_idintID of the merged order



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