Focusing on managing products, variants, and collections through the API.
Hi, on my store I have a lot of items, I wanted to bulk update my products using my admin API and my own python program. Is it possible to extract the cost price I have set for the items on my store using an Admin API? Or is there another way to do it except exporting it as csv?
Solved! Go to the solution
This is an accepted solution.
You should be able to use the GraphQL Admin API to retrieve the cost per item of your products via the unitCost field on the InventoryItem object.
You can then use the returned data in your Python program to perform your updates - or use the Bulk Operations API to update. Would this work for your use case?
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
This is an accepted solution.
You should be able to use the GraphQL Admin API to retrieve the cost per item of your products via the unitCost field on the InventoryItem object.
You can then use the returned data in your Python program to perform your updates - or use the Bulk Operations API to update. Would this work for your use case?
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
You can also update via REST Admin API using the inventory_item endpoint, see the cost property.