Conversations about creating, managing, and using metafields to store and retrieve custom data for apps and themes.
Hello everyone, I'm trying to send an image of my products (product/images[1]/admin_graphql_api_id in a product metafield, but I get the error "must be a file reference string", I don't understand where is the problem coming from, does anyone have any advice?
My API REST call is : POST
Solved! Go to the solution
This is an accepted solution.
Hey @thinkcloud
Unfortunately I think these are only accessible via the GraphQL API.
{
products(first:10) {
nodes {
id
media(first:10) {
nodes {
id
}
}
}
}
}
Scott | Developer Advocate @ Shopify
Hey @thinkcloud
Checking with the metafield folks and will report back.
Scott | Developer Advocate @ Shopify
Hi, Do you have ideas ? :c
Hey @thinkcloud
They said:
---
gid://shopify/MediaImage/
...
gid://shopify/Video/
...
Scott | Developer Advocate @ Shopify
Thanks, and how to retreive MediaImage with REST API ?
I only GET ProductImage 😕
This is an accepted solution.
Hey @thinkcloud
Unfortunately I think these are only accessible via the GraphQL API.
{
products(first:10) {
nodes {
id
media(first:10) {
nodes {
id
}
}
}
}
}
Scott | Developer Advocate @ Shopify