API version: unstable
API version: 2021-04 Release candidate
API version: 2021-01 Latest
API version: 2020-10
API version: 2020-07
API version: 2020-04
API version: 2020-01 Unsupported
API version: 2019-10 Unsupported

productDeleteMedia mutation

Version unstable

Deletes media for a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
mediaIds ( [ID!]! ) required

The media IDs to be deleted.

productId ( ID! ) required

The ID of the product on which to delete media.

Return fields

  • deletedMediaIds ([ID!])

    List of media IDs which were deleted.

  • deletedProductImageIds ([ID!])

    List of product image IDs which were deleted.

  • mediaUserErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

  • product (Product)

    The product which media was deleted from.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead

Version 2021-04 (Release candidate)

Deletes media for a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
mediaIds ( [ID!]! ) required

The media IDs to be deleted.

productId ( ID! ) required

The ID of the product on which to delete media.

Return fields

  • deletedMediaIds ([ID!])

    List of media IDs which were deleted.

  • deletedProductImageIds ([ID!])

    List of product image IDs which were deleted.

  • mediaUserErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

  • product (Product)

    The product which media was deleted from.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead

Version 2021-01 (Latest)

Deletes media for a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
mediaIds ( [ID!]! ) required

The media IDs to be deleted.

productId ( ID! ) required

The ID of the product on which to delete media.

Return fields

  • deletedMediaIds ([ID!])

    List of media IDs which were deleted.

  • deletedProductImageIds ([ID!])

    List of product image IDs which were deleted.

  • mediaUserErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

  • product (Product)

    The product which media was deleted from.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead

Version 2020-10

Deletes media for a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
mediaIds ( [ID!]! ) required

The media IDs to be deleted.

productId ( ID! ) required

The ID of the product on which to delete media.

Return fields

  • deletedMediaIds ([ID!])

    List of media IDs which were deleted.

  • deletedProductImageIds ([ID!])

    List of product image IDs which were deleted.

  • mediaUserErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

  • product (Product)

    The product which media was deleted from.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead

Version 2020-07

Deletes media for a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
mediaIds ( [ID!]! ) required

The media IDs to be deleted.

productId ( ID! ) required

The ID of the product on which to delete media.

Return fields

  • deletedMediaIds ([ID!])

    List of media IDs which were deleted.

  • deletedProductImageIds ([ID!])

    List of product image IDs which were deleted.

  • mediaUserErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

  • product (Product)

    The product which media was deleted from.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead

Version 2020-04

Deletes media for a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
mediaIds ( [ID!]! ) required

The media IDs to be deleted.

productId ( ID! ) required

The ID of the product on which to delete media.

Return fields

  • deletedMediaIds ([ID!])

    List of media IDs which were deleted.

  • deletedProductImageIds ([ID!])

    List of product image IDs which were deleted.

  • mediaUserErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

  • product (Product)

    The product which media was deleted from.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead

Version 2020-01 (Unsupported)

Deletes media for a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
mediaIds ( [ID!]! ) required

The media IDs to be deleted.

productId ( ID! ) required

The ID of the product on which to delete media.

Return fields

  • deletedMediaIds ([ID!])

    List of media IDs which were deleted.

  • deletedProductImageIds ([ID!])

    List of product image IDs which were deleted.

  • mediaUserErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

  • product (Product)

    The product which media was deleted from.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead

Version 2019-10 (Unsupported)

Deletes media for a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
mediaIds ( [ID!]! ) required

The media IDs to be deleted.

productId ( ID! ) required

The ID of the product on which to delete media.

Return fields

  • deletedMediaIds ([ID!])

    List of media IDs which were deleted.

  • deletedProductImageIds ([ID!])

    List of product image IDs which were deleted.

  • mediaUserErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

  • product (Product)

    The product which media was deleted from.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead

Version 2019-07 (Unsupported)

Deletes media for a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
mediaIds ( [ID!]! ) required

The media IDs to be deleted.

productId ( ID! ) required

The ID of the product on which to delete media.

Return fields

  • deletedMediaIds ([ID!])

    List of media IDs which were deleted.

  • deletedProductImageIds ([ID!])

    List of product image IDs which were deleted.

  • mediaUserErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

  • product (Product)

    The product which media was deleted from.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead

Version 2019-04 (Unsupported)

Deletes media for a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
mediaIds ( [ID!]! ) required

The media IDs to be deleted.

productId ( ID! ) required

The ID of the product on which to delete media.

Return fields

  • deletedMediaIds ([ID!])

    List of media IDs which were deleted.

  • deletedProductImageIds ([ID!])

    List of product image IDs which were deleted.

  • mediaUserErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

  • product (Product)

    The product which media was deleted from.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead