Can I get model3d that setup product's media using storefront API?

Can I get model3d that setup product's media using storefront API?

yuji-akutsu
Shopify Partner
2 0 0

Hi, I'm trying to develop shopify experience site using storefront API.

 

Product can register image, video...and model 3d as product's media.

 

Im struggling to get the specific media type, especially model 3d...

Im looking for around document,

recently model3d object exists in storefront api document.

https://shopify.dev/docs/api/storefront/2024-01/objects/Model3d

 

so then, how can I get a model 3d when retrieving product/product variant that have a model 3d in media?

Replies 2 (2)

Liam
Community Manager
3108 341 879

Hi Yuji-Akutsu,

 

The file type is a GLB file, and you can test with demo files that are available on our developer docs

 

Hope this helps!

Liam | Developer Advocate @ 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

yuji-akutsu
Shopify Partner
2 0 0

Thanks for the reply!
I actually know the file type, so then I tried to get a model 3d file that uploaded as product's media, using Storefront API...

so far I saw mock.shop/ai site's qraphQL generator can make query to get product with media(included image/video/3dModel).

unfortunately, the reference demo shop don't have a multiple file type but image only for each products.

 

What actually I want to know is Sample Query to get "first 1 3dModel of specific Object" using storefront API, and Sample Result that success to get product's 3d model...
https://shopify.dev/docs/custom-storefronts/building-with-the-storefront-api/api-exploration/graphiq...
anyway, I found the sample query explorer, so will try to use the query sample to get 3d object's source url.