App reviews, troubleshooting, and recommendations
On the GraphQL document page about Product Variant it says:
unitCostUnit cost associated with the inventory item. Note: the user must have "View product costs" permission granted in order to access this field once product granular permissions are enabled.
https://shopify.dev/docs/api/admin-graphql/2024-10/objects/ProductVariant
Where is this "View product costs" permission given to API user?
I have set up an application to a store and given it API access scopes read_inventory and read_products. I have created GraphQL query and successfully ran it to get products and inventories from Shopify store. I also get inventory item unit cost if I request it but I would like to hide it from potential users of shop's GraphQL API. So my question is where is "View product costs" permission set, and can I use it to limit API user's access?
Solved! Go to the solution
This is an accepted solution.
I got an answer from Shopify support. "View unit costs" permission is a reference to the permission given to store staff account and this cannot be used for limiting access to the unit cost field in the inventory item in GraphQl queries. So, the answer is no, it is not possible to limit API user's access to inventory item unit cost field.
This is an accepted solution.
I got an answer from Shopify support. "View unit costs" permission is a reference to the permission given to store staff account and this cannot be used for limiting access to the unit cost field in the inventory item in GraphQl queries. So, the answer is no, it is not possible to limit API user's access to inventory item unit cost field.
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024