I somewhere read that transaction creation via api was removed?
And now if I wan’t to create adjustment transaction entries, I first have to create transaction and then create transaction entries for that transaction?

Maybe there is possibility to create it like there is endpoint in InventoryController.saveAdjustmentTransaction?

But with api call?

There is a Stock Adjustment API. Give me a day or two to play around and document the endpoint for you.

I’ve added a ticket to investigate.

I’ve updated the ticket to include a bug I found in the Stock Adjustment API. I’ll try to have a fix for that shortly. It shouldn’t be difficult, and I will have some time for it this week.

In the meantime, you can submit form data (not JSON) to the InventoryItemController.adjustStock() action (the same one we use when adjusting stock from the UI).

It’s ugly as heck and you get a redirect (302) as a response, but it creates a transaction for you.

And for what it’s worth, I tried to pass JSON to this method but the controller action is not configured to parse JSON and bind to the command object so it returns an error.

Oh and if there are other APIs or use cases you want to see supported, please let me know. I can’t promise they’ll get done but if it’s easy enough I’ll see what I can do.