Anchor to productDeleteAsyncproduct
productDeleteAsync
mutationDeprecated
Requires access scope. Also: The user must have a permission to delete a product.
Deletes a product asynchronously, including all associated variants and media. Use instead.
Anchor to Arguments
Arguments
- Anchor to productIdproduct•
Id ID!required The ID of the product to be deleted.
Was this section helpful?
Anchor to ProductDeleteAsyncPayload returnsProductDeleteAsyncPayload returns
- Anchor to deleteProductIddelete•
Product Id The ID of the product that was requested to be deleted.
- •
The background job that will delete the product and its associated variants and media.
- Anchor to userErrorsuser•
Errors [ProductDelete non-nullUser Error!]! The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
mutation productDeleteAsync($productId: ID!) {
productDeleteAsync(productId: $productId) {
deleteProductId
job {
# Job fields
}
userErrors {
field
message
}
}
}
Input
{
"productId": "gid://shopify/<objectName>/10079785100"
}
{
"productId": "gid://shopify/<objectName>/10079785100"
}