Retrieving Metafield definitions with API

Solved
natashadisante
Shopify Partner
84 1 8

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)

Accepted Solutions
Neethan
Shopify Staff
5 2 10

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
5 2 10

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

natashadisante
Shopify Partner
84 1 8

Worked. Thanks a lot!