Skip to content

Latest commit

 

History

History
29 lines (17 loc) · 2.13 KB

File metadata and controls

29 lines (17 loc) · 2.13 KB

LoyaltiesEarningRulesUpdateRequestBodyLoyaltyOrderItemsAmount

Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.

Properties

Name Type Description
every Integer Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000.
points Integer Number of points to be awarded, i.e. how many points to be added to the loyalty card.
pointsFormula String Formula used to dynamically calculate the rewarded points.
_object ObjectEnum Type of object which will be covered by the earning rule. This is required together with `id`. Can be replaced by the `applicable_to` array. In response, the value of the first object is returned even if `applicable_to` array was used.
id String Unique ID of the resource assigned by Voucherify. This is required together with `object`. Can be replaced by the `applicable_to` array. In response, the value of the first object is returned even if `applicable_to` array was used. Values are, for example, `pc_75U0dHlr7u75BJodrW1AE3t6` for product collection, `prod_0bae32322150fd0546` for a product, or `sku_0b7d7dfb090be5c619` for a SKU.
applicableTo List<LoyaltiesEarningRulesUpdateRequestBodyLoyaltyOrderItemsAmountApplicableToItem> Defines products, SKUs, or product collections covered by the earning rule. Can be replaced by `object` and `id` to define only one object.

Enum: ObjectEnum

Name Value
PRODUCTS_COLLECTION "products_collection"
PRODUCT "product"
SKU "sku"