Inventory management

Hi all,

I’m wondering if it is possible to update a product’s inventory / stock levels from a Shopify page without adding to the cart / checking out?

In short, I have a page with multiple select lists populated by all products in a specific collection, when selecting a product from the collection I am hoping to have the inventory / stock for that specific product reduce by one. My first thought was to use AJAX and make an API call to /admin/api/2021-10/inventory_levels/adjust.json but I’m unsure if this is possible or a good solution for security reasons.

Hoping there is a quick and easy solution or a better way to manage this.

Hey @JWWD

One thought was that we wouldn’t recommend calling the Admin API with an AJAX call via the front end as it’s not secure - you’d expose your access credentials. You’d need to to call the Admin API from a backend server/middleware for those inventory levels.

Thanks @Luke_K

Are you able to link me to an example of this solution?