Conversations about creating, managing, and using metafields to store and retrieve custom data for apps and themes.
I am trying to create Metafield from API and able to do it for a specific product or collection.
But the issue I am facing is how to create a metafield that can get pin and have definition in it from API? Because all the metafield that I am creating from POSTMAN doesn't get pin and it always goes into metafield without Definition?
Is there a way I can create a global metafield from Postman that have definition in it and that will get pin automatically, so that we can use it on all the products.
Hi Sahilrev,
You can use the metafieldDefinitionCreate mutation to add definitions to metafields and then you can use the metafieldDefinitionPin mutation to pin it on the admin. 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
Hello @Liam I have gone through the documentation that you have shared and it can be possible through GraphQL API, Is it possible to attain the same from Rest API's?
This video will help you how to create metafields with definition and without definition Shopify App Metafields