Solved

Retrieving Metafield definitions with API

natashadisante
Shopify Partner
126 0 14

Now that the Shopify admin allows store owners to "define" metafields (in Settings), how can the list of such metafield definitions be retrieved via the API? Not the values of specific metafields created in the store, but the definitions.

Accepted Solution (1)

Neethan
Shopify Staff (Retired)
5 2 13

This is an accepted solution.

Hi @natashadisante, interacting with metafield definitions is only supported in GraphQL. In order to retrieve a list of a store's definitions you can do so using the query specified here which expects an argument of ownerType. If you have a specific metafield definition you would like to query by ID please have a look at the reference available here. I hope that helps!

View solution in original post

Replies 2 (2)

Neethan
Shopify Staff (Retired)
5 2 13

This is an accepted solution.

Hi @natashadisante, interacting with metafield definitions is only supported in GraphQL. In order to retrieve a list of a store's definitions you can do so using the query specified here which expects an argument of ownerType. If you have a specific metafield definition you would like to query by ID please have a look at the reference available here. I hope that helps!

natashadisante
Shopify Partner
126 0 14

Worked. Thanks a lot!