Skip to main content
mutation

Requires write_products access scope. Also: The user must have a permission to delete media from a product.

Deprecated. Use fileUpdate instead.

Deletes media from a Product, such as images, videos, and 3D models.

When you delete media images, the mutation also removes any corresponding product images. The mutation returns the IDs of both the deleted media and any product images that the deletion removed.


Caution

This action is irreversible. You can't recover deleted media.


•[ID!]!
required

The media IDs to be deleted.

•ID!
required

Specifies the product ID from which the media will be deleted.


Was this section helpful?

Anchor to ProductDeleteMediaPayload returnsProductDeleteMediaPayload returns

•[ID!]

List of media IDs which were deleted.

Anchor to deletedProductImageIdsdeletedProductImageIds
•[ID!]

List of product image IDs which were deleted.

•[MediaUserError!]!
non-null

The list of errors that occurred from executing the mutation.

•Product

The product associated with the deleted media.

•[UserError!]!
non-nullDeprecated

The list of errors that occurred from executing the mutation.


Was this section helpful?