Inventory
The Inventory API allows you to manage stock for products at both organization and store levels. Each product keeps a history of inventory transactions, enabling easier stock auditing.
You can specify an initial stock level when you create a product. The stock is set to 0
by default.
You cannot create multiple inventories of the same organization-level product in different stores because no unique stock ID, specific to each store, is currently generated. Hence, when you try to manage inventory of the same product for different stores, you get an invalid product identifier error.
📄️ Get Stock for all Products
Returns all products and their associated stock.
📄️ Get Stock for Multiple Products
Returns stock for all products matching the supplied unique identifiers.
📄️ Create Stock for Product
Sets the inventory quantity for the specified product. When you take this action, you are choosing to manage the inventory for this product in Commerce.
📄️ Get Stock for Product
Gets the stock for the product matching the specified unique identifier.
📄️ Delete Stock for Product
Deletes the inventory for the specified product. The product inventory is null and is no longer managed by Commerce. If you want to keep managing inventory but have none of the product in stock, set the inventory to `0` instead of deleting the inventory.