Enroll Customer
merchant_id, a 404 response will be returned. On a headless storefront running
an opt-in program, the normal sequence is Initialize
Session — which creates a customer who doesn’t exist yet and
leaves them as a guest — then this endpoint once they click join.
The enrolled property is true only when this request performed the
enrollment. If the customer was already a member it will be false and nothing
has changed, so treat it as “did I just enroll them”, not “are they enrolled” —
use customer.state for the latter. The customer property is the customer in
their post-enrollment state.
It’s safe to retry this endpoint, and concurrent calls (e.g. a double-clicked
button, or two open tabs) will only enroll the customer once.
If the customer is blocked from the program, they can’t be enrolled, and a 422
response will be returned with a customer_blocked code.
As with enrollment from a session, enrolling a customer may trigger program
rules, most notably a “join program” rule, if one is configured.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
Query Parameters
The sales channel from which this request is made
web, pos, mobile The language to use for the request. If not provided, the site's default language will be used
^[a-z]{2,3}$|^[a-z]{2,3}-[a-z0-9]{2,4}$ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used
Response
200
A boolean indicating whether this request enrolled the customer. If the customer was already enrolled, this will be false and no other state will have changed
The customer object in its post-enrollment state. If the customer was already enrolled, this represents their existing state