Rewards

Rewards API is currently in beta testing and available to our Tech Partners. If you’d like to get it enabled for your store, contact us at support@loyaltylion.com and include your specific use case.

A Reward resource represents something that customers may spend their points on.

FieldTypeDescription
idintegerUnique ID of the reward in LoyaltyLion
kindstringThe kind of reward
titlestringThe display title of the reward, in your site’s primary language
descriptionstring | nullOptional extra reward description
contentobjectAdditional content that’s needed when working with or rendering the reward. This may include things like image urls, fulfilment_instructions, or other strings you may want to render or utilize in some way
point_costintegerThe cost of redeeming the reward in points
methodstringHow the reward is redeemed; one of voucher, store_fulfilment or gift_card
discount_typestringThe monetary effect of the discount. One of flat (reduce target price by discount_amount currency units), percentage (reduce target price by discount_amount percent), custom (implementation-defined)
discount_amountinteger | nullWhen the reward has a specific monetary or percentage value, that value as a unit-less number. So if the discount amount is £5 or 5%, this returns 5
minimum_spendinteger | nullThe amount a customer must spend to be able to use the reward. A minimum_spend of 30 returns 30
usage_limitintegerThe number of times the reward may be used once claimed, typically 1
min_redemption_amountintegerThe minimum multiplier of the reward that can be claimed at once
max_redemption_amountintegerThe maximum multiplier of the reward that can be claimed at once
max_free_shippinginteger | nullThe maximum amount that can be deducted from shipping by a free shipping reward. If null then there is no limit
site_idintegerThe site ID the reward is associated with
sort_keyinteger1-based position of the reward in the loyalty program’s list of rewards
target_siteobjectA reward site describing where a reward may be used
order_typestringWhat orders the reward applies to; one of all, one_time or subscription
target_typestringWhat the reward applies to; one of all, collection, custom, product or shipping
target_collectionsarrayAn array of target collections
target_productsarrayAn array of target products
session_optionsobject | nullA reward session options object (see below)
expiry_optionsobjectA reward expiry options object (see below)

Reward site

A Site indicates the site (ecommerce store, POS location, blog) that this reward is usable on.

If the id field doesn’t match the parent reward.site_id, that indicates that this is a cross-store reward.

FieldTypeDescription
idintegerThe ID of the target site
namestringThe name of the target site
urlstringThe URL linking to the target site

 Target collection

A Target Collection represents a product collection that this reward is applicable to.

FieldTypeDescription
idintegerThe ID of the target collection
urlstringThe URL linking to the target collection
restriction_textstringText shown when the reward isn’t usable due to items not being in the correct collection

Target product

A Target Product represents a product that this reward is applicable to.

FieldTypeDescription
idintegerThe ID of the target product
variant_idintegerThe variant ID of the target product
skustringThe SKU of the target product
urlstringThe URL linking to the target product
image_urlstringThe URL linking to the image of the target product
sort_keyintegerThe key used to sort the target product
titlestringThe title of the target product

Reward session options

Session options, when present, describe any limits on how many of this reward may be claimed within a particular checkout session.

When null, the reward has no claim limit per session (though it may still have an overall usage limit).

FieldTypeDescription
kindstringThe kind of session the reward links to, one of custom, cart or checkout
session_limitinteger | nullThe number of times the reward should be claimed in one session, typically 1. Please note, this limit is not enforced by LoyaltyLion. Enforcing this limit is the responsibility of the API consumer.

Reward expiry options

Expiry options describe how the reward will expire. Rewards that do not expire are denoted by kind does_not_expire.

FieldTypeDescription
kindstringThe kind of expiry option for the reward, one of does_not_expire or duration
secondsnumber | nullThe number of seconds, after being claimed, that the reward will expire

GET /v2/customers/:merchant_id/available_rewards

Returns a list of the rewards currently available to this customer.

Rewards are available to a customer for the purposes of this API if:

  • The reward is enabled
  • If a customer is in a loyalty tier, the reward is available on that tier
  • The reward is supported based on your platform

For seamless product rewards, these additional conditions apply:

The free shipping reward is currently unsupported on this endpoint.

PlatformSupported rewards
Shopifyone-off discount rewards (e.g $5 off, 10% off, including new subscription rewards), custom rewards, checkout rewards, free product vouchers, seamless free products
Adobe Commerce (formerly Magento)one-off discount rewards, custom rewards, free product vouchers
BigCommerceone-off discount rewards, custom rewards, free product vouchers
Customcustom rewards

Available rewards include those that cost more points than the customer currently has available.

The :merchant_id provided should match your own internal ID for the customer in your database.

Request

This request takes no parameters.

Response

The endpoint returns a list of rewards.

Example

curl -X GET \
  --url 'https://api.loyaltylion.com/v2/customers/1001/available_rewards' \
  --header 'Content-Type: application/json'