Headless API
Active Subscription Product
curl --request POST \
--url https://api.loyaltylion.com/headless/2025-06/{site_id}/rewards/active_subscription_product/redeem \
--header 'Content-Type: application/json' \
--data '{
"reward_id": 123,
"customer_merchant_id": "<string>",
"variant_id": "<string>",
"shipping_address": {
"kind": "recharge",
"id": 123
}
}'
{
"claimed_reward": {
"id": 123,
"claimed_at": "<string>",
"reward_id": 123,
"title": "$5 voucher",
"state": "approved",
"source": {
"kind": "points_redemption",
"points_cost": 123
},
"auto_refund_at": "<string>",
"redeemable": {
"usage_status": "not_used",
"kind": "active_subscription_product",
"product": {
"id": "<string>",
"title": "<string>",
"url": "<string>",
"image_url": "<string>",
"variant": {
"id": "<string>",
"title": "<string>"
}
},
"quantity": 123,
"subscription_details": {
"kind": "recharge",
"address_id": 123,
"onetime_id": 123,
"next_subscription_scheduled_at": "<string>"
}
}
},
"customer": {
"state": "enrolled",
"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": "points",
"valid_until": "<string>",
"points_needed_for_renewal": 123,
"upgrade_tier_id": 123,
"points_needed_for_upgrade": 123,
"tier_points": {
"now": 123,
"at_expiration": 123
}
}
},
"birthday": {
"month": 6,
"day": 25
},
"next_birthday": "2025-06-25",
"claimed_rewards": [
{
"id": 123,
"claimed_at": "<string>",
"reward_id": 123,
"title": "$5 voucher",
"state": "approved",
"source": {
"kind": "points_redemption",
"points_cost": 123
},
"redeemable": {
"usage_status": "not_used",
"kind": "gift_card",
"code_last_characters": "<string>",
"initial_balance": {
"amount": 9.9,
"formatted": "$9.90"
},
"current_balance": {
"amount": 9.9,
"formatted": "$9.90"
},
"expires_at": "<string>"
},
"auto_refund_at": "<string>"
}
],
"available_rewards": [
{
"id": 123,
"limit": {
"count": 123,
"interval": "day"
},
"kind": "gift_card",
"properties": {
"initial_balance": {
"amount": 9.9,
"formatted": "$9.90"
}
},
"variant": {
"tier_id": 123,
"title": "$5 voucher",
"enabled": true,
"cost": {
"kind": "fixed",
"points": 123
},
"cost_text": "100 points"
},
"context": {
"last_claimed_at": "<string>",
"claim_count": 123,
"claim_limit": {
"state": "no_limit"
}
}
}
],
"available_rules": [
{
"id": 123,
"limit": {
"count": 123,
"interval": "day"
},
"kind": "birthday",
"variant": {
"tier_id": 123,
"title": "Make a purchase",
"enabled": true,
"result": {
"kind": "points",
"per_currency_unit": 1,
"points": 5
},
"result_short_text": "5 points per $1"
},
"context": {
"last_completed_at": "<string>",
"completion_count": 123,
"completion_limit": {
"state": "no_limit"
}
}
}
],
"referral_urls": {
"direct": "<string>",
"facebook": "<string>",
"twitter": "<string>",
"email": "<string>",
"whatsapp": "<string>",
"device_share": "<string>"
}
}
}
The ReCharge integration must have been configured in LoyaltyLion before using this reward.
Use this endpoint to redeem an active subscription product reward, which will automatically add a free product to a customer’s upcoming subscription order.
If the customer does not currently have any active subscriptions, the redemption
will fail with an error.code
of no_active_subscriptions
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 as variant_id
when performing the redemption.
Choosing a subscription address
By default, the product will be included with the customer’s next upcoming subscription order.
Alternatively, you can ask the customer to select which address they want the free product to be sent to. You can use the ReCharge API to fetch a list of the customer’s active addresses and ask them to choose which one the free product should be sent to.
Path Parameters
Your LoyaltyLion Site ID
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
Body
Body
The body is of type object
.
Response
201
The response is of type object
.
curl --request POST \
--url https://api.loyaltylion.com/headless/2025-06/{site_id}/rewards/active_subscription_product/redeem \
--header 'Content-Type: application/json' \
--data '{
"reward_id": 123,
"customer_merchant_id": "<string>",
"variant_id": "<string>",
"shipping_address": {
"kind": "recharge",
"id": 123
}
}'
{
"claimed_reward": {
"id": 123,
"claimed_at": "<string>",
"reward_id": 123,
"title": "$5 voucher",
"state": "approved",
"source": {
"kind": "points_redemption",
"points_cost": 123
},
"auto_refund_at": "<string>",
"redeemable": {
"usage_status": "not_used",
"kind": "active_subscription_product",
"product": {
"id": "<string>",
"title": "<string>",
"url": "<string>",
"image_url": "<string>",
"variant": {
"id": "<string>",
"title": "<string>"
}
},
"quantity": 123,
"subscription_details": {
"kind": "recharge",
"address_id": 123,
"onetime_id": 123,
"next_subscription_scheduled_at": "<string>"
}
}
},
"customer": {
"state": "enrolled",
"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": "points",
"valid_until": "<string>",
"points_needed_for_renewal": 123,
"upgrade_tier_id": 123,
"points_needed_for_upgrade": 123,
"tier_points": {
"now": 123,
"at_expiration": 123
}
}
},
"birthday": {
"month": 6,
"day": 25
},
"next_birthday": "2025-06-25",
"claimed_rewards": [
{
"id": 123,
"claimed_at": "<string>",
"reward_id": 123,
"title": "$5 voucher",
"state": "approved",
"source": {
"kind": "points_redemption",
"points_cost": 123
},
"redeemable": {
"usage_status": "not_used",
"kind": "gift_card",
"code_last_characters": "<string>",
"initial_balance": {
"amount": 9.9,
"formatted": "$9.90"
},
"current_balance": {
"amount": 9.9,
"formatted": "$9.90"
},
"expires_at": "<string>"
},
"auto_refund_at": "<string>"
}
],
"available_rewards": [
{
"id": 123,
"limit": {
"count": 123,
"interval": "day"
},
"kind": "gift_card",
"properties": {
"initial_balance": {
"amount": 9.9,
"formatted": "$9.90"
}
},
"variant": {
"tier_id": 123,
"title": "$5 voucher",
"enabled": true,
"cost": {
"kind": "fixed",
"points": 123
},
"cost_text": "100 points"
},
"context": {
"last_claimed_at": "<string>",
"claim_count": 123,
"claim_limit": {
"state": "no_limit"
}
}
}
],
"available_rules": [
{
"id": 123,
"limit": {
"count": 123,
"interval": "day"
},
"kind": "birthday",
"variant": {
"tier_id": 123,
"title": "Make a purchase",
"enabled": true,
"result": {
"kind": "points",
"per_currency_unit": 1,
"points": 5
},
"result_short_text": "5 points per $1"
},
"context": {
"last_completed_at": "<string>",
"completion_count": 123,
"completion_limit": {
"state": "no_limit"
}
}
}
],
"referral_urls": {
"direct": "<string>",
"facebook": "<string>",
"twitter": "<string>",
"email": "<string>",
"whatsapp": "<string>",
"device_share": "<string>"
}
}
}