Claim Referee Incentive
ll_ref_id query parameter, which is how
our referral links identify who referred them.
The referral_id is the value of that ll_ref_id parameter. The ip_address
must be the referred shopper’s own address — the one that reached your server,
never your server’s — as it powers referral fraud detection.
Pass referee_email whenever you know the shopper’s email. It binds the
voucher to them, and it’s what allows self-referrals and referrals of existing
program members to be rejected (invalid_referee). If the referrer isn’t an
enrolled member, the email is required, and you’ll receive a
referee_email_required error until you supply it — collect the shopper’s
email and retry.
It’s safe to retry: claiming again with the same referral and referee returns
the same code rather than issuing a new one.
To present the offer alongside the code (“Get 10% off your first order, up to
$30”), use the referee_incentive object from Get
Configuration, which carries localized
display text and the structured discount details.
When the shopper later places their first order using the voucher, the
referral completes automatically — the shopper is linked to their referrer and
your referral rule triggers. See the referrals
guide for the end-to-end flow.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
Body
Body
The referral the shopper arrived with. This is the value of the ll_ref_id query parameter on the URL the referral link redirects to
1"jRq0X"
The IP address of the shopper claiming the incentive — the one that reached your server, not your server's own. It is what detects referral fraud when the program restricts referrals to distinct IP addresses, and it is the bucket we would rate-limit an individual shopper on
Send a single address. A forwarded-for list is rejected: take the client entry from it yourself
^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"203.0.113.42"
The user agent of the shopper claiming the incentive, recorded alongside the referral for fraud analysis. Send null where the caller genuinely has none, such as a native mobile app
The email address of the shopper claiming the incentive. Pass it whenever you know it: it binds the voucher to that shopper, and it is what lets us reject a shopper who is referring themselves or who is already a member of the program
It is only required when the referrer is not enrolled in the program. A request that needs it and omits it is rejected with referee_email_required, so you can retry with the address once you have collected it
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$"referee@example.com"
Response
The incentive was claimed. Repeating the request with the same referral_id and referee_email returns the same code. kind discriminates this from any further success outcome added later — switch on it rather than assuming a code is present
The incentive was claimed. Repeating the request with the same referral_id and referee_email returns the same code. kind discriminates this from any further success outcome added later — switch on it rather than assuming a code is present