Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Inventory uploaded via the "Products" Admin API not working

Inventory uploaded via the "Products" Admin API not working

PharmaCareIT
Visitor
1 0 0

We have been trying to use the "Product" Admin API ( /admin/api/2023-10/products/632910392.json ) to upload inventory.

 

This used to work but we have noticed that the process is no longer updating inventory.  The API call works and returns a valid response but the inventory values are not updated.

 

Can anyone suggest why this might be?

{

  "product": {
    "id": 2452916338745,
    "variants": [
      {
        "id": 19747877683257,
        "inventory_item_id": 24218617577529,
        "inventory_quantity": 25453
      }
    ]
  }
}

Reply 1 (1)

Liam
Community Manager
3108 344 892

Hi PharmaCareIT,

 

You'll need to use the InventoryLevel resource to set inventory levels. There's an example of what this looks like in our developer docs

 

Hope this helps,

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog