Skip to main content
The Newsletter API is used to integrate newsletter sign-ups and sign-offs for the WEBSALE newsletter module in the storefront. It can be used for both logged-in customers and anonymous visitors and represents the usual opt-in/opt-out processes in the frontend.

Supported methods

List of all supported methods.

Methods for the newsletter

These methods control the complete newsletter management in the shop: They read out the configured target groups and enable the creation, confirmation (double opt-in), and termination of newsletter subscriptions — optionally per target group. Additionally, email addresses can be permanently excluded from sending via a blacklist, which is also secured via a confirmation link. Validations and typical error cases (e.g. missing required fields, invalid target groups, or incorrect or expired opt-in tokens) are reported back via defined error codes.

GET newsletter/targetGroups

The following call returns all newsletter target groups configured in the shop. It can be used to display selectable target groups in the newsletter sign-up form or on profile/settings pages.

Parameter overview

Example response

POST newsletter/subscribe

The following call creates a newsletter subscription for an email address and optionally assigns target groups. If the double opt-in procedure is enabled, a confirmation email is sent first. The subscription is only active after confirmation. It can be used for sign-up forms with the selection of target groups and the entry of additional fields. Example call that creates a newsletter subscription for the customer account with the email address maria.musterfrau@example.com and the newsletter groups 1 and 2. First and last name are passed along as optional additional information

Example request

Parameter overview

Error codes

POST newsletter/subscribeConfirm

The following call can be used to confirm a newsletter subscription previously started via “Newsletter/Subscribe” by opt-in token. This activates the subscription for the specified email address. It can be used for handling in the double opt-in email. Example call that confirms the newsletter subscription using the confirmation code from the email

Example request

Parameter overview

Error codes

POST newsletter/unsubscribe

The following call can be used to unsubscribe from the newsletter — if desired, only from certain target groups. If the double opt-in procedure is enabled, an additional confirmation email may be required. This can be used, for example, for an unsubscribe form or an unsubscribe link. Example call that unsubscribes the customer account with the email maria.musterfrau@example.com from the newsletter target groups 1 and 2

Example request

Parameter overview

Error codes

POST newsletter/unsubscribeConfirm

The following call can be used to confirm and finally complete a newsletter unsubscription that took place via opt-in token from the confirmation email. It can be used for handling the unsubscription email. Example call that terminates the newsletter subscription using the confirmation code from the email

Example request

Parameter overview

Error codes

POST newsletter/blacklist

The following call puts an email address on the blocklist so that no more newsletters are sent to this address. The block can be lifted again by re-subscribing. This can be used, for example, for opt-out functions such as “no longer receive any newsletters”. Example call that puts the email address maria.musterfrau@websale.de on the blocklist

Example request

Parameter overview

Error codes

POST newsletter/blacklistConfirm

The following call confirms the previously requested block (adding to the blocklist) of an email address by opt-in token from the confirmation email. Used to complete the blocklist process after clicking the link from the email. Example call that uses the confirmation code from the email to add the email address to the blocklist

Example request

Parameter overview

Error codes