updated
property
will be false
. Otherwise, they will be subscribed and the updated
property
will be true
.
In case it’s not possible to subscribe the customer, a 422
response will be
returned with a code
property indicating the reason.
If there are relevant rules applicable to the customer, such as a
newsletter_signup
rule, they will be triggered (unless they have already been
completed before), and any related actions will be included in the
actions
property in the response, such as points or rewards that were awarded.Authorizations
An API key linked to a Program in LoyaltyLion, with a set of permissions (scopes). API keys can be created manually, or acquired through an OAuth2 flow. The API key should be provided as a Bearer
token in the Authorization
header
Path Parameters
Your LoyaltyLion Site ID
The ID of the customer in your platform or ecommerce store.
For Shopify stores, you can pass either a GID or a regular numeric ID. If you do pass a GID you must encode it as a URL parameter, e.g. gid%3A%2F%2Fshopify%2FCustomer%2F1001
This must be a customer whose state is enrolled
1
Query Parameters
The sales channel from which this request is made. Must be provided as this query parameter, or the X-LoyaltyLion-Channel
header
web
, pos
, mobile
Response
200
A boolean indicating whether the email marketing consent was updated. If the customer was already subscribed, this will be false
The customer's email marketing consent as of this subscription request. This will always be subscribed
, as the request will fail unless we are able to subscribe the customer to email marketing
The customer object, updated as of the email marketing subscription, i.e. their email_marketing_consent
will reflect the change. If any rules were triggered as a result of the email marketing subscription, these changes will be reflected too, e.g. new history items, additional points, or new rewards
A list of actions that were triggered as a result of the email marketing subscription. For example, if there was an applicable "subscribe to newsletter" rule when the customer subscribed, this will include the action that was triggered by the rule