Skip to main content
Earning rules define the actions customers can take to earn points. Rules are categorized by type — purchase, social, engagement, birthday, anniversary, etc.

Attributes

FieldTypeDescription
namestringRule display name
descriptionstring | nullOptional description
actionstringThe action type (e.g. place_order, follow_on_instagram, signup)
categorystringRule category: purchase, social, engagement, birthday, anniversary, signup, referral
is_activebooleanWhether the rule is currently active
points_to_giveintegerBase points awarded when the rule is completed
customer_facing_labelstring | nullLabel shown to customers (e.g. “Earn 10 points per £1 spent”)
call_to_action_urlstring | nullURL for the action (e.g. Instagram profile link)
created_atstringISO 8601 timestamp
updated_atstringISO 8601 timestamp

Example

{
  "type": "earning_rule",
  "id": "rule_abc",
  "attributes": {
    "name": "Points for purchase",
    "description": null,
    "action": "place_order",
    "category": "purchase",
    "is_active": true,
    "points_to_give": 10,
    "customer_facing_label": "Earn 10 points per £1 spent",
    "call_to_action_url": null,
    "created_at": "2024-01-01T00:00:00.000Z",
    "updated_at": "2024-01-01T00:00:00.000Z"
  }
}