Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Unique campaign ID or name.
"camp_rRsfatlwN7unSeUIJDCYedal"
Unique identifier of an earning rule, assigned by Voucherify.
"ern_CFuv1O0IDl8Jgph0ojhMu8bH"
Response
Returns an earning rule object with the active
parameter set to false
.
Response body schema for POST v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/disable
Assigned by the Voucherify API, identifies the earning rule object.
Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format.
- Define fixed amount of points
- Order Amount
- Order Total Amount
- Order Metadata
- Order Items Quantity
- Order Items Amount
- Order Items Subtotal Amount
- Define amount of points proportional to customer metadata
- Earning Rule Proportional Custom Event
Contains the custom earning rule name and parent campaign.
The type of the object represented by JSON. Default is earning_rule.
earning_rule
For internal use by Voucherify.
The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format.
Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format.
A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date.
Defines the event which triggers the earning rule to add points to a loyalty card.
"
order.paid,
customer.segment.entered,
customer.loyalty.tier.upgraded,
customer.loyalty.tier.downgraded,
customer.loyalty.tier.prolonged,
customer.loyalty.tier.joined,
customer.loyalty.tier.left"
Contains details about the custom event.
Contains the ID of a customer segment. Required for the customer.segment.entered
option in the event.
Defines the tier associated with the earning rule definition.
Defines the configuration for pending points. Pending points can be used only with the order.paid
event.
Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. The earning rule is inactive before this date. If you do not define the start date for an earning rule, it will inherit the campaign start date by default.
Expiration date defines when the earning rule expires. Expiration timestamp is presented in the ISO 8601 format. The earning rule is inactive after this date. If you do not define the expiration date for an earning rule, it will inherit the campaign expiration date by default.
Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.start_date
required when including the validity_timeframe
.
Integer array corresponding to the particular days of the week in which the voucher is valid.
0
Sunday1
Monday2
Tuesday3
Wednesday4
Thursday5
Friday6
Saturday
Determines the hours of validity, e.g. to create a happy hours scenario.
Defines the loyalty point expiration rule. This expiration rule applies only to this earning rule and supersedes expiration_rules
defined in the voucher.loyalty_card
object.