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!]!)

    The list of errors that occurred from executing the mutation.

  • product (Product)

    The product which media was deleted from.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    The list of errors that occurred from executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead

Version 2021-10 (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!]!)

    The list of errors that occurred from executing the mutation.

  • product (Product)

    The product which media was deleted from.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    The list of errors that occurred from executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead

Version 2021-07 (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!]!)

    The list of errors that occurred from executing the mutation.

  • product (Product)

    The product which media was deleted from.

Deprecated return fields

  • userErrors (