Stay up to date

Developer changelog

Tools

Manage 3D and video on products with our new Media APIs

Effective June 19, 2019

New

We're excited to announce the developer preview and API for managing 3D and video on products is now available to partners for testing and development. Likewise, additions to the GraphQL Admin API allow developers to create, retrieve, update, and delete 3D and video on products.

The introduction of Video & 3D for products, later this year, means that merchants will soon be able to upload these new media types in their Shopify admin and associate them with products to best showcase their products on the storefront. Theme developers can use newly exposed Liquid syntax to present these video and 3D elements within their themes and app developers are able to manage product media via the GraphQL Admin API. Likewise, product media will also be exposed on the Storefront API later in the year.

We’re happy to say that Video & 3D for products feature is now available in the Unite developer preview on all development stores. To enable you to build on top of this feature, our new product media API is exposed in the unstable version of the GraphQL Admin API.

What does the Media API mean for developers of public apps or custom integrations?

Using the Unite developer preview in combination with the unstable version of the GraphQL API, partners can utilize new mutations, objects and fields to create new product media and associate them with products. Using the productMediaCreate mutation apps can create a media asset of four types: image, video, external video and 3D model. These assets can be retrieved via the media connection on the Product object. Video, 3D models and images can be updated via the productUpdateMedia mutation and deleted using productDeleteMedia. This media API workflow is covered in detail in our Product Media API guide.

What developers need to know

  • Video & 3D for products is now available on developer stores with the Unite developer preview enabled.
  • Merchants will be able to create, update and remove a new product media types, including video, external video YouTube embeds, 3D models and, as before, images.
  • This functionality is also exposed via the GraphQL Admin API.
  • Media is exposed in the unstable version of the GraphQL API and is therefore subject to change. Find more information about features which will be added in the near future below.
  • Whilst product media is not exposed via REST the feature does have implications for those interacting with product images via REST endpoints. Find more information below.
  • Product media introduces new Liquid syntax. Theme developers can find out more information in the Liquid documentation. An example version of the Debut theme, with full support for video and 3D media types, is available on the Unite developer preview.
  • Product media will also be exposed via the Storefront API later this year.

Do I need to update my app?

This addition to the GraphQL API introduces no backward incompatible changes, so your app will continue to function as normal. However, if you wish to support workflows which take advantage of the 3D and video media types in your app then you will need to utilize the new features of the GraphQL Admin API. You will find more information about adopting product media workflows in our API guide.

Implications for the REST Admin API

  • Images will continue to be exposed as before but new media types will be available via GraphQL only.
  • Images created using the GraphQL API media mutations are also surfaced in REST, but videos and 3D models are not.
  • In this case the featured image will always be the first image in the media array.

Media changes coming soon to the GraphQL Admin API**

  • The productUpdate and productImageReorder mutations will be updated to fully support product media.
  • We will shortly release a new product media app extension that will allow apps to register to be invoked to edit media.

Get started in the Unite developer preview

To get started with the developer preview, create a new development store with the Unite 2019 developer preview enabled and explore our documentation.

Getting support and providing feedback

As always, we’re very keen to hear your feedback, use cases and concerns about the introduction of 3D & Video for products. Once you’ve had a chance to try out the feature on your Developer Preview stores, please join us in the forums.