Metafields API

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!

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?

Hi @sahilrev have you managed to create Metafield with definition through rest API. I also want to do the same.

Also @Liam if you can help me with the same.

Thanks

This video will help you how to create metafields with definition and without definition Shopify App Metafields