Creating Metafields Without Referencing a Resource

Hi all,

It seems that I cannot find anything in this regard: I would like to add many metafields in my shop, and I would like to use the APIs to do that, instead of manually creating them using the dashboard.

I could only find this https://shopify.dev/apps/metafields/manage#create-metafields which seems that I must have a resource (such a product) to create a metafield. I want to achieve the same result, without assigning a resource just like the Shopify Metafield Dashboard (here you don’t need to specify a resource, you just need to say that it’s for a product and it will create it fro you).

It’s always like this, isn’t it? You look for hours and don’t find anything, you then ask for help and find the response instantly…

For others in my position, you will need to create Metafield Definition ( https://shopify.dev/apps/metafields/definitions ) - it’s literally what I was looking for.