How to expose metafields to the Storefront API

Modified on Thu, 14 Apr 2022 at 06:42 PM

Sometimes, a custom solution involving metafields usage requires more complex logic and flexibility than the Shopify Liquid can handle. That's where the Shopify Storefront API comes really handy. 

However, by default, all metafields are hidden from the Storefront API and may be accessed via Shopify Liquid code only. A special API call has to be made in order to make a metafield accessible via the Storefront API which seems to be an extra hassle... don't worry, we got your back! 

Now it's possible to expose a metafield to the Storefront API (or hide it) with a couple of clicks.

To start with, go to the "Settings" section of our app:


Next, select a resource type you'd like to add an API-accessible metafield to from this menu:



And the last step: fill in the key (1) and namespace (2) for a metafield you'd like to expose to the Storefront API and save the changes (3):


That's it, you've created your first metafield storefront visibility record with just a couple of clicks:


Now you're ready to start retrieving metafields via the Shopify Storefront API.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article