How to retrieve a list of metafields from a ressource

BLC-Nicolas
Shopify Partner
12 0 0

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
Shopify Staff
241 40 30

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