How to add media (videos, 3D) to products via API

Solved
Hgolov
Shopify Partner
23 0 2

Hi,

I've updated my client's theme to display videos in the product gallery - both in the main display and the thumbnails. However, I can't find any documentation as to how to add video or 3D image urls via the REST API. I know I can go into each product individually, but that's not going to work at scale. Please help!

0 Likes
Greg_Kujawa
Shopify Partner
947 79 202

You can utilize the REST API to hit the Asset endpoint I believe --> https://shopify.dev/docs/admin-api/rest/reference/online-store/asset That is one option.

0 Likes
olivert
Explorer
51 11 14

Hi Mate

If your videos are stored on vimeo or YouTube etc.

You can store the video url as a metafield against the product then change your theme to look at that metafield for the video source.

It's really nice to automate It this way.

0 Likes
Hgolov
Shopify Partner
23 0 2

Thanks @Greg_Kujawa & @olivert - the thing is I'm referring to Shopify's newly native support of videos & 3D photography.

See this post for more information:

https://www.shopify.com/partners/blog/product-media

I don't see any support for adding this type of media by rest.

0 Likes
olivert
Explorer
51 11 14

This is an accepted solution.

Ah yes sorry mate

Yep the REST API is very limited in some places you can't do this with REST

You'll have to jump on GraphQL to get the job done

 If you 100% must use REST then you can add the url to a metafield and do it that way

You've probably already seen this but:

https://shopify.dev/tutorials/manage-product-media-with-admin-api

Bottom of the page they say it's unavailable with REST. (Boo!)

 

 

0 Likes
madeinply
Tourist
8 0 1

Hi, please visit our site sales@madeinply.co.uk as an example. I’m just about to launch a new business called parametric 3d which will offer these services. Please get in touch if your interested 

0 Likes
vikfromlevar
Excursionist
25 0 2

Hello - a late reply, but this might be the answer you're looking for. 

 

Our Shopify App  lets you host 3D models on any theme (desktop/mobile) with the ability to kick-out to mobile Augmented Reality. I'd be happy to offer discounted hosting and 3D asset creation, you can learn more here

 

-Vik

See how Augmented Reality from levAR can help your business drive sales, reduce returns and increase brand awareness.

levar.io
0 Likes