data-src=../../../../includes/saas-only.md

unsubscribeProductAlertPriceAll mutation

The unsubscribeProductAlertPriceAll mutation removes all price drop alert subscriptions for the logged-in customer across the current website. After calling this mutation, the customer no longer receives any price alert email notifications.

This mutation requires a valid customer authentication token.

Syntax

mutation {
  unsubscribeProductAlertPriceAll: ProductAlertSubscriptionResult
}

Reference

The unsubscribeProductAlertPriceAll reference provides detailed information about the types and fields defined in this mutation.

Example usage

The following example removes all price alert subscriptions for the logged-in customer.

Request:

mutation {
  unsubscribeProductAlertPriceAll {
    success
    message
  }
}

Response:

{
  "data": {
    "unsubscribeProductAlertPriceAll": {
      "success": true,
      "message": "You will no longer receive price alerts."
    }
  }
}

Errors

Error
Description
Customer is not logged in.
The request does not include a valid customer authentication token.
Unable to unsubscribe to all price alerts
An internal error occurred while removing the subscriptions.