Zend certified PHP/Magento developer

Ship different qty than ordered qty

I know how to ship orders programmatically and I’m doing it in my current Magento 2 project.

However, the requirements is to ship orders programmatically (from an app using custom API) where the app user can define different qty than the ordered qty and adjust the price accordingly.

Currently, when the qty is more than the ordered qty, the system will ship the ordered qty. And when it’s less, the system will split the order and will be waiting for us to ship the rest of the order.

If you are curious on why I need this requirement read on, if you are not, then stop here as the question is complete above.

I’m developing a website that sells sea food by the weight. And it’s hard for my suppliers to have an exact weight like 2 KG as they can’t split a fish in half if 3 fish make up 2.2 KG.
And some fish is quite expensive and we can’t just swallow up the difference and if we came short like if it became 1.8 KG, we can’t make the customer pay more. So, I developed an app to be used by our driver to confirm pickups and delivery. Every thing is working fine in the app, except for qty adjustments.