cancel
Showing results for 
Search instead for 
Did you mean: 

REST API Order Insertion - Inventory Deduction

REST API Order Insertion - Inventory Deduction

We've configured an on-premises Magento store with sample data, operating on version 2.4.6. Our goal is to insert orders using the REST API. Although we've successfully inserted orders, we've encountered an issue where the product inventory isn't being deducted as expected when utilizing the "Check / Money order" (checkmo) payment method.

Interestingly, when attempting the same process through the storefront interface, the deduction of inventory functions properly. 


4 REPLIES 4

Re: REST API Order Insertion - Inventory Deduction

The deduction of inventory kind of depends on lots of different configurations. What actually happens when you do it through the storefront and what happens when you do it through the API?

 

In which state is the order when you do it from the front end and in which when you do it through the API?

Founder at https://agency418.com

Re: REST API Order Insertion - Inventory Deduction

In both cases (Storefront & REST API), When an order is placed the initial order state is "new" and the order status is "pending"

Attaching Screenshots for inventory configuration in the Magento admin panel. 

 

https://d1hq75pouwojqi.cloudfront.net/magento1.png

https://d1hq75pouwojqi.cloudfront.net/magento2.png  

Re: REST API Order Insertion - Inventory Deduction

So when you ship the order does the quantity decrease then?

 

I mean, you have sellable quantity and quantity. My best guess is your sellable qty decreases and your quantity remains the same as quantity goes into inventory reservation and once you ship the order the reservation is released and your quantity decreases. 

Founder at https://agency418.com

Re: REST API Order Insertion - Inventory Deduction

When we use the REST API to insert orders, the Salable quantity isn't decreasing as expected, unlike orders inserted through the storefront.

We're trying to figure out if there's a specific setting in the Order Creation Payload that controls the salable quantity.

To troubleshoot, we copied the payload of an order placed through the storefront and used it to create another order via the REST API. However, the salable quantity still isn't being updated correctly.