Skip to main content
An earning rule represents an action that can be completed by a customer to earn a reward. Common examples include earning points per dollar spent for placing an order, or earning points for following a social media account. Earning rules can be preloaded.
id
integer

Unique identifier for the earning rule.

Example:

739246764

name
string

The display name of the earning rule.

Example:

"Place an order"

imageUrl
string

The image of the earning rule.

Example:

"https://platform.smile.io/images/earning/order-online.svg"

actionText
string | null

The label for a clickable element (e.g. a call to action) that allows the customer to complete the rewardable action. When null, no clickable element should be displayed.

Example:

null

actionUrl
string | null

The destination URL for a clickable element (e.g. a call to action) that allows the customer to complete the rewardable action. When null, no clickable element should be displayed.

Example:

null

restrictedToVipTierIds
integer[]

A list of VIP tier IDs. When present, the earning rule only applies to customers who currently belong to at least one of the specified VIP tiers. If the array is empty, the earning rule applies to all VIP tiers.

reward
object

The reward that will be issued to the customer when the rewardable action is completed.

rewardValue
object

The value of the reward that will be issued to the customer when the rewardable action is completed.

earningLimit
object

A restriction on the number of times the rewardable action can be completed. If no limit exists, will be null.