Newsletter
Unsubscribe from the newsletter
Changed onRemoves the newsletter subscription with the token from the unsubscribe link in the newsletter email (/subscription/{token}), as the storefront does. The answer is the same whether or not the token matched. No login is needed.
post/newsletters/unsubscribe
Request
- Base URLhttp://localhost:8000/api/shop
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
X-STOREFRONT-KEYstring required
Storefront API Key for authentication. Required for all shop/storefront API requests.
X-Localestring
Example:en
Locale code for localized data (e.g. "en", "fr", "ar"). Defaults to channel's default locale.
X-Channelstring
Example:default
Channel code (e.g. "default"). Defaults to the current channel.
X-Currencystring
Example:USD
Currency code (e.g. "USD", "EUR", "INR"). Defaults to channel's base currency.
Request body
Example request
{
"token": "6a1f0c9e2b7d4"
}Response
Unsubscribed, or no subscription used that token.
Changes
- info
endpoint added
- info