How can update inventory based on SKU using GraphQL API

New Member
1 0 1

Hello,

 

I want to update the inventory quantity based product SKU automatically every day. I have product SKU and its quantity stored in the SQL Server database.  I was thinking to make GraphQL API call from the server where the database is present and update the inventory. Is it possible? 

Suggestions of a better way would be really appreciated.

Thank you!

 

1 Like
Highlighted
Shopify Staff
Shopify Staff
469 36 95

You can definitely update inventory via GraphQL using the Admin API.  If you are not storing the ID of the inventory matched with SKU locally you will need to look up the inventory items with the SKU beforehand.  Here is a tutorial that shows both REST and GraphQL ways to update inventory in Shopify.


Cheers,

 

 

Developer Experience @ Shopify
0 Likes