Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

How to retrieve a list of metafields from a ressource

How to retrieve a list of metafields from a ressource

BLC-Nicolas
Shopify Partner
12 0 1

Hi everyone !

 

I'd like to retrieve a list of all the metafields allready existing from a ressource.

 

I was thinking about an endpoint like this but it doesn't work.

/admin/products/metafields.json

 

Thanks for your help.

 

Reply 1 (1)

awwdam
Shopify Staff
249 42 38

Hey @BLC-Nicolas,

I took a closer look at your question, and our metafields documentation for the REST Admin API. This has a table of example endpoint URLs for the specific resources that have metafields available, linked here. In the case of the Product resource, an id is required to retrieve a list back eg. /admin/products/{id}/metafields.json.

- Cheers!

awwdam | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog