Skip to main content
POST
/
headless
/
2025-06
/
{site_id}
/
rewards
/
product_cart
/
redeem
cURL
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>"
}'
{
  "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",
    "state": "approved",
    "source": {
      "kind": "<string>",
      "points_cost": 123
    },
    "auto_refund_at": "<string>",
    "redeemable": {
      "usage_status": "not_used",
      "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
        }
      }
    },
    "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": "<string>",
          "points_cost": 123
        },
        "redeemable": {
          "usage_status": "not_used",
          "kind": "<string>",
          "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": "<string>",
        "properties": {
          "initial_balance": {
            "amount": 9.9,
            "formatted": "$9.90"
          }
        },
        "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,
          "interval": "day"
        },
        "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,
          "kind": "birthday"
        },
        "points_will_approve_at": "<string>",
        "points_will_expire_at": "<string>",
        "state": "pending"
      }
    ],
    "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": "<any>"
            },
            "minimum_line_item_quantity": {
              "state": "<any>"
            }
          }
        }
      }
    ],
    "email_marketing_consent": {
      "state": "subscribed"
    },
    "sms_marketing_consent": {
      "state": "subscribed"
    },
    "referral_urls": {
      "direct": "<string>",
      "facebook": "<string>",
      "twitter": "<string>",
      "email": "<string>",
      "whatsapp": "<string>",
      "device_share": "<string>"
    }
  }
}
Free products can only be redeemed on Shopify, and must use Shopify Functions. If you are still using Shopify Scripts for free products, get in touch and we’ll switch you over to Shopify Functions
Use this endpoint to redeem a free product reward, which can then be added to the customer’s cart and checked out along with their other items. Redeeming free products requires the use of the Storefront API to add the free product to the customer’s cart, at which point a LoyaltyLion Shopify Function will apply the discount. If you’re using Shopify Hydrogen, see our implementation guide for free product rewards.

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.

Authorizations

Authorization
string
header
required

Path Parameters

site_id
number
required

Query Parameters

channel
enum<string>
Available options:
web,
pos,
mobile

Body

application/json
reward_id
number
required
customer_merchant_id
string
required
variant_id
string
required
cart_id
string
required
Minimum length: 1

Response

active_cart_redemption
object
required
claimed_reward
object
required
customer
object
required