How can I extract the URL from a Metafields API call?

How can I extract the URL from a Metafields API call?

Chris_Sydney
Shopify Partner
108 4 23

 

Hey There, 

I am using the following GET 

https://{{store_name}}.myshopify.com/admin/api/{{api_version}}/products/{{productID}}/metafields/{{metafieldID}}.json

and it is returning the metafield object which looks like this:

 

{
"metafield": {
"id":value,
"namespace": "theme",
"key": "image",
"value": "gid://shopify/MediaImage/value",
"description": null,
"owner_id":value,
"created_at": "2023-06-24T16:34:47+10:00",
"updated_at": "2023-06-26T15:44:13+10:00",
"owner_resource": "product",
"type": "file_reference",
"admin_graphql_api_id": "gid://shopify/Metafield/value"
}
}
 

I am looking to get the URL of the file via the API, any ideas how I would do that?

Replies 0 (0)