curl --request POST \
--url https://api.loyaltylion.com/headless/2025-06/{site_id}/rewards/product_cart/redeem \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reward_id": 123,
"customer_merchant_id": "<string>",
"variant_id": "<string>",
"cart_id": "<string>"
}
'import requests
url = "https://api.loyaltylion.com/headless/2025-06/{site_id}/rewards/product_cart/redeem"
payload = {
"reward_id": 123,
"customer_merchant_id": "<string>",
"variant_id": "<string>",
"cart_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reward_id: 123,
customer_merchant_id: '<string>',
variant_id: '<string>',
cart_id: '<string>'
})
};
fetch('https://api.loyaltylion.com/headless/2025-06/{site_id}/rewards/product_cart/redeem', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.loyaltylion.com/headless/2025-06/{site_id}/rewards/product_cart/redeem",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reward_id' => 123,
'customer_merchant_id' => '<string>',
'variant_id' => '<string>',
'cart_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.loyaltylion.com/headless/2025-06/{site_id}/rewards/product_cart/redeem"
payload := strings.NewReader("{\n \"reward_id\": 123,\n \"customer_merchant_id\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"cart_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.loyaltylion.com/headless/2025-06/{site_id}/rewards/product_cart/redeem")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reward_id\": 123,\n \"customer_merchant_id\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"cart_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loyaltylion.com/headless/2025-06/{site_id}/rewards/product_cart/redeem")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reward_id\": 123,\n \"customer_merchant_id\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"cart_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"active_cart_redemption": {
"id": "<string>",
"claimed_reward_id": 123,
"expires_at": "<string>",
"product": {
"id": "<string>",
"handle": "<string>",
"title": "<string>",
"url": "<string>",
"image_url": "<string>",
"variant": {
"id": "<string>",
"title": "<string>",
"inventory_count": 123
}
},
"quantity": 123,
"cart_id": "<string>",
"cart_line": {
"kind": "<string>",
"merchandise_id": "gid://shopify/ProductVariant/1001",
"product_id": "gid://shopify/Product/100",
"quantity": 1,
"attributes": [
{
"key": "__lion_sfp_id",
"value": "19fdf4cb"
}
]
},
"current_cart_state": {
"in_cart": true,
"cart_requirements_met": true,
"cart_requirements_detail": {
"minimum_cart_total": {
"state": "<string>"
},
"minimum_line_item_quantity": {
"state": "<string>"
}
}
}
},
"claimed_reward": {
"id": 123,
"claimed_at": "<string>",
"reward_id": 123,
"title": "$5 voucher",
"source": {
"kind": "<string>",
"points_cost": 123
},
"auto_refund_at": "<string>",
"redeemable": {
"kind": "<string>",
"product": {
"id": "<string>",
"handle": "<string>",
"title": "<string>",
"url": "<string>",
"image_url": "<string>",
"variant": {
"id": "<string>",
"title": "<string>",
"inventory_count": 123
}
},
"quantity": 123,
"used_at": "<string>",
"cart_line_identifier": "<string>",
"active_cart_redemption": {
"id": "<string>",
"claimed_reward_id": 123,
"expires_at": "<string>",
"product": {
"id": "<string>",
"handle": "<string>",
"title": "<string>",
"url": "<string>",
"image_url": "<string>",
"variant": {
"id": "<string>",
"title": "<string>",
"inventory_count": 123
}
},
"quantity": 123,
"cart_id": "<string>",
"cart_line": {
"kind": "<string>",
"merchandise_id": "gid://shopify/ProductVariant/1001",
"product_id": "gid://shopify/Product/100",
"quantity": 1,
"attributes": [
{
"key": "__lion_sfp_id",
"value": "19fdf4cb"
}
]
},
"current_cart_state": {
"in_cart": true,
"cart_requirements_met": true,
"cart_requirements_detail": {
"minimum_cart_total": {
"state": "<string>"
},
"minimum_line_item_quantity": {
"state": "<string>"
}
}
}
}
}
},
"customer": {
"state": "<string>",
"id": 123,
"merchant_id": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"points_approved": 123,
"points_pending": 123,
"points_spent": 123,
"enrolled_at": "<string>",
"tier_membership": {
"tier_id": 123,
"started_at": "2025-01-01T12:00:00Z",
"expires_at": "2026-01-01T12:00:00Z",
"progress": {
"kind": "<string>",
"valid_until": "<string>",
"points_needed_for_renewal": 123,
"upgrade_tier_id": 123,
"points_needed_for_upgrade": 123,
"tier_points": {
"now": 123,
"at_expiration": 123
},
"forecasted_tier_id": 123
}
},
"birthday": {
"month": 6,
"day": 25
},
"next_birthday": "2025-06-25",
"claimed_rewards": [
{
"id": 123,
"claimed_at": "<string>",
"reward_id": 123,
"title": "$5 voucher",
"source": {
"kind": "<string>",
"points_cost": 123
},
"auto_refund_at": "<string>",
"redeemable": {
"kind": "<string>",
"code_last_characters": "<string>",
"initial_balance": {
"amount": 123,
"formatted": "<string>"
},
"current_balance": {
"amount": 123,
"formatted": "<string>"
},
"expires_at": "<string>"
}
}
],
"available_rewards": [
{
"id": 123,
"limit": {
"count": 123
},
"kind": "<string>",
"properties": {
"initial_balance": {
"amount": 123,
"formatted": "<string>"
}
},
"variant": {
"tier_id": 123,
"title": "$5 voucher",
"enabled": true,
"cost": {
"kind": "<string>",
"points": 123
},
"cost_text": "100 points"
},
"context": {
"can_redeem": {
"state": "<string>"
},
"last_claimed_at": "<string>",
"claim_count": 123,
"claim_limit": {
"state": "<string>"
}
}
}
],
"available_rules": [
{
"id": 123,
"limit": {
"count": 123
},
"kind": "<string>",
"variant": {
"tier_id": 123,
"title": "Make a purchase",
"enabled": true,
"result": {
"kind": "<string>",
"per_currency_unit": 1,
"points": 5
},
"result_short_text": "5 points per $1"
},
"context": {
"last_completed_at": "<string>",
"completion_count": 123,
"completion_limit": {
"state": "<string>"
}
}
}
],
"history": [
{
"kind": "<string>",
"label": "Join our program",
"date": "<string>",
"points": 1,
"points_text": "500 points",
"rule": {
"id": 123
},
"points_will_approve_at": "<string>",
"points_will_expire_at": "<string>"
}
],
"active_cart_redemptions": [
{
"id": "<string>",
"claimed_reward_id": 123,
"expires_at": "<string>",
"product": {
"id": "<string>",
"handle": "<string>",
"title": "<string>",
"url": "<string>",
"image_url": "<string>",
"variant": {
"id": "<string>",
"title": "<string>",
"inventory_count": 123
}
},
"quantity": 123,
"cart_id": "<string>",
"cart_line": {
"kind": "<string>",
"merchandise_id": "gid://shopify/ProductVariant/1001",
"product_id": "gid://shopify/Product/100",
"quantity": 1,
"attributes": [
{
"key": "__lion_sfp_id",
"value": "19fdf4cb"
}
]
},
"current_cart_state": {
"in_cart": true,
"cart_requirements_met": true,
"cart_requirements_detail": {
"minimum_cart_total": {
"state": "<string>"
},
"minimum_line_item_quantity": {
"state": "<string>"
}
}
}
}
],
"email_marketing_consent": {},
"sms_marketing_consent": {},
"receipt_upload_url": "<string>",
"referral_urls": {
"direct": "<string>",
"facebook": "<string>",
"twitter": "<string>",
"email": "<string>",
"whatsapp": "<string>",
"instagram": "<string>",
"device_share": "<string>"
}
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "rate_limited"
}
}Free Product
curl --request POST \
--url https://api.loyaltylion.com/headless/2025-06/{site_id}/rewards/product_cart/redeem \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reward_id": 123,
"customer_merchant_id": "<string>",
"variant_id": "<string>",
"cart_id": "<string>"
}
'import requests
url = "https://api.loyaltylion.com/headless/2025-06/{site_id}/rewards/product_cart/redeem"
payload = {
"reward_id": 123,
"customer_merchant_id": "<string>",
"variant_id": "<string>",
"cart_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reward_id: 123,
customer_merchant_id: '<string>',
variant_id: '<string>',
cart_id: '<string>'
})
};
fetch('https://api.loyaltylion.com/headless/2025-06/{site_id}/rewards/product_cart/redeem', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.loyaltylion.com/headless/2025-06/{site_id}/rewards/product_cart/redeem",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reward_id' => 123,
'customer_merchant_id' => '<string>',
'variant_id' => '<string>',
'cart_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.loyaltylion.com/headless/2025-06/{site_id}/rewards/product_cart/redeem"
payload := strings.NewReader("{\n \"reward_id\": 123,\n \"customer_merchant_id\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"cart_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.loyaltylion.com/headless/2025-06/{site_id}/rewards/product_cart/redeem")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reward_id\": 123,\n \"customer_merchant_id\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"cart_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loyaltylion.com/headless/2025-06/{site_id}/rewards/product_cart/redeem")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reward_id\": 123,\n \"customer_merchant_id\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"cart_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"active_cart_redemption": {
"id": "<string>",
"claimed_reward_id": 123,
"expires_at": "<string>",
"product": {
"id": "<string>",
"handle": "<string>",
"title": "<string>",
"url": "<string>",
"image_url": "<string>",
"variant": {
"id": "<string>",
"title": "<string>",
"inventory_count": 123
}
},
"quantity": 123,
"cart_id": "<string>",
"cart_line": {
"kind": "<string>",
"merchandise_id": "gid://shopify/ProductVariant/1001",
"product_id": "gid://shopify/Product/100",
"quantity": 1,
"attributes": [
{
"key": "__lion_sfp_id",
"value": "19fdf4cb"
}
]
},
"current_cart_state": {
"in_cart": true,
"cart_requirements_met": true,
"cart_requirements_detail": {
"minimum_cart_total": {
"state": "<string>"
},
"minimum_line_item_quantity": {
"state": "<string>"
}
}
}
},
"claimed_reward": {
"id": 123,
"claimed_at": "<string>",
"reward_id": 123,
"title": "$5 voucher",
"source": {
"kind": "<string>",
"points_cost": 123
},
"auto_refund_at": "<string>",
"redeemable": {
"kind": "<string>",
"product": {
"id": "<string>",
"handle": "<string>",
"title": "<string>",
"url": "<string>",
"image_url": "<string>",
"variant": {
"id": "<string>",
"title": "<string>",
"inventory_count": 123
}
},
"quantity": 123,
"used_at": "<string>",
"cart_line_identifier": "<string>",
"active_cart_redemption": {
"id": "<string>",
"claimed_reward_id": 123,
"expires_at": "<string>",
"product": {
"id": "<string>",
"handle": "<string>",
"title": "<string>",
"url": "<string>",
"image_url": "<string>",
"variant": {
"id": "<string>",
"title": "<string>",
"inventory_count": 123
}
},
"quantity": 123,
"cart_id": "<string>",
"cart_line": {
"kind": "<string>",
"merchandise_id": "gid://shopify/ProductVariant/1001",
"product_id": "gid://shopify/Product/100",
"quantity": 1,
"attributes": [
{
"key": "__lion_sfp_id",
"value": "19fdf4cb"
}
]
},
"current_cart_state": {
"in_cart": true,
"cart_requirements_met": true,
"cart_requirements_detail": {
"minimum_cart_total": {
"state": "<string>"
},
"minimum_line_item_quantity": {
"state": "<string>"
}
}
}
}
}
},
"customer": {
"state": "<string>",
"id": 123,
"merchant_id": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"points_approved": 123,
"points_pending": 123,
"points_spent": 123,
"enrolled_at": "<string>",
"tier_membership": {
"tier_id": 123,
"started_at": "2025-01-01T12:00:00Z",
"expires_at": "2026-01-01T12:00:00Z",
"progress": {
"kind": "<string>",
"valid_until": "<string>",
"points_needed_for_renewal": 123,
"upgrade_tier_id": 123,
"points_needed_for_upgrade": 123,
"tier_points": {
"now": 123,
"at_expiration": 123
},
"forecasted_tier_id": 123
}
},
"birthday": {
"month": 6,
"day": 25
},
"next_birthday": "2025-06-25",
"claimed_rewards": [
{
"id": 123,
"claimed_at": "<string>",
"reward_id": 123,
"title": "$5 voucher",
"source": {
"kind": "<string>",
"points_cost": 123
},
"auto_refund_at": "<string>",
"redeemable": {
"kind": "<string>",
"code_last_characters": "<string>",
"initial_balance": {
"amount": 123,
"formatted": "<string>"
},
"current_balance": {
"amount": 123,
"formatted": "<string>"
},
"expires_at": "<string>"
}
}
],
"available_rewards": [
{
"id": 123,
"limit": {
"count": 123
},
"kind": "<string>",
"properties": {
"initial_balance": {
"amount": 123,
"formatted": "<string>"
}
},
"variant": {
"tier_id": 123,
"title": "$5 voucher",
"enabled": true,
"cost": {
"kind": "<string>",
"points": 123
},
"cost_text": "100 points"
},
"context": {
"can_redeem": {
"state": "<string>"
},
"last_claimed_at": "<string>",
"claim_count": 123,
"claim_limit": {
"state": "<string>"
}
}
}
],
"available_rules": [
{
"id": 123,
"limit": {
"count": 123
},
"kind": "<string>",
"variant": {
"tier_id": 123,
"title": "Make a purchase",
"enabled": true,
"result": {
"kind": "<string>",
"per_currency_unit": 1,
"points": 5
},
"result_short_text": "5 points per $1"
},
"context": {
"last_completed_at": "<string>",
"completion_count": 123,
"completion_limit": {
"state": "<string>"
}
}
}
],
"history": [
{
"kind": "<string>",
"label": "Join our program",
"date": "<string>",
"points": 1,
"points_text": "500 points",
"rule": {
"id": 123
},
"points_will_approve_at": "<string>",
"points_will_expire_at": "<string>"
}
],
"active_cart_redemptions": [
{
"id": "<string>",
"claimed_reward_id": 123,
"expires_at": "<string>",
"product": {
"id": "<string>",
"handle": "<string>",
"title": "<string>",
"url": "<string>",
"image_url": "<string>",
"variant": {
"id": "<string>",
"title": "<string>",
"inventory_count": 123
}
},
"quantity": 123,
"cart_id": "<string>",
"cart_line": {
"kind": "<string>",
"merchandise_id": "gid://shopify/ProductVariant/1001",
"product_id": "gid://shopify/Product/100",
"quantity": 1,
"attributes": [
{
"key": "__lion_sfp_id",
"value": "19fdf4cb"
}
]
},
"current_cart_state": {
"in_cart": true,
"cart_requirements_met": true,
"cart_requirements_detail": {
"minimum_cart_total": {
"state": "<string>"
},
"minimum_line_item_quantity": {
"state": "<string>"
}
}
}
}
],
"email_marketing_consent": {},
"sms_marketing_consent": {},
"receipt_upload_url": "<string>",
"referral_urls": {
"direct": "<string>",
"facebook": "<string>",
"twitter": "<string>",
"email": "<string>",
"whatsapp": "<string>",
"instagram": "<string>",
"device_share": "<string>"
}
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "rate_limited"
}
}Choosing a variant
The reward may have been configured with multiple eligible product variants. If this is the case, you’ll need to let the customer choose which variant they want to redeem, and then pass that ID asvariant_id when performing the redemption.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
Body
Body
The LoyaltyLion ID of the reward to redeem
The product variant ID to redeem. If the product reward includes multiple variants, you should ask the customer which one they want to redeem
The ID of the current cart. The resulting cart redemption will be linked to this cart
1Response
201
Show child attributes
Show child attributes
The new claimed reward
Show child attributes
Show child attributes
The customer object, updated as of the reward redemption, i.e. their claimed_rewards will include the new redemption. This customer will always have state set to enrolled, as only enrolled customers can redeem rewards
Show child attributes
Show child attributes