I am trying to use the Rest API to create partial shipments for Magneto 2 orders. In two different scenarios.
First is one item with multiple pieces, say a customer ordered 4 pieces of sku 3 but I only ship 1 piece. I send the message to
https://test.m2.test.com/index.php/rest/V1/order/61845/ship
with body
{"entity":{"order_id":"61845","items":[{"order_item_id":"3","qty":"1"}]}}
I get a valid response "44360" but when I check the order in the admin I see
Ordered 4
Shipped 4.
I have tried the message with just the items
{"entity":{"items":[{"order_item_id":"3","qty":"1"}]}}
and with actual item id
{"entity":{"order_id":"61845","items":[{"order_item_id":"77130","qty":"1"}]}}
{"entity":{"items":[{"order_item_id":"77130","qty":"1"}]}}
every one of them yields the same result
Ordered 4
Shipped 4.
The second scenario is with multiple items in the order; if I ship one item but not the other both are shown as fully shipped.
It basically appears that the application is just seeing the order_id in the POST path and marks everything in that order as shipped in full.
Any help is greatly appreciated.