Earning Rules
Create, retrieve, update, delete, and list the rules that govern how customers earn loyalty points.
An earning rule defines how customers accumulate points in response to platform events. The most common rule awards one point per unit of currency spent when a payment succeeds.
Illustrative content. Hand-authored to demonstrate the Standard/Advanced pattern; the production page will be generated from the VINR OpenAPI spec (roadmap item #1). Field names are representative.
The earning rule objectAsk
idstringUnique identifier for the earning rule, e.g. er_2Gb7wJ.
namestringHuman-readable label for the rule, e.g. 1 point per €1 spent.
eventstringThe platform event that triggers point accrual, e.g. payment.succeeded.
points_per_unitintegerNumber of points awarded for each qualifying unit of the triggering event.
unit_valueintegerThe size of one unit in the smallest currency denomination (e.g. 100 = 100 cents = €1).
Points are awarded in proportion to amount / unit_value.
activebooleanWhether the rule is currently applied when the trigger event fires.
createdintegerUnix timestamp of when the earning rule was created.
Create an earning ruleAsk
Define a new rule. Rules take effect immediately for subsequent trigger events once active is set
to true.
Retrieve an earning ruleAsk
Fetch an earning rule by its ID.
Update an earning ruleAsk
Adjust the earning rate or pause a rule by setting active: false.
Delete an earning ruleAsk
Permanently deletes an earning rule. Existing points transactions created by this rule are not affected.
List earning rulesAsk
Returns a paginated list of earning rules. Pass active=true to return only currently live rules.
| Parameter | Type | Description |
|---|---|---|
active | boolean | Filter by active status. Omit to return all rules. |
limit | integer | Number of results to return. Default 10, max 100. |
Related eventsAsk
earning_rule.created, earning_rule.updated, and earning_rule.deleted. See Events.