setOrdersMerge
Merges multiple orders into one, based on the selected merge mode.
Input parameters
Output data:
A sample request in PHP:
main_order_id | int | ID of the main order (its shipping and invoice data will be retained). |
order_ids_to_merge | array | List of other order IDs to merge. Must not include main_order_id. |
merge_mode | string | Merge 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_costs | bool | Whether 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.
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 |
merged_order_id | int | ID of the merged order |
Sample
Input data:Output data:
A sample request in PHP: