Retrieve Earning Rules

Changed on

Lists the store's loyalty earning rules: the ways customers earn points, such as making a purchase, creating an account or completing a custom action.

get/loyalty/v3/stores/{store_id}/earning_rules

Request

  • Base URL
    https://developers.yotpo.com
  • URL
    https://developers.yotpo.com/loyalty/v3/stores/{store_id}/earning_rules
  • Auth
    API key in header X-Yotpo-Token

Path parameters

store_idstring required

Your Store ID (app key).

Query parameters

activeboolean

true returns only active rules, false only inactive ones. Leave it out to get all rules.

Response

The store's earning rules.

Example response

{
  "earning_rules": [
    {
      "id": 613408,
      "type": "CreateAccount",
      "title": "Create an account",
      "active": true,
      "reward_points": 100,
      "currency": "USD",
      "action_name": "newsletter_signup",
      "max_perks_per_user": 1,
      "include_audience_ids": "1"
    }
  ]
}

Changes