---
updatedAt: 2026-10-29T11:54:48.000Z
agentTools:
  projectIndex: https://docs.yotpo.com/llms.txt
---

# Retrieve Earning Rules

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.

Use a rule's `action_name` (on `CustomAction` rules) with [Record Loyalty Customer Action](https://docs.yotpo.com/reference/record-loyalty-customer-action) to reward a customer for that action.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "App partners API",
    "description": "Endpoints for apps that Yotpo merchants install. The app-level webhook is defined separately, in webhooks.json.",
    "version": "2"
  },
  "servers": [
    {
      "url": "https://developers.yotpo.com"
    }
  ],
  "security": [
    {
      "X-Yotpo-Token": []
    }
  ],
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "paths": {
    "/loyalty/v3/stores/{store_id}/earning_rules": {
      "get": {
        "summary": "Retrieve Earning Rules",
        "description": "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.",
        "operationId": "retrieve-earning-rules",
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Your Store ID (app key)."
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "`true` returns only active rules, `false` only inactive ones. Leave it out to get all rules.",
            "example": true
          }
        ],
        "responses": {
          "200": {
            "description": "The store's earning rules.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "earning_rules": [
                        {
                          "id": 613408,
                          "reward_points": 100,
                          "active": true,
                          "type": "CreateAccount",
                          "title": "Create an account",
                          "currency": "USD",
                          "restricted_to_customer_tags": null,
                          "restricted_to_product_tags": null,
                          "restricted_to_order_count": null,
                          "max_perks_total": null,
                          "restricted_to_order_tags": null,
                          "max_perks_per_user": 1,
                          "minutes_between_perks": null,
                          "restricted_to_tiers": [],
                          "restricted_to_product_ids": null,
                          "restricted_to_product_types": null,
                          "exclude_audience_ids": null,
                          "include_audience_ids": "1",
                          "archived": false,
                          "expired": false
                        },
                        {
                          "id": 1571335,
                          "reward_points": 25,
                          "active": true,
                          "type": "CustomAction",
                          "title": "Complete Action",
                          "currency": "USD",
                          "restricted_to_customer_tags": null,
                          "restricted_to_product_tags": null,
                          "restricted_to_order_count": null,
                          "max_perks_total": null,
                          "restricted_to_order_tags": null,
                          "max_perks_per_user": null,
                          "minutes_between_perks": null,
                          "restricted_to_tiers": [],
                          "restricted_to_product_ids": null,
                          "restricted_to_product_types": null,
                          "exclude_audience_ids": null,
                          "include_audience_ids": "1",
                          "archived": false,
                          "expired": false,
                          "action_name": "newsletter_signup"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "earning_rules": {
                      "type": "array",
                      "description": "The earning rules.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The earning rule's ID.",
                            "example": 613408
                          },
                          "type": {
                            "type": "string",
                            "description": "The earning rule type, such as `PointsForPurchases`, `CreateAccount`, `CustomAction`, `YotpoReview`, `ReferralLinkClick`, `NewsletterSignup` or `TransactionBased`.",
                            "example": "CreateAccount"
                          },
                          "title": {
                            "type": "string",
                            "description": "The rule's headline shown to customers. Can be an empty string.",
                            "example": "Create an account"
                          },
                          "active": {
                            "type": "boolean",
                            "description": "Whether the rule is active. Filter with the `active` query parameter.",
                            "example": true
                          },
                          "reward_points": {
                            "type": "integer",
                            "description": "Points configured for the rule. What they mean depends on the rule `type`, and some rules have `0`.",
                            "example": 100
                          },
                          "currency": {
                            "type": "string",
                            "description": "The store's currency code, such as `USD`.",
                            "example": "USD"
                          },
                          "action_name": {
                            "type": "string",
                            "description": "For `CustomAction` rules only: the `action_name` to send to [Record Loyalty Customer Action](ref:record-loyalty-customer-action). Other rule types leave this field out.",
                            "example": "newsletter_signup"
                          },
                          "max_perks_per_user": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Maximum number of times one customer can earn this rule. `null` if there's no limit.",
                            "example": 1
                          },
                          "max_perks_total": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Maximum number of times the rule can be earned across all customers. `null` if there's no limit."
                          },
                          "minutes_between_perks": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Minimum minutes between two rewards for the same customer. `null` if there's no wait."
                          },
                          "restricted_to_tiers": {
                            "type": "array",
                            "description": "VIP tiers the rule is limited to. Empty if it isn't limited to any tier.",
                            "items": {
                              "description": "A VIP tier. Empty in every response we tested, so the item shape isn't documented."
                            }
                          },
                          "restricted_to_customer_tags": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Customer tags the rule is limited to. `null` or an empty string if it isn't limited."
                          },
                          "restricted_to_order_tags": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Order tags the rule is limited to. `null` if it isn't limited."
                          },
                          "restricted_to_order_count": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Order count the rule is limited to. `null` if it isn't limited."
                          },
                          "restricted_to_product_tags": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Product tags the rule is limited to. `null` if it isn't limited."
                          },
                          "restricted_to_product_ids": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Product IDs the rule is limited to. `null` if it isn't limited."
                          },
                          "restricted_to_product_types": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Product types the rule is limited to. `null` if it isn't limited."
                          },
                          "include_audience_ids": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Customer segments the rule is limited to (segment IDs).",
                            "example": "1"
                          },
                          "exclude_audience_ids": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Customer segments excluded from the rule (segment IDs). `null` if none."
                          },
                          "archived": {
                            "type": "boolean",
                            "description": "Whether the rule is archived.",
                            "example": false
                          },
                          "expired": {
                            "type": "boolean",
                            "description": "Whether the rule has expired.",
                            "example": false
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid access token. Send a valid token in the `X-Yotpo-Token` header.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing token": {
                    "summary": "No token sent (or sent as Authorization: Bearer)",
                    "value": {
                      "error": "invalid_request",
                      "error_description": "The access token is missing"
                    }
                  },
                  "Invalid token": {
                    "summary": "Token unknown, revoked or for another app",
                    "value": {
                      "error": "invalid_token",
                      "error_description": "The access token is invalid or has expired"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "OAuth error code: `invalid_request` when no token was sent, `invalid_token` when the token is unknown, revoked or expired.",
                      "enum": [
                        "invalid_request",
                        "invalid_token"
                      ]
                    },
                    "error_description": {
                      "type": "string",
                      "description": "Human-readable reason for the error."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The token isn't for this store: the `store_id` in the path belongs to a store your app isn't installed on.",
            "content": {
              "application/json": {
                "examples": {
                  "Another store": {
                    "value": {
                      "message": "Forbidden"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Always `Forbidden`."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "securitySchemes": {
      "X-Yotpo-Token": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Yotpo-Token",
        "description": "Send your app's access token for the merchant's store in the `X-Yotpo-Token` header of every request. To get a token, see [Generate Access Token](ref:generate-a-token). The API also reads the token from an `access_token` query parameter, but that isn't recommended: URLs end up in server and proxy logs. `Authorization: Bearer` is not supported."
      }
    }
  }
}
```

# Sibling pages

* [Adjust Loyalty Customer Points](https://docs.yotpo.com/reference/adjust-loyalty-customer-points.md)
* [Record Loyalty Customer Action](https://docs.yotpo.com/reference/record-loyalty-customer-action.md)