Conversations about creating, managing, and using metafields to store and retrieve custom data for apps and themes.
Hi,
in the ADMIN API Documentation, there is an endpoint that retrieves a list of metafields that belong to a Product Image resource
GET /admin/api/2020-04/metafields.json?metafield[owner_id]=850703190&metafield[owner_resource]=product_image
I tried to modify in order to get the list of metafields that belongs to a Custom Collection, but the response from this endpoint returned me 'not found'
Here is how I have created
GET /admin/api/metafields.json?metafield[owner_resource]=collection
Is this modification possible or does exist any other endpoint that retrieves a list of all metafields that are in collections?
I look forward to hearing back from you soon.
Thank you
Solved! Go to the solution
This is an accepted solution.
Hi Helidona,
That's not the way to proceed. You have to use this following endpoint:
/admin/collections/#{id}/metafields.json
More info here:
https://shopify.dev/docs/admin-api/rest/reference/metafield?api[version]=2020-04
This is an accepted solution.
Hi Helidona,
That's not the way to proceed. You have to use this following endpoint:
/admin/collections/#{id}/metafields.json
More info here:
https://shopify.dev/docs/admin-api/rest/reference/metafield?api[version]=2020-04
Hi @Jayvin,
I have used this endpoint for a specific collection, but my request was to get all of them without specifying the collection id. Hence, I hoped that would be another endpoint that will have that same solution as for Product Image endpoint.
Nevertheless, thank you again for your answer!