Magidoc

Within Orderchamp every product consists of one or multiple variants. The product itself doesnt have inventory, only the variants have inventory. Every variant has a unique SKU, its own inventory count, and an inventory policy. The inventory policy describes whether the product is allowed to be sold when out of stock.

For information on which fields you can fetch see the Product object type and the ProductVariant object type .

Fetch the inventory for a product

#

With the query below you can fetch the inventory for variants in a product. In this example the variant has an inventory of 15, but also a policy which allows it to be backordered (see the ProductVariantInventoryPolicy enum ).

    
  

Response

    
  

Update the inventory for one variant

#

You can choose to update every single variant of a product individually. Or you can update multiple variants at once . For more information on the available fields see the ProductVariantUpdateInput type .

    
  

Response

    
  

Update inventory for multiple variants

#

You can update multiple variants at once using inventoryLevelBulkAdjust by SKU or ProductVariantId. The adjustment will increase or decrease the inventory level with the amount, if action: SET is not set. If it is set, it will modify the inventory level with the given amount.

If you have set up multiple warehouse locations in your Orderchamp account, you can set the inventory separately as well by specifying the locationId. For more information on how to get the locationId, see Fetch available warehouses for supplier . If no locationId is set, we will use the primary location by default.

    
  

Response