duplicating/creating a draft order does not support shipping duplication

I’m trying to duplicate an order (fully). I know this is possible as there is another 3rd party integration that is doing it but I couldn’t get it to work.

I’m creating a draft order and then completing it as suggested in many places online, but for some reason no matter what i do, the shipping lines of the original order would not pass to the draft order and doing a PUT on the order after its been complete doesn’t update it either (even though it does return 200 status code).

I’ve tried:

  1. putting the shipping_lines exactly as it is in the original order - got a weird error saying “expected Array to be a Array”. Apparently it doesnt expect an array, but rather an object.

  2. changing it to an object creates the draft order, but it returns without the shipping_lines (even though i put it in the payload of the POST method)

  3. completing the draft order and then doing a PUT on that order with the shipping lines (both array and object) which didnt work as well

p