Create Cart Promotions

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

This endpoint allows you to create a new cart promotion. Cart promotions can be configured with different conditions, actions, and restrictions. You can define conditions based on cart subtotal, item counts, specific products, and tender types.

Example request

curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmRvY2RlbW86MmQ1OTNZTk=' \
--header 'Cookie: _cfuvid=YpGNgiRLeLVURs3BaON5u5yvlKJ031kZrvv7e3ePAEc-1759774707339-0.0.1.1-604800000' \
--data '{
  "name": "Combo Product promotion ",
  "type": "CUSTOMER",
  "messageLabel": "Get 15% off combo products",
  "active": true,
  "priority": 0,
  "isStackable": false,
  "startDate": 1759363200000,
  "endDate": 1790985600000,
  "campaignId": "286038",
  "condition": {
    "type": "COMBO_PRODUCT",
    "comboProductCondition": {
      "productConditions": [
        {
          "kpi": "QUANTITY",
          "operator": "GREATER_THAN_OR_EQUAL",
          "value": "1.000000",
          "criteriaList": [
            {
              "entity": "SKU",
              "operator": "IN",
              "values": [
                "SKU001",
                "SKU002"
              ]
            }
          ]
        },
        {
          "kpi": "QUANTITY",
          "operator": "GREATER_THAN_OR_EQUAL",
          "value": "1.000000",
          "criteriaList": [
            {
              "entity": "BRAND",
              "operator": "IN",
              "values": [
                "BRAND_A"
              ]
            }
          ]
        }
      ]
    }
  },
  "action": {
    "type": "PRODUCT_BASED",
    "productBasedAction": {
      "type": "PERCENTAGE",
      "value": "15.000000",
      "productBasedCondition": {
        "type": "COMBO_PRODUCT",
        "comboProductCondition": {
          "productConditions": [
            {
              "kpi": "QUANTITY",
              "operator": "GREATER_THAN_OR_EQUAL",
              "value": "1.000000",
              "criteriaList": [
                {
                  "entity": "SKU",
                  "operator": "IN",
                  "values": [
                    "SKU001",
                    "SKU002"
                  ]
                }
              ]
            },
            {
              "kpi": "QUANTITY",
              "operator": "GREATER_THAN_OR_EQUAL",
              "value": "1.000000",
              "criteriaList": [
                {
                  "entity": "BRAND",
                  "operator": "IN",
                  "values": [
                    "BRAND_A"
                  ]
                }
              ]
            }
          ]
        }
      }
    }
  },
  "customerActivationRequired": true,
  "maxIssuancePerCustomer": 1,
  "promotionRestrictions": {
    "Promotion": [
      {
        "kpi": "REDEMPTION",
        "limit": "5000.000000"
      }
    ],
    "Customer": [
      {
        "kpi": "TRANSACTION",
        "frequency": "WEEKS",
        "minTimeBetweenRepeat": 604800000,
        "limit": "2.000000"
      },
      {
        "kpi": "DISCOUNT",
        "limit": "200.000000"
      },
      {
        "kpi": "REDEMPTION",
        "frequency": "DAYS",
        "minTimeBetweenRepeat": 86400000,
        "limit": "3.000000"
      }
    ],
    "Cart": [
      {
        "kpi": "DISCOUNT",
        "limit": "50.000000"
      }
    ]
  },
  "customFieldValues": {
    "Age": 25
  }
}'

API Quick Reference

{{https://eu.api.capillarytech.com/api_gateway/v1/promotions}}
   └─ {{promotions}}
      ├─ {{createCartPromotion}}({{CartPromotionRequest}}) -> {{CartPromotionResponse}}
      ├─ {{CartPromotionRequest}}
      │   ├─ {{Name}} (string)
      │   ├─ {{Type}} (enum)
      │   ├─ {{MessageLabel}} (string)
      │   ├─ {{Active}} (boolean)
      │   ├─ {{Priority}} (integer)
      │   ├─ {{IsStackable}} (boolean)
      │   ├─ {{StartDate}} (long)
      │   ├─ {{EndDate}} (long)
      │   ├─ {{CampaignId}} (string)
      │   ├─ {{Mode}} (enum)
      │   ├─ {{Condition}}
      │   │   ├─ {{ConditionType}} (enum)
      │   │   ├─ {{CartCondition}}
      │   │   │   ├─ {{CartKpi}} (enum)
      │   │   │   ├─ {{CartOperator}} (enum)
      │   │   │   └─ {{CartValue}} (number)
      │   │   ├─ {{TenderCondition}}
      │   │   │   └─ {{TenderModes}} []
      │   │   │       ├─ {{TenderType}} (string)
      │   │   │       ├─ {{TenderIdentifiers}} []
      │   │   │       └─ {{NestedCondition}} (Object)
      │   │   ├─ {{ProductCondition}}
      │   │   │   ├─ {{CriteriaList}} []
      │   │   │   │   ├─ {{Entity}} (string)
      │   │   │   │   ├─ {{EntityOperator}} (enum)
      │   │   │   │   └─ {{EntityValues}} []
      │   │   │   ├─ {{ProductKpi}} (enum)
      │   │   │   ├─ {{ProductOperator}} (enum)
      │   │   │   └─ {{ProductValue}} (string)
      │   │   ├─ {{ComboProductCondition}}
      │   │   │   └─ {{ProductConditions}} []
      │   │   │       ├─ {{ComboCriteriaList}} []
      │   │   │       ├─ {{ComboKpi}} (enum)
      │   │   │       ├─ {{ComboOperator}} (enum)
      │   │   │       └─ {{ComboValue}} (string)
      │   │   ├─ {{PaymentModeScopeConditionRO}}
      │   │   │   ├─ {{PaymentModeConditionRO}}
      │   │   │   │   └─ {{PaymentModeSelectionCriteriaRO}}
      │   │   │   │       ├─ {{SelectionOperator}} (enum)
      │   │   │   │       └─ {{SelectionValues}} []
      │   │   │   └─ {{ScopeCondition}} (Object)
      │   │   └─ {{PaymentComboProductConditionRO}}
      │   │       ├─ {{PaymentTenderCondition}} (Object)
      │   │       └─ {{PaymentComboProductCondition}} (Object)
      │   ├─ {{Action}}
      │   │   ├─ {{ActionType}} (enum)
      │   │   ├─ {{CartBasedAction}}
      │   │   │   ├─ {{CartActionType}} (enum)
      │   │   │   └─ {{CartActionValue}} (number)
      │   │   ├─ {{TenderBasedAction}}
      │   │   │   ├─ {{TenderActionType}} (enum)
      │   │   │   └─ {{TenderActionValue}} (string)
      │   │   ├─ {{ProductBasedAction}}
      │   │   │   ├─ {{ProductActionType}} (enum)
      │   │   │   ├─ {{ProductActionValue}} (number)
      │   │   │   ├─ {{IncludeItemsFromConditionSet}} (boolean)
      │   │   │   └─ {{ProductBasedCondition}}
      │   │   │       ├─ {{TargetType}} (enum)
      │   │   │       ├─ {{TargetProductCondition}} (Object)
      │   │   │       └─ {{TargetComboProductCondition}} (Object)
      │   │   ├─ {{FreeProductAction}}
      │   │   │   ├─ {{FreeIncludeItemsFromConditionSet}} (boolean)
      │   │   │   └─ {{FreeProductBasedCondition}} (Object)
      │   │   ├─ {{FixedPriceAction}}
      │   │   │   ├─ {{FixedPriceValue}} (number)
      │   │   │   ├─ {{FixedIncludeItemsFromConditionSet}} (boolean)
      │   │   │   └─ {{FixedProductBasedCondition}} (Object)
      │   │   └─ {{PerUnitAction}}
      │   │       ├─ {{PerUnitKpi}} (enum)
      │   │       ├─ {{PerUnitDivider}} (string)
      │   │       └─ {{RewardAction}}
      │   │           ├─ {{RewardActionType}} (enum)
      │   │           ├─ {{RewardProductBasedAction}} (Object)
      │   │           ├─ {{RewardFreeProductAction}} (Object)
      │   │           └─ {{RewardFixedPriceAction}} (Object)
      │   ├─ {{CustomerActivationRequired}} (boolean)
      │   ├─ {{MaxIssuancePerCustomer}} (integer)
      │   ├─ {{PromotionRestrictions}}
      │   │   ├─ {{PromotionLevel}} []
      │   │   │   ├─ {{RestrictionKpi}} (enum)
      │   │   │   ├─ {{RestrictionFrequency}} (enum)
      │   │   │   ├─ {{MinTimeBetweenRepeat}} (long)
      │   │   │   └─ {{RestrictionLimit}} (string)
      │   │   ├─ {{CustomerLevel}} []
      │   │   ├─ {{CartLevel}} []
      │   │   ├─ {{CodeLevel}} []
      │   │   └─ {{EarnLevel}} []
      │   ├─ {{CustomFieldValues}} (Object)
      │   ├─ {{IsLoyaltyOnly}} (boolean)
      │   ├─ {{EarningCriteria}}
      │   │   ├─ {{CriteriaActive}} (boolean)
      │   │   ├─ {{CriteriaDsl}} (string)
      │   │   ├─ {{CriteriaDslJson}} (string)
      │   │   ├─ {{CriteriaName}} (string)
      │   │   ├─ {{EarnedFromType}} (enum)
      │   │   ├─ {{EventType}} (enum)
      │   │   ├─ {{GroupId}} (integer)
      │   │   └─ {{MilestoneId}} (integer)
      │   ├─ {{MaxEarningPerCustomer}} (integer)
      │   ├─ {{StoreCriteria}}
      │   │   ├─ {{StoreType}} (enum)
      │   │   ├─ {{StoreValues}} []
      │   │   └─ {{StoreOperator}} (enum)
      │   ├─ {{TimeCriteria}}
      │   │   ├─ {{StartTime}} (string)
      │   │   ├─ {{DurationInHours}} (string)
      │   │   ├─ {{RepeatFrequency}} (enum)
      │   │   └─ {{WeeklyValues}} []
      │   └─ {{SupplementaryCriteria}}
      │       ├─ {{LoyaltyProgramId}} (integer)
      │       ├─ {{ProgramType}} (enum)
      │       └─ {{PartnerProgramId}} (integer)
      └─ {{CartPromotionResponse}}
          ├─ {{Data}}
          │   ├─ {{ResponseId}} (string)
          │   ├─ {{ResponseName}} (string)
          │   ├─ {{ResponseOrgId}} (integer)
          │   ├─ {{ResponseType}} (string)
          │   ├─ {{ResponseActive}} (boolean)
          │   ├─ {{CreatedBy}} (long)
          │   ├─ {{CreatedOn}} (long)
          │   └─ {{LastUpdatedOn}} (long)
          ├─ {{Errors}} []
          │   ├─ {{ErrorCode}} (integer)
          │   └─ {{ErrorMessage}} (string)
          └─ {{Warnings}} []
              └─ {{WarningMessage}} (string)

Prerequisites

  • Authentication: Basic or OAuth authentication.
  • Default access group

Request body parameters

FieldTypeRequiredDescription
nameStringYesIndicates a unique name of the cart promotion. Character limit: 1-50.
typeEnumYesSpecifies the type of cart promotion. Supported values are: • POS (Point of Sale): Applies automatically at checkout when cart or purchase conditions are met. * Constrain: If a POS cart promotion is not restricted to loyal customers(isLoyaltyOnly is false), it cannot have Customer level restrictions. • CODE: Requires the customer to enter a cart promotion code for redemption. * Constrain: Code cart promotions cannot have Customer level restrictions. They also require Code level restrictions to be present. • CUSTOMER: Targets specific customer segments or individuals based on attributes or behaviour. • EARNING: Grants rewards (such as points or benefits) when earning conditions are fulfilled. • REWARD: Offers a direct reward, such as a discount or complimentary item, upon meeting specific conditions.
messageLabelStringOptionalSpecifies a label for the cart promotion message. There is no character limit set for labels. Example: SummerSale2025.
activeBooleanYesIndicates if the cart promotion is active. Supported values: true, false. Default value is true.
priorityIntegerYesSpecifies the order in which cart promotions are applied. Lower numbers have higher priority, with 0 being the highest. Example: If there are three promotions—A (priority 0), B (priority 1), and C (priority 2), the order of application will be A, then B, then C. Note: If customerActivationRequired is enabled, the priority order does not apply until the customer activates the promotion.
isStackableBooleanYesIndicates whether this cart promotion can be used with other cart promotions. Supported values: true, false. Default: false.
startDateLongYesSpecifies the date and time when the cart promotion becomes active, as a Unix epoch timestamp in milliseconds (UTC). Example: 1757388651000 corresponds to 2025-09-12 06:30:51 UTC. Note: This field will be deprecated in the future and is being replaced by startDateISO
startDateISOStringDefines the date and time when the cart promotion becomes active in ISO 8601 format, including the region offset.

For example: The start date is at 14:30:45 on December 16, 2025, in India.

Format for the request parameter: 2025-12-16T14:30:45+05:30

Note: The response time zone always matches the server time zone, regardless of the time zone offset in the request.
endDateLongYesSpecifies the end date and time when the cart promotion expires, as a Unix epoch timestamp in milliseconds (UTC). Example: 1726123456789 corresponds to 2024-09-12 10:24:16 UTC. Note: This field will be deprecated in the future and is being replaced by endDateISO
endDateISOStringDefines the end date and time when the cart promotion expires in ISO 8601 format, including the region offset.

For example: The expiration date is at 14:30:45 on December 16, 2025, in India.

Format for the request parameter: 2025-12-16T14:30:45+05:30

Note: The response time zone always matches the server time zone, regardless of the time zone offset in the request.
campaignIdStringYesSpecifies the unique identifier of the campaign that the cart promotion is linked to. Example: 12345. There is no validation for the campaign ID.
modeEnumOptionalSpecifies the application mode of the promotion. Supported values: DISCOUNT : A price reduction applied directly to items or the total cart during checkout. Example: A "Buy One, Get One Free" offer at Starbucks that applies when you add two eligible drinks to your order. PAYMENT_VOUCHER :A specific code with a fixed monetary value (e.g., ₹50) that a customer must enter to redeem its value against their bill. Example: Using a "ZOMATO50" voucher code on Zomato to get a flat ₹50 off the total food bill. if the field is omitted , it defaults to "DISCOUNT"
conditionObjectYesSpecifies the rules that determine how the cart promotion applies.
..typeEnumYesCART : Conditions based on the entire shopping cart's properties, like its total value or item count. TENDER : Conditions based on the customer's specific method of payment. COMBO_PRODUCT : Conditions based on the presence of multiple, specific products or product groups being purchased together. PRODUCT : Conditions based on a specific group of products. PAYMENT_MODE_SCOPE: Conditions based on a specific payment method like points, cash being used in combination with a nested PRODUCT or CART condition. PAYMENT_MODE_COMBO_PRODUCT: Conditions based on a specific payment method being used in combination with a nested COMBO_PRODUCT condition. PAYMENT_MODE: Conditions based solely on a specific payment method being used.
Condition Objects - CART
.cartConditionObjectYesDefines rules that apply to the entire shopping cart.
..kpiEnumYesMetric to evaluate. Supported: SUBTOTAL,ITEMCOUNT.
..operatorEnumYesComparison operator. Supported: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUAL.
..valueNumberYesThe number to compare against. Example: 250.
Condition Objects - TENDER
.tenderConditionObjectYesDefines rules based on the customer's method of payment.
..tenderModesArrayYesLists specific payment modes that trigger this condition.
...typeStringYesSpecifies the payment category. Supported values: CARD, CASH , PAYMENT_VOUCHER.
...identifiersArrayConditionalThe identifiers used for the CARD and PAYMENT_VOUCHER payment category.
..conditionObjectConditionalDefines an additional condition that must also be met. Required when tenderModes[].type is CARD or CASH.
...typeEnumYesSpecifies the type of nested condition. Supported values: CART, PRODUCT.
...cartConditionObjectConditionalDefines rules based on the overall cart.
....kpiEnumYesMetric to evaluate. SUBTOTAL, ITEMCOUNT.
....operatorEnumYesComparison operator. EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUAL.
....valueNumberYesThe number to compare against.
...productConditionObjectConditionalDefines rules based on specific products.
....criteriaListArrayYesLists criteria that identify the products.
....kpiEnumYesSpecifies the product-level metric. NONE, QUANTITY ,AMOUNT.
....operatorEnumConditionalComparison operator. Supported value: EQUALS.
....valueStringConditionalSpecifies the target value for the comparison.
Condition Objects - COMBO_PRODUCT
.comboProductConditionObjectYesDefines rules that require specific product combinations.
..productConditionsArrayYesList of product condition objects. You can include up to 250 SKUs in a single cart promotion condition.
...kpiEnumYesMetric used to evaluate condition. NONE, QUANTITY, AMOUNT.
...operatorEnumConditionalComparison logic. EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUAL.
...valueStringConditionalTarget value for the comparison.
...criteriaListArrayYesDefines which products or attributes are part of the condition.
....entityStringYesProduct attribute to evaluate. e.g., PRODUCT_NAME, BRAND, CATEGORY.
....operatorEnumYesDefines how attribute values are compared. IN, NOT_IN.
....valuesArrayYesList of attribute values.
Condition Objects - PRODUCT
.productConditionObjectYesDefines rules that apply to specific products.
..criteriaListArrayYesSpecific products that must be present. You can include up to 250 SKUs in a single cart promotion condition.
...entityStringYesAttribute to evaluate: SKU, BRAND, ATTRIBUTE, CATEGORY.
...operatorEnumYesAttribute comparison: IN, NOT_IN.
...valuesArrayYesList of attribute values. You can specify up to 250 SKUs in this list.
..kpiEnumYesMetric to evaluate: NONE, QUANTITY, AMOUNT.
..operatorEnumConditionalComparison logic: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUAL.
..valueStringConditionalTarget value for comparison.
Condition Objects - PAYMENT_MODE_SCOPE
.paymentModeScopeConditionROObjectYesContainer for a payment condition.
..paymentModeConditionROObjectYesSpecific payment method rules.
...paymentModeSelectionCriteriaROObjectYesCriteria for selecting the payment mode.
....operatorEnumYesLogical operator: IN, NOT_IN.
....valuesArrayYesPayment mode identifier strings. Max 100.
..conditionObjectYesStandard subcondition that must also be met.
...typeEnumYesNested condition type: PRODUCT, CART.
Condition Objects - PAYMENT_MODE_COMBO_PRODUCT
.paymentComboProductConditionROObjectYesContainer for payment based combo condition.
..paymentModeConditionObjectYesPayment method rules to trigger promotion.
..comboProductConditionObjectYesDefines the combo product condition.
Condition Objects - PAYMENT_MODE
.paymentModeConditionObjectYesPayment method rules that will trigger the promotion.
..paymentModeSelectionCriteriaROObjectYesCriteria for selecting the payment mode.
...operatorEnumYesLogical operator: IN, NOT_IN.
...valuesArrayYesList of payment mode identifiers. Max 100.
actionObjectYesSpecifies what happens when the cart promotion is applied.
..typeEnumYesScope of the action: CART_BASED, PRODUCT_BASED, TENDER, PER_UNIT, FREE_PRODUCT, FIXED_PRICE.
Action Objects - CART_BASED
.cartBasedActionObjectYesReward action that applies to the entire cart.
..typeEnumYesType of action: ABSOLUTE, PERCENTAGE.
..valueNumberYesFixed monetary amount for the discount.
Action Objects - TENDER
.tenderBasedActionObjectYesAction that applies when using a specific payment method.
..typeEnumYesDiscount calculation method: ABSOLUTE, PERCENTAGE.
..valueStringYesAmount of discount to apply in numbers.
Action Objects - PRODUCT_BASED
.productBasedActionObjectYesDiscount applied to specific products.
..typeEnumYesCalculation method: ABSOLUTE, PERCENTAGE.
..valueNumberYesAmount or percentage of discount.
..includeItemsFromConditionSetBooleanYesApply benefit to triggering items (true) or target set (false).
..productBasedConditionObjectConditionalSet of products to which the action's benefit will be applied.
...typeEnumYesGrouping method: PRODUCT, COMBO_PRODUCT.
Action Objects - PER_UNIT
.perUnitActionObjectYesReward action applied repeatedly.
..perUnitKPIEnumYesMetric used to group items. Supported: QUANTITY.
..perUnitDividerStringYesMinimum quantity before action repeats.
..rewardActionObjectYesDefines specific benefit for each group.
...typeEnumYesType of reward: PRODUCT_BASED, FREE_PRODUCT, FIXED_PRICE.
Action Objects - FREE_PRODUCT
.freeProductActionObjectYesReward action where specific products are made free.
..includeItemsFromConditionSetBooleanYesApply benefit to trigger items (true) or target set (false).
..productBasedConditionObjectYesDefines set of products to be made free.
Action Objects - FIXED_PRICE
.fixedPriceActionObjectYesReward action where price is changed to specific value.
..valueNumberYesNew fixed price for items.
..includeItemsFromConditionSetBooleanYesApply benefit to trigger items (true) or target set (false).
..productBasedConditionObjectYesDefines products sold at fixed price.
customerActivationRequiredBooleanOptionalIndicates if a customer must opt-in for a cart promotion.
maxIssuancePerCustomerIntegerOptionalTotal number of times promotion can be issued to a single customer.
Promotion Restrictions Object
promotionRestrictionsObjectOptionalUsage limits on the cart promotion.
.CustomerArrayConditionalRestrictions that apply per customer.
.CartArrayConditionalRestrictions that apply per cart.
.PromotionArrayConditionalRestrictions that apply to the overall cart promotion.
.CodeArrayConditionalRestrictions that apply to codes. Required when type is CODE.
.EarnArrayConditionalRestrictions that apply to earning. Only valid for type EARNING.
..kpiEnumYesMetric to be limited: REDEMPTION, TRANSACTION, DISCOUNT.
..frequencyEnumOptionalHow often the restriction resets: DAYS, WEEKS, DOES_NOT_REPEAT.
..minTimeBetweenRepeatLongConditionalInterval at which the limit resets.
..limitBigDecimalYesMaximum allowed value for the restriction.
..windowTypeEnumOptionalLimit window type: OVERALL, MOVING, FIXED.
..fixedWindowConfigObjectConditionalRequired when windowType is FIXED.
customFieldValuesObjectOptionalKey-value map for storing custom metadata.
isLoyaltyOnlyBooleanOptionalPromotion applies only to identified loyalty members. Valid only for type POS.
Earning Criteria Object
earningCriteriaObjectConditionalConditions for earning a reward. Required when type is EARNING.
.activeBooleanYesEnable/disable this earning rule.
.criteriaDslStringYesEarning rule in simple language.
.criteriaDslJsonStringYesEscaped JSON string of rule's values.
.criteriaNameStringYesName for earning criteria rule.
.earnedFromTypeEnumYesEvent type: ACTIVITY, MILESTONE.
.eventTypeEnumYesSpecific activity: TransactionAdd , Customer Update , Registration.
.groupIdIntegerYesIdentifier for grouping related criteria.
.milestoneIdIntegerYesIdentifier for specific milestone.
maxEarningPerCustomerIntegerOptionalMax times a customer can earn reward from EARNING promotion.
Store Criteria Object
storeCriteriaObjectOptionalLimits promotion to specific locations.
.typeEnumYesEntity type: STORE, ZONE, CONCEPT.
.valuesArray of IntegersYesIDs corresponding to the type.
.operatorEnumYesLogical operator: IN, NOT_IN.
Time Criteria Object
timeCriteriaObjectOptionalRestricts promotion to specific times or days.
.startTimeStringYesStart time in "HH:mm" format.
.durationInHoursIntegerYesDuration of window in hours.
.repeatFrequencyEnumYesRepeat logic: WEEKS, DAYS, DOES_NOT_REPEAT.
.weeklyValuesArray of StringsConditionalRequired if frequency is WEEKS. e.g. ["MONDAY"].
Supplementary Criteria Object
supplementaryCriteriaObjectOptionalTargets customers in loyalty tier or subscription.
.loyaltyProgramIdIntegerYesID of the loyalty program.
.programTypeEnumYesType: TIER, SUBSCRIPTION.
.partnerProgramIdIntegerYesID of the specific tier or subscription.

Action Types and Scenarios

The action object defines what happens when a cart promotion’s condition is met.
In simple terms:

  • Condition = When does the offer apply?
  • Action = What benefit does the customer get?
ConceptPurposeExample
conditionSpecifies the trigger criteria for the cart promotion.When the cart subtotal is ₹1,000 or more.
actionSpecifies the reward action or benefit once the condition is satisfied.Apply a ₹200 discount.

Action Type Comparison Table

Action TypeWhen to Use ItWhat It DoesExample cart Promotion
CART_BASEDWhen the discount applies to the entire cart total.Gives a single discount based on the total value of all items in the cart.Get $200 off when your cart total is $1,000 or more.
TENDERWhen the reward action depends on the payment method used.Applies a discount if the customer uses a specific payment mode.Pay with a VISA card and get $100 off your total bill.
PRODUCT_BASEDWhen you want to discount specific products or categories.Applies a fixed or percentage discount to particular items that meet set criteria.Get 10% off all Paint Supplies.
FREE_PRODUCTFor "Buy X, Get Y Free" offers.Reduces the price of one or more specific items to zero.Buy a laptop and get a computer mouse for free.
FIXED_PRICETo sell an item or group of items at a specific special price.Overrides the original price of an item with a new, set price.Get any large pizza for $10.
PER_UNITWhen the reward action should repeat per quantity or group.Applies benefits repeatedly for each qualifying group of items or value.Buy 2 Paint Buckets, get 1 Paint Brush free for every 2 buckets.

Example response

{
    "data": {
        "id": "68e4b3d8dd46cd232fb723d3",
        "name": "Combo Product promotion ",
        "orgId": 100737,
        "priority": 0,
        "active": true,
        "messageLabel": "Get 15% off combo products",
        "type": "CUSTOMER",
        "condition": {
            "type": "COMBO_PRODUCT",
            "comboProductCondition": {
                "productConditions": [
                    {
                        "criteriaList": [
                            {
                                "entity": "SKU",
                                "operator": "IN",
                                "values": [
                                    "SKU001",
                                    "SKU002"
                                ]
                            }
                        ],
                        "kpi": "QUANTITY",
                        "value": "1.000000",
                        "operator": "GREATER_THAN_OR_EQUAL"
                    },
                    {
                        "criteriaList": [
                            {
                                "entity": "BRAND",
                                "operator": "IN",
                                "values": [
                                    "BRAND_A"
                                ]
                            }
                        ],
                        "kpi": "QUANTITY",
                        "value": "1.000000",
                        "operator": "GREATER_THAN_OR_EQUAL"
                    }
                ]
            }
        },
        "action": {
            "type": "PRODUCT_BASED",
            "productBasedAction": {
                "productBasedCondition": {
                    "type": "COMBO_PRODUCT",
                    "comboProductCondition": {
                        "productConditions": [
                            {
                                "criteriaList": [
                                    {
                                        "entity": "SKU",
                                        "operator": "IN",
                                        "values": [
                                            "SKU001",
                                            "SKU002"
                                        ]
                                    }
                                ],
                                "kpi": "QUANTITY",
                                "value": "1.000000",
                                "operator": "GREATER_THAN_OR_EQUAL"
                            },
                            {
                                "criteriaList": [
                                    {
                                        "entity": "BRAND",
                                        "operator": "IN",
                                        "values": [
                                            "BRAND_A"
                                        ]
                                    }
                                ],
                                "kpi": "QUANTITY",
                                "value": "1.000000",
                                "operator": "GREATER_THAN_OR_EQUAL"
                            }
                        ]
                    }
                },
                "type": "PERCENTAGE",
                "value": "15.000000",
                "includeItemsFromConditionSet": false
            }
        },
        "createdBy": 75197941,
        "createdOn": 1759818712969,
        "createdOnISO": "2025-10-07T06:31:52Z",
        "lastUpdatedBy": 75197941,
        "lastUpdatedOn": 1759818712969,
        "lastUpdatedOnISO": "2025-10-07T06:31:52Z",
        "startDate": 1759363200000,
        "startDateISO": "2025-10-02T00:00:00Z",
        "endDate": 1790985600000,
        "endDateISO": "2026-10-03T00:00:00Z",
        "campaignId": 286038,
        "promotionRestrictions": {
            "Promotion": [
                {
                    "kpi": "REDEMPTION",
                    "limit": "5000.000000"
                }
            ],
            "Cart": [
                {
                    "kpi": "DISCOUNT",
                    "limit": "50.000000"
                }
            ],
            "Customer": [
                {
                    "kpi": "TRANSACTION",
                    "frequency": "WEEKS",
                    "minTimeBetweenRepeat": 604800000,
                    "limit": "2.000000"
                },
                {
                    "kpi": "DISCOUNT",
                    "limit": "200.000000"
                },
                {
                    "kpi": "REDEMPTION",
                    "frequency": "DAYS",
                    "minTimeBetweenRepeat": 86400000,
                    "limit": "3.000000"
                }
            ]
        },
        "earnLimitedToSpecificAudience": true,
        "customFieldValues": {
            "Age": "25"
        },
        "customerActivationRequired": true,
        "mode": "DISCOUNT",
        "maxIssuancePerCustomer": 1,
        "isStackable": false
    }
}

Response parameters

FieldTypeDescription
dataObjectIndicates the main container for the cart promotion object.
..idStringSpecifies the unique, system-generated identifier for the cart promotion.
..nameStringSpecifies the unique name of the cart promotion.
..orgIdIntegerSpecifies the unique identifier for the organization to which this cart promotion belongs.
..typeStringSpecifies the type of cart promotion. Possible values: POS, CODE, CUSTOMER, EARNING, REWARD.
..messageLabelStringSpecifies a customer-facing label for the cart promotion message.
..activeBooleanSpecifies if the cart promotion is active. Possible values: true, false.
..priorityIntegerSpecifies the order of application, where lower numbers have higher priority (0 is the highest). Defaults to 0 if not explicitly set during creation.
..isStackableBooleanSpecifies if this cart promotion can be combined with other cart promotions. Defaults to false if not provided. Possible values: true, false.
..startDateLongSpecifies the start time of the cart promotion in Unix epoch milliseconds (UTC).
..startDateISOStringSpecifies the start date and time of the cart promotion in ISO 8601 format, returned in the server time zone. EU server example: 2025-10-02T00:00:00Z → 02 October 2025, 00:00:00 (UTC). India server example: 2025-10-02T05:30:00+05:30 → 02 October 2025, 05:30:00 (IST). Note: The response time zone always matches the server time zone, regardless of the time zone offset in the request.
..endDateLongSpecifies the end time of the cart promotion in Unix epoch milliseconds (UTC).
..endDateISOStringSpecifies the end date and time of the cart promotion in ISO 8601 format, returned in the server time zone. EU server example: 2026-10-03T00:00:00Z → 03 October 2026, 00:00:00 (UTC). India server example: 2026-10-03T05:30:00+05:30 → 03 October 2026, 05:30:00 (IST). Note: The response time zone always matches the server time zone, regardless of the time zone offset in the request.
..campaignIdStringSpecifies the identifier of the campaign that the cart promotion is linked to.
..createdByLongSpecifies the unique identifier of the user who created the cart promotion.
..createdOnLongSpecifies the creation time of the cart promotion in Unix epoch milliseconds (UTC).
..createdOnISOStringSpecifies the timestamp when the cart promotion was created, in ISO 8601 format, returned in the server time zone. EU server example: 2025-10-07T06:31:52Z → 07 October 2025, 06:31:52 (UTC). India server example: 2025-10-07T12:01:52+05:30 → 07 October 2025, 12:01:52 (IST). Note: The response time zone always matches the server time zone, regardless of the time zone offset in the request.
..lastUpdatedByLongSpecifies the unique identifier of the user who has last updated the cart promotion.
..lastUpdatedOnLongSpecifies the last updated time of the cart promotion in Unix epoch milliseconds (UTC).
..lastUpdatedOnISOStringSpecifies the timestamp when the cart promotion was last updated, in ISO 8601 format, returned in the server time zone. EU server example: 2025-10-07T06:31:52Z → 07 October 2025, 06:31:52 (UTC). India server example: 2025-10-07T12:01:52+05:30 → 07 October 2025, 12:01:52 (IST). Note: The response time zone always matches the server time zone, regardless of the time zone offset in the request.
..conditionObjectSpecifies the rules that determine how the cart promotion applies.
....typeStringSpecifies the type of condition to evaluate. CART, TENDER, COMBO_PRODUCT.
....cartConditionObjectContains rules for the entire shopping cart.
......kpiStringMetric used to evaluate: SUBTOTAL, ITEMCOUNT.
......operatorStringComparison operator: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUAL.
......valueStringNumerical value to compare kpi against.
....tenderConditionObjectRules based on customer's payment method.
......tenderModesArraySpecific payment methods that will trigger condition.
........typeStringCategory of the payment method. Possible value: CARD.
........identifiersArrayExact payment methods, e.g. ["VISA_CARD"].
......conditionObjectContains a nested condition (typically CART type) that must also be satisfied.
....comboProductConditionObjectMultiple product sets that must be in the cart.
......productConditionsArrayProduct conditions that must all be satisfied.
..actionObjectDefines the action taken when the cart promotion applies.
....typeStringSpecifies scope: CART_BASED, PRODUCT_BASED, TENDER, PER_UNIT.
....cartBasedActionObjectAction for the entire cart.
......typeStringType of cart-based action. Possible value: ABSOLUTE.
......valueStringFixed monetary amount for discount.
....tenderBasedActionObjectReward for tender-based promotion.
......typeStringCalculation method: ABSOLUTE.
......valueStringFixed monetary amount to be discounted.
....perUnitActionObjectRepeating reward action.
......perUnitKPIStringMetric used to group items: QUANTITY.
......perUnitDividerStringUnits required to trigger one instance of rewardAction.
......includeItemsFromConditionSetBooleanBenefit applies to trigger items (true) or target set (false).
......rewardActionObjectBenefit granted for each qualifying unit group.
........typeStringType: PRODUCT_BASED, FREE_PRODUCT, FIXED_PRICE.
........productBasedActionObjectDiscount on specific products.
..........typeStringDiscount method: ABSOLUTE, PERCENTAGE.
..........valueStringDiscount amount or percentage.
..........includeItemsFromConditionSetBooleanBenefit applies to trigger items (true) or target set (false).
..........productBasedConditionObjectTarget set of products.
............typeStringTargeting mode: PRODUCT, COMBO_PRODUCT.
............productConditionObjectContains target products using a list of criteria.
..............criteriaListArrayArray of rule objects.
................entityStringAttribute evaluated (e.g., CATEGORY, SKU).
................operatorStringOperator: IN, NOT_IN.
................valuesArrayStrings to match against entity. Max 100.
..............kpiStringMetric for filtering: NONE, QUANTITY.
........freeProductActionObjectReward where products are given free.
..........includeItemsFromConditionSetBooleanBenefit applies to trigger items (true) or target set (false).
..........productBasedConditionObjectProducts to be marked as free.
........fixedPriceActionObjectProducts sold at fixed price.
..........valueStringNew fixed price returned as string.
..........includeItemsFromConditionSetBooleanBenefit applies to trigger items (true) or target set (false).
..........productBasedConditionObjectProducts sold at fixed price.
..customerActivationRequiredBooleanSpecifies if customer must opt-in.
..maxIssuancePerCustomerIntegerMax times promotion can be issued to single customer.
..earningCriteriaObjectConditions for EARNING type promotions.
....activeBooleanSpecifies if earning rule is active.
....criteriaDslStringDSL string representing rule.
....criteriaDslJsonStringEscaped JSON representation of rule.
....criteriaNameStringHuman-readable name for criteria rule.
....durationObjectPlaceholder for duration-based rules.
....earnedFromTypeStringEvent type: ACTIVITY.
....eventTypeStringTrigger activity: TransactionAdd.
....groupIdIntegerIdentifier for grouping related criteria.
....milestoneIdIntegerIdentifier for milestone within program.
..maxEarningPerCustomerInteger or nullMax times reward can be earned from EARNING promotion.
..promotionRestrictionsObjectUsage limits and constraints.
....PromotionArrayRestrictions applying to overall promotion.
....CustomerArrayRestrictions applying per customer.
....CartArrayRestrictions applying per cart.
....CodeArrayRestrictions for CODE promotions.
......kpiStringMetric limited: REDEMPTION, TRANSACTION, DISCOUNT.
......frequencyStringReset frequency: DAYS, WEEKS.
......minTimeBetweenRepeatLongTime between uses in ms.
......limitStringMax allowed value for restriction.
......windowTypeEnumLimit window type.
......fixedWindowConfigObjectCycle configuration for FIXED window.
.......cycleTypeEnumType of fixed cycle.
.......weekStartDayEnumStart day for weekly cycle.
.......refreshRateIntegerNumber of days per cycle.
.......cycleReferenceDateLongAnchor date for N_DAY cycle.
..customFieldValuesObjectKey-value map for metadata.
..modeStringApplication mode: DISCOUNT.
..earnLimitedToSpecificAudienceBooleanIf earning is limited to audience.
..expiryDateChangeJobListArrayJobs created to change expiry dates.
....jobTypeStringEntity type: ISSUED, EARNED, CODE.
....statusStringOPEN, IN_PROGRESS, COMPLETED, FAILED, CANCELLED.
....createdOnLongJob creation date/time.
....createdByLongUser who created the job.
....lastUpdatedOnLongLast updated date/time.
....lastUpdatedByLongUser who last updated the job.
....messageStringDetails about the expiry date change.

Error codes

CodeDescription
400Invalid request. Check required parameters. Ensure all required parameters are provided and valid.
400SKU values exceed 100. Ensure the SKU values added are under 100 values.
400Enum value is invalid. The scope must be "REWARD". Pass scope as "REWARD" only.
400defaultValue is required when isMandatory is true. Add a defaultValue if isMandatory is set to true.
701Error while calling the segmentation engine. Check segmentation engine service connectivity and logs.
703Org timezone fetch failed. Verify org timezone configuration and service availability.
704Invalid reward type passed. Provide a valid reward type as per API specification.
705Exceeded maximum active promotions for an org. Deactivate some active promotions before creating a new one.
706Promotion has expired. Use a valid, non-expired promotion for the operation.
707The passed promotion type is not supported. Change the promotion type to one supported by the system.
708Exceeded the max earn per customer limit. Adjust the earn amount or check the customer limits setup.
709Promotion not in running state. Ensure the promotion is currently running before proceeding.
710Error while saving earned promotion. Retry after checking backend/infrastructure logs.
711Error while saving promotion or Could not get product details. Check input data and ensure product service is available.
712Error while creating/updating emf rules. Check rule configuration and retry or contact support.
713Earned from type cannot be changed. Do not change earnedFromType on existing earned promotions.
714Earn is not supported for this promotion type. Switch to a supported promotion type for earn operations.
715Promotion was not issued to current customer. Ensure the promotion was issued to the specified customer.
716Promotion name must be unique. Use an unused, unique promotion name.
500Internal server error. Retry the request after a short delay. If the error persists, contact support with details and logs.

Example Overview

Detailed Examples

Spend $100, Get $10 Off : [CART Condition]

Requirement: The brand wants to set up a cart promotion, "Spend $100, Get $10 Off," with the condition that if the cart's subtotal is greater than or equal to $100, a fixed discount of $10 is applied to the entire cart.
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmRvY2RlbW86MmQ1OTNhAxMzU5NGIwNDllZTk=' \
--header 'Cookie: _cfuvid=5O_PtucI3YnfDUgjgMPnHbPeEKcKJjaHWDOkNDip3Po-1760116657904-0.0.1.1-604800000' \
--data '{
  "name": "Spend 100 Get 10 Off12",
  "orgId": 100737,
  "type": "CUSTOMER",
  "messageLabel": "Get $10 off on orders over $100!",
  "active": true,
  "priority": 0,
  "isStackable": false,
  "startDate": 1759363200000,
  "endDate": 1790985600000,
  "campaignId": "286039",
  "condition": {
    "type": "CART",
    "cartCondition": {
      "kpi": "SUBTOTAL",
      "operator": "GREATER_THAN_OR_EQUAL",
      "value": 100
    }
  },
  "action": {
    "type": "CART_BASED",
    "cartBasedAction": {
      "type": "ABSOLUTE",
      "value": 10
    }
  },
  "customerActivationRequired": true,
  "maxIssuancePerCustomer": 1,
  "promotionRestrictions": {},
  "customFieldValues": {}
}'

Pay with VISA, Get $20 Off on Orders Above $100 : [TENDER Condition]

Requirement: 1 The brand wants to set up a cart promotion, "Pay with VISA, Get $20 Off on Orders Above $100," with conditions that if a customer's cart subtotal is greater than or equal to $100 AND they pay with a VISA card, an absolute discount of $20 is applied.
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Cookie: _cfuvid=9769067-0.0.1.1-604800000; _cfuvid=5O_PtucI3YnfDUgjgMPnHbPeEKcKJjaHWDOkNDip3Po-1760116657904-0.0.1.1-604800000' \
--header 'Authorization: Basic Z2VvcmdlLmRvY2RlbW86MmQ1OTNhMjI2MTk1OGE2NWI5ZjAxMzU5NGIwNDllZTk=' \
--data '{
  "name": "Cash Discount on Paint Supplies5",
  "orgId": 100737,
  "type": "CUSTOMER",
  "messageLabel": "Pay with Cash and Get $5 Off Paint Supplies",
  "active": true,
  "priority": 0,
  "isStackable": false,
  "startDate": 1759363200000,
  "endDate": 1790985600000,
  "campaignId": "286039",
  "condition": {
    "type": "TENDER",
    "tenderCondition": {
      "tenderModes": [
        {
          "type": "CASH"
        }
      ],
      "condition": {
        "type": "PRODUCT",
        "productCondition": {
          "criteriaList": [
            {
              "entity": "CATEGORY",
              "values": [
                "Paint Supplies"
              ],
              "operator": "IN"
            }
          ],
          "kpi": "QUANTITY",
          "operator": "GREATER_THAN_OR_EQUAL",
          "value": "1"
        }
      }
    }
  },
  "action": {
    "type": "TENDER",
    "tenderBasedAction": {
      "type": "ABSOLUTE",
      "value": "5"
    }
  },
  "customerActivationRequired": false,
  "maxIssuancePerCustomer": 1,
  "promotionRestrictions": {},
  "customFieldValues": {}
}'

Pay with Cash, Get $5 Off Paint Supplies : [TENDER Condition]

Requirement 2: The brand wants to set up a cart promotion, "Pay with Cash, Get $5 Off Paint Supplies," with conditions that if a customer buys at least one item from the "Paint Supplies" category AND they pay with cash, an absolute discount of $5 is applied.
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmRvY2RlbW86MmQ1OMzU5NGIwNDllZTk=' \
--header 'Cookie: _cfuvid=5O_PtucI3YnfDUgjgMPnHbPeEKcKJjaHWDOkNDip3Po-1760116657904-0.0.1.1-604800000' \
--data '{
  "name": "Cash Discount on Paint Supplies21",
  "orgId": 100737,
  "type": "CUSTOMER",
  "messageLabel": "Pay with Cash and Get $5 Off Paint Supplies",
  "active": true,
  "priority": 0,
  "isStackable": false,
  "startDate": 1759363200000,
  "endDate": 1790985600000,
  "campaignId": "286039",
  "condition": {
    "type": "TENDER",
    "tenderCondition": {
      "tenderModes": [
        {
          "type": "CASH"
        }
      ],
      "condition": {
        "type": "PRODUCT",
        "productCondition": {
          "criteriaList": [
            {
              "entity": "CATEGORY",
              "values": [
                "Paint Supplies"
              ],
              "operator": "IN"
            }
          ],
          "kpi": "QUANTITY",
          "operator": "GREATER_THAN_OR_EQUAL",
          "value": "1"
        }
      }
    }
  },
  "action": {
    "type": "TENDER",
    "tenderBasedAction": {
      "type": "ABSOLUTE",
      "value": "5"
    }
  },
  "customerActivationRequired": false,
  "maxIssuancePerCustomer": 1,
  "promotionRestrictions": {},
  "customFieldValues": {}
}'

Holiday Bonus Vouchers : [TENDER Condition]

Requirement 3: The brand has previously issued a specific set of high-value gift vouchers (e.g., "Holiday Bonus Vouchers") to select customers. For the redemption of these specific vouchers, they want to run a special promotion. The condition is: if a customer pays using one of these specific "Holiday Bonus Vouchers" (identified by its unique ID), the system will apply an additional $100 absolute discount to their transaction.
{
  "name": "Gift voucher promotion test 5",
  "orgId": 100458,
  "type": "REWARD",
  "messageLabel": "Gift voucher test",
  "active": true,
  "priority": 0,
  "isStackable": false,
  "startDate": 1761105600000,
  "endDate": 1764565199999,
  "campaignId": "286039",
  "condition": {
    "type": "TENDER",
    "tenderCondition": {
      "tenderModes": [
        {
          "type": "PAYMENT_VOUCHER",
          "identifiers": [
            "68f73e2d4a314550c4b458a3"
          ]
        }
      ]
    }
  },
  "action": {
    "type": "TENDER",
    "tenderBasedAction": {
      "type": "ABSOLUTE",
      "value": "100"
    }
  },
  "customerActivationRequired": false,
  "maxIssuancePerCustomer": 1,
  "maxEarningPerCustomer": 100,
  "promotionRestrictions": {},
  "customFieldValues": {}
}

2 KitKats for 200 Points : [TENDER Condition]

Requirement 4: The brand wants to offer a special redemption rate for loyalty members. The promotion is: "Redeem 2 KitKat items for only 200 points (usual 400 points)." This special rate is only triggered if the customer has chosen to pay using "Points" as their payment method.
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmJ1a2w6NzYzN4ZjY3MmNhZjY1ZmY=' \
--header 'Cookie: _cfuvid=mhzUbsb0moSA\vZgzvXzivXm5uY-1761199170391-0.0.1.1-604800000' \
--data '{
  "name": "Preferential Redemption - KitKat Bundle",
  "orgId": 100458,
  "type": "REWARD",
  "messageLabel": "Special Offer: 2 KitKats for 200 Points!",
  "active": true,
  "priority": 0,
  "isStackable": false,
  "startDate": 1759363200000,
  "endDate": 1790985600000,
  "campaignId": "293076",
  "condition": {
    "type": "TENDER",
    "tenderCondition": {
      "tenderModes": [
        {
          "type": "CARD",
          "identifiers": [
            "Points"
          ]
        }
      ],
      "condition": {
        "type": "PRODUCT",
        "productCondition": {
          "criteriaList": [
            {
              "entity": "SKU",
              "values": [
                "KITKAT_SKU"
              ],
              "operator": "IN"
            }
          ],
          "kpi": "QUANTITY",
          "operator": "GREATER_THAN_OR_EQUAL",
          "value": "2"
        }
      }
    }
  },
  "action": {
    "type": "TENDER",
    "tenderBasedAction": {
      "type": "ABSOLUTE",
      "value": "200"
    }
  },
  "customerActivationRequired": false,
  "maxIssuancePerCustomer": 10,
  "promotionRestrictions": {},
  "customFieldValues": {}
}'

Buy a Burger and Fries, Get 15% Off : [COMBO_PRODUCT Condition]

Requirement: The brand wants to set up a cart promotion, "Buy a Burger and Fries, Get 15% Off," with conditions that if a customer's cart contains at least one item from the "Burgers" category AND at least one item from the "Fries" category, a 15% discount is applied to those specific items.
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmRvY22NWI5ZjAxMzU5NGIwNDllZTk=' \
--header 'Cookie: _cfuvid=5O_PtucI3YnfcKJjaHWDOkNDip3Po-1760116657904-0.0.1.1-604800000' \
--data '{
  "name": "Burger and Fries Combo Discount",
  "orgId": 100737,
  "type": "CUSTOMER",
  "messageLabel": "Get 15% off our Burger and Fries Combo!",
  "active": true,
  "priority": 0,
  "isStackable": false,
  "startDate": 1759363200000,
  "endDate": 1790985600000,
  "campaignId": "286039",
  "condition": {
    "type": "COMBO_PRODUCT",
    "comboProductCondition": {
      "productConditions": [
        {
          "kpi": "QUANTITY",
          "operator": "GREATER_THAN_OR_EQUAL",
          "value": "1",
          "criteriaList": [
            {
              "entity": "CATEGORY",
              "operator": "IN",
              "values": [
                "Burgers"
              ]
            }
          ]
        },
        {
          "kpi": "QUANTITY",
          "operator": "GREATER_THAN_OR_EQUAL",
          "value": "1",
          "criteriaList": [
            {
              "entity": "CATEGORY",
              "operator": "IN",
              "values": [
                "Fries"
              ]
            }
          ]
        }
      ]
    }
  },
  "action": {
    "type": "PRODUCT_BASED",
    "productBasedAction": {
      "type": "PERCENTAGE",
      "value": "15.00",
      "productBasedCondition": {
        "type": "COMBO_PRODUCT",
        "comboProductCondition": {
          "productConditions": [
            {
              "kpi": "QUANTITY",
              "operator": "GREATER_THAN_OR_EQUAL",
              "value": "1",
              "criteriaList": [
                {
                  "entity": "CATEGORY",
                  "operator": "IN",
                  "values": [
                    "Burgers"
                  ]
                }
              ]
            },
            {
              "kpi": "QUANTITY",
              "operator": "GREATER_THAN_OR_EQUAL",
              "value": "1",
              "criteriaList": [
                {
                  "entity": "CATEGORY",
                  "operator": "IN",
                  "values": [
                    "Fries"
                  ]
                }
              ]
            }
          ]
        }
      }
    }
  },
  "customerActivationRequired": true,
  "maxIssuancePerCustomer": 1,
  "promotionRestrictions": {},
  "customFieldValues": {}
}'

Buy 2 Paint Supplies, Get $15 Off : [PRODUCT Condition]

Requirement: The brand wants to set up a cart promotion, "Buy 2 'Paint Supplies', Get $15 Off Your Order," with the condition that if the cart contains at least two items from the "Paint Supplies" category, a fixed discount of $15 is applied to the entire cart.
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmRW86Mm5ZjAxMzU5NGIwNDllZTk=' \
--header 'Cookie: _cfuvid=5O_PtucI3YnHbPip3Po-1760116657904-0.0.1.1-604800000' \
--data '{
    "name": "Buy 2 Paint Supplies Get 15 Off",
    "type": "CUSTOMER",
    "messageLabel": "Get $15 off when you buy two paint supplies!",
    "active": true,
    "priority": 0,
    "isStackable": false,
    "startDate": 1759363200000,
    "endDate": 1790985600000,
    "campaignId": "286039",
    "condition": {
        "type": "PRODUCT",
        "productCondition": {
            "criteriaList": [
                {
                    "entity": "CATEGORY",
                    "operator": "IN",
                    "values": [
                        "Paint Supplies"
                    ]
                }
            ],
            "kpi": "QUANTITY",
            "operator": "GREATER_THAN_OR_EQUAL",
            "value": "2"
        }
    },
    "action": {
        "type": "CART_BASED",
        "cartBasedAction": {
            "type": "ABSOLUTE",
            "value": 15
        }
    },
    "customerActivationRequired": false,
    "maxIssuancePerCustomer": 1,
    "promotionRestrictions": {},
    "customFieldValues": {}
}'\'''

SAVE50 with Points on ChocoBrand : [PAYMENT_MODE_SCOPE Condition]

Requirement: A convenience store wants to set up a code-based promotion: "Use code SAVE50, Get 50% Off on 'ChocoBrand' cake when paying with Points".
{
    
    "name": "CODE: POINTS Payment + Oreo → 50% Off",
    "orgId": 50672,
    "priority": 5,
    "active": true,
    "messageLabel": "test!!",
    "type": "CODE",
    "condition": {
        "type": "PAYMENT_MODE_SCOPE",
        "paymentModeScopeConditionRO": {
            "paymentModeCondition": {
                "paymentModeSelectionCriteriaRO": {
                    "operator": "IN",
                    "values": [
                        "POINTS"
                    ]
                }
            }
            ,
            "condition": {
                "type": "PRODUCT",
                "productCondition": {
                    "criteriaList": [
                        {
                            "entity": "SKU",
                            "operator": "IN",
                            "values": [
                                "ChocoBrand"
                            ]
                        }
                    ],
                    "kpi": "QUANTITY",
                    "value": 1.000000,
                    "operator": "GREATER_THAN_OR_EQUAL"
                }
            }
        }
    },
    "action": {
        "type": "PRODUCT_BASED",
        "productBasedAction": {
            "type": "PERCENTAGE",
            "value": 50.000000,
            "includeItemsFromConditionSet": false
        }
    },
    "createdBy": 1234,
    "createdOn": 1761670118230,
    "lastUpdatedBy": 1234,
    "lastUpdatedOn": 1761670118230,
    "startDate": 1761497318230,
    "endDate": 1762104742000,
    "campaignId": 2013,
    "promotionRestrictions": {
        "Code": [
            {
                "kpi": "REDEMPTION",
                "limit": 100.000000
            }
        ]
    },
    "earnLimitedToSpecificAudience": false,
    "customFieldValues": {
        "f1": "v1",
        "f2": "v2"
    },
    "mode": "DISCOUNT",
    "maxIssuancePerCustomer": 1,
    "isStackable": false
}

Coke + ChocoBrand with Points for 50% off Maggi : [PAYMENT_MODE_COMBO_PRODUCT Condition]

Requirement: A convenience store wants to set up a POS promotion, "Buy Coke & ChocoBrand biscuit with Points payment mode, and get 50% off on Maggi noodles."
{
    "name": "POINTS Payment Combo: Coke+ChocoBrand → 50% off Maggi",
    "type": "POS",
    "mode": "DISCOUNT",
    "campaignId": "286039",
    "condition": {
        "type": "PAYMENT_MODE_COMBO_PRODUCT",
        "paymentComboProductConditionRO": {
            "paymentModeCondition": {
                "paymentModeSelectionCriteriaRO": {
                    "operator": "IN",
                    "values": ["POINTS"]
                }
            },
            "comboProductCondition": {
                "productConditions": [
                    {
                        "criteriaList": [
                            {
                                "entity": "SKU",
                                "operator": "IN",
                                "values": ["COKE"]
                            }
                        ],
                        "kpi": "AMOUNT",
                        "value": 2,
                        "operator": "GREATER_THAN_OR_EQUAL"
                    },
                    {
                        "criteriaList": [
                            {
                                "entity": "SKU",
                                "operator": "IN",
                                "values": ["ChocoBrand"]
                            }
                        ],
                        "kpi": "AMOUNT",
                        "value": 1,
                        "operator": "GREATER_THAN_OR_EQUAL"
                    }
                ]
            }
        }
    },
    "action": {
        "type": "PRODUCT_BASED",
        "productBasedAction": {
            "productBasedCondition": {
                "type": "PRODUCT",
                "productCondition": {
                    "criteriaList": [
                        {
                            "entity": "SKU",
                            "operator": "IN",
                            "values": ["MAGGI"]
                        }
                    ],
                    "kpi": "AMOUNT",
                    "value": 0,
                    "operator": "GREATER_THAN"
                }
            },
            "type": "PERCENTAGE",
            "value": 50,
            "includeItemsFromConditionSet": false
        }
    }
}

Pay with Points, Get 10% Off : [PAYMENT_MODE Condition]

Requirement: A store wants to set up a promotion, "Pay with Points, Get 10% Off Your Order," where a 10% discount is applied to the cart when a customer pays using Points.
{
    "name": "Pay with Points - 10% Off",
    "orgId": 50672,
    "type": "CUSTOMER",
    "mode": "DISCOUNT",
    "messageLabel": "Pay with Points and save 10%",
    "active": true,
    "priority": 0,
    "isStackable": false,
    "startDate": 1759363200000,
    "endDate": 1790985600000,
    "campaignId": "286039",
    "condition": {
        "type": "PAYMENT_MODE",
        "paymentModeCondition": {
            "paymentModeSelectionCriteriaRO": {
                "operator": "IN",
                "values": [
                    "POINTS"
                ]
            }
        }
    },
    "action": {
        "type": "PRODUCT_BASED",
        "productBasedAction": {
            "type": "PERCENTAGE",
            "value": 10,
            "includeItemsFromConditionSet": false
        }
    }
}

Spend $100, Get $10 Off : [CART_BASED Action]

Requirement: The brand wants to set up a cart promotion, "Spend $100, Get $10 Off," with the condition that if the cart's subtotal is greater than or equal to $100, a fixed discount of $10 is applied to the entire cart.
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Cookie: _cfuv_vSE54e.Ky_kOxQM.ixIiU-1760115687488-0.0.1.1-604800000' \
--header 'Authorization: Basic Z2VvcmdlLmRvY2RlbW85OGE2NWI5ZjAxMzU5NGIwNDllZTk=' \
--data '{
  "name": "Spend 100 Get 10 Off",
  "orgId": 100737,
  "type": "CUSTOMER",
  "messageLabel": "Get $10 off on orders over $100!",
  "active": true,
  "priority": 0,
  "isStackable": false,
  "startDate": 1759363200000,
  "endDate": 1790985600000,
  "campaignId": "286039",
  "condition": {
    "type": "CART",
    "cartCondition": {
      "kpi": "SUBTOTAL",
      "operator": "GREATER_THAN_OR_EQUAL",
      "value": 100
    }
  },
  "action": {
    "type": "CART_BASED",
    "cartBasedAction": {
      "type": "ABSOLUTE",
      "value": 10
    }
  },
  "customerActivationRequired": true,
  "maxIssuancePerCustomer": 1,
  "promotionRestrictions": {},
  "customFieldValues": {}
}'

Pay with VISA, Get $20 Off on Orders Above $100 : [TENDER Action]

Requirement: The brand wants to set up a cart promotion, "Pay with VISA, Get $20 Off on Orders Above $100," with conditions that if a customer's cart subtotal is greater than or equal to $100 AND they pay with a VISA card, an absolute discount of $20 is applied.
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlI5ZjAxMzU5NGIwkNDip3Po-1760116657904-0.0.1.1-604800000' \
--data '{
  "name": "VISA Discount on Cart Total",
  "orgId": 100737,
  "type": "CUSTOMER",
  "messageLabel": "Get $20 off with VISA on orders above $100",
  "active": true,
  "priority": 0,
  "isStackable": false,
  "startDate": 1759363200000,
  "endDate": 1790985600000,
  "campaignId": "286039",
  "condition": {
    "type": "TENDER",
    "tenderCondition": {
      "tenderModes": [
        {
          "type": "CARD",
          "identifiers": [
            "VISA_CARD"
          ]
        }
      ],
      "condition": {
        "type": "CART",
        "cartCondition": {
          "kpi": "SUBTOTAL",
          "operator": "GREATER_THAN_OR_EQUAL",
          "value": 100
        }
      }
    }
  },
  "action": {
    "type": "TENDER",
    "tenderBasedAction": {
      "type": "ABSOLUTE",
      "value": "20"
    }
  },
  "customerActivationRequired": true,
  "maxIssuancePerCustomer": 1,
  "promotionRestrictions": {},
  "customFieldValues": {}
}'

Laptop + Accessory Bundle Deal : [PRODUCT_BASED Action]

Requirement 1: The brand wants to set up a cart promotion where a customer buys any laptop, they should receive a 50% discount on an accessory bundle.
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmJ1a2w6NzYzNDkxOGFmNDI3MGQ3YzI4ZjU4ZjY3MmNhZjY1ZmY=' \
--header 'Cookie: _cfuvid=m_cAUxdAS9kIldmFfEaOkagijzS7nWq3g15w1dpuKfA-1760347164530-0.0.1.1-604800000' \
--data 'curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmJ1a2w6NzYzNDkxOGFmNDI3MGQ3YzI4ZjU4ZjY3MmNhZjY1ZmY=' \
--header 'Cookie: _cfuvid=m_cAUxdAS9kIldmFfEaOkagijzS7nWq3g15w1dpuKfA-1760347164530-0.0.1.1-604800000' \
--data '{
    "name": "Laptop + Accessory Bundle Deal",
    "type": "POS",
    "messageLabel": "Buy a Laptop, Get 50% Off a Mouse & Keyboard!",
    "active": true,
    "priority": 5,
    "isStackable": false,
    "startDate": 1760332800000,
    "endDate": 1792031999000,
    "campaignId": "286039",
    "condition": {
        "type": "PRODUCT",                             
        "productCondition": {
            "criteriaList": [
                {
                    "entity": "CATEGORY",
                    "operator": "IN",
                    "values": ["Laptops"]             
                }
            ],
            "kpi": "QUANTITY",
            "operator": "GREATER_THAN_OR_EQUAL",
            "value": "1"                              
        }
    },
    "action": {
        "type": "PRODUCT_BASED",                      
        "productBasedAction": {
            "type": "PERCENTAGE",                     
            "value": "50",                            
            "includeItemsFromConditionSet": false,    
            "productBasedCondition": {
                "type": "COMBO_PRODUCT",              
                "comboProductCondition": {
                    "productConditions": [            
                        {
                            "criteriaList": [
                                {
                                    "entity": "CATEGORY",
                                    "operator": "IN",
                                    "values": ["Mouse"] 
                                }
                            ],
                            "kpi": "QUANTITY",        
                            "operator": "EQUALS",     
                            "value": "1"              
                        },
                        {
                            "criteriaList": [
                                {
                                    "entity": "CATEGORY",
                                    "operator": "IN",
                                    "values": ["Keyboards"] 
                                }
                            ],
                            "kpi": "QUANTITY",        
                            "operator": "EQUALS",     
                            "value": "1"              
                        }
                    ]
                }
            }
        }
    }
}'\''''\'''

25 Percent Off First Two Snacks : [PRODUCT_BASED Action]

Requirement 2: A brand wants to offer a "25% Off Snacks" cart promotion, but to manage costs, they want the discount to apply only to the first two snack items a customer buys.
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmJ1a2w6NzYzNDkxOGFmNDI3MGQ3YzI4ZjU4ZjY3MmNhZjY1ZmY=' \
--header 'Cookie: _cfuvid=m_cAUxdAS9kIldmFfEaOkagijzS7nWq3g15w1dpuKfA-1760347164530-0.0.1.1-604800000' \
--data '{
    "name": "25 Percent Off First Two Snacks",
    "type": "POS",
    "messageLabel": "25% Off the first two snacks you buy!",
    "active": true,
    "priority": 1,
    "isStackable": false,
    "startDate": 1759363200000,
    "endDate": 1790985600000,
    "campaignId": "286039",
    "condition": {
        "type": "PRODUCT",                             // Trigger: If the cart contains at least one snack.
        "productCondition": {
            "criteriaList": [
                {
                    "entity": "CATEGORY",
                    "operator": "IN",
                    "values": ["Snacks"]
                }
            ],
            "kpi": "QUANTITY",
            "operator": "GREATER_THAN_OR_EQUAL",
            "value": "1"
        }
    },
    "action": {
        "type": "PRODUCT_BASED",                      // Action: Apply a discount to specific products.
        "productBasedAction": {
            "type": "PERCENTAGE",                     // The discount is 25%.
            "value": "25.00",
            "productBasedCondition": {
                "type": "PRODUCT",
                "productCondition": {
                    "criteriaList": [                 // Rule: Find items in the "Snacks" category.
                        {
                            "entity": "CATEGORY",
                            "operator": "IN",
                            "values": [
                                "Snacks"
                            ]
                        }
                    ],
                    "kpi": "QUANTITY",                // KPI: Apply the discount based on the quantity of snacks.
                    "operator": "EQUALS",             // Logic: The quantity must be an exact match.
                    "value": "2"                      // Value: The discount applies to exactly TWO snack items.
                }
            }
        }
    },
    "customerActivationRequired": false,
    "maxIssuancePerCustomer": 10,
    "promotionRestrictions": {},
    "customFieldValues": {}
}'\'''

Get 25% Off All Snacks : [PER_UNIT Action]

Requirement 1 : The brand wants to set up a product-specific discount cart promotion, "Get 25% Off All Snacks," with conditions that if a customer adds any item from the "Snacks" category to their cart, a 25% discount is applied to those specific items.
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmJ1a2w6NzYzNDkxOGFmNDjU4ZjY3MmNhZjY1ZmY=' \
--header 'Cookie: _cfuvid=m_cAUxdASkagijzS7nWq3g15w1dpuKfA-1760347164530-0.0.1.1-604800000' \
--data '{
    "name": "Buy a Drink, Get 25% Off Two Snacks",
    "type": "POS",
    "messageLabel": "Buy a Drink, Get 25% Off Up to Two Snacks!",
    "active": true,
    "priority": 1,
    "isStackable": false,
    "startDate": 1759363200000,
    "endDate": 1790985600000,
    "campaignId": "286039",
    "condition": {
        "type": "PRODUCT",                             // The trigger condition is buying a specific product.
        "productCondition": {
            "criteriaList": [
                {
                    "entity": "CATEGORY",
                    "operator": "IN",
                    "values": ["Drinks"]              // Triggers if the cart contains at least one item from the "Drinks" category.
                }
            ],
            "kpi": "QUANTITY",
            "operator": "GREATER_THAN_OR_EQUAL",
            "value": "1"
        }
    },
    "action": {
        "type": "PER_UNIT",                           // Using PER_UNIT to precisely control the reward.
        "perUnitAction": {
            "perUnitKPI": "QUANTITY",                 // The logic is based on the quantity of items.
            "perUnitDivider": "1",                    // This action logic will run once per triggering item.
            "rewardAction": {
                "type": "PRODUCT_BASED",              // The reward is a discount on specific products.
                "productBasedAction": {
                    "type": "PERCENTAGE",             // The discount is 25%.
                    "value": 25,
                    "includeItemsFromConditionSet": false, // The discount applies to snacks, NOT the drink that triggered the promo.
                    "productBasedCondition": {
                        "type": "PRODUCT",
                        "productCondition": {
                            "criteriaList": [         // Identifies the items eligible for the discount.
                                {
                                    "entity": "CATEGORY",
                                    "operator": "IN",
                                    "values": ["Snacks"] // The discount applies only to items in the "Snacks" category.
                                }
                            ],
                            "kpi": "QUANTITY",        // Use a KPI to limit how many snacks get the discount.
                            "operator": "EQUALS",     // The quantity must be an exact match.
                            "value": "2"              // The 25% discount applies to exactly TWO snack items.
                        }
                    }
                }
            }
        }
    },
    "customerActivationRequired": false,
    "maxIssuancePerCustomer": 10,
    "promotionRestrictions": {},
    "customFieldValues": {}
}'\'''

Buy 2 Shirts, Get a Tie Free : [PER_UNIT Action]

Requirement 2: The brand wants to set up a cart promotion, where a customer buys any two items from the 'Shirts' category, they are eligible to receive one item from the 'Ties' category for free.
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmJ1a2w6NzYzNDkxOjU4ZjY3MmNhZjY1ZmY=' \
--header 'Cookie: _cfuvid=m_cAUxdAS9kIldnWq3g15w1dpuKfA-1760347164530-0.0.1.1-604800000' \
--data '{
    "name": "Buy 2 Shirts, Get a Tie Free",
    "type": "POS",
    "messageLabel": "Free tie when you buy any two shirts!",
    "active": true,
    "priority": 1,
    "isStackable": false,
    "startDate": 1759363200000,
    "endDate": 1790985600000,
    "campaignId": "286039",
    "condition": {
        "type": "PRODUCT",                             // The trigger is based on specific products.
        "productCondition": {
            "criteriaList": [
                {
                    "entity": "CATEGORY",
                    "operator": "IN",
                    "values": ["Shirts"]              // Checks for items in the "Shirts" category.
                }
            ],
            "kpi": "QUANTITY",
            "operator": "GREATER_THAN_OR_EQUAL",
            "value": "2"                              // Triggers when the cart has at least two shirts.
        }
    },
    "action": {
        "type": "PER_UNIT",
        "perUnitAction": {
            "perUnitKPI": "QUANTITY",                 // Logic is based on the quantity of triggering items.
            "perUnitDivider": "2",                    // The reward action will trigger for every 2 shirts.
            "rewardAction": {
                "type": "FREE_PRODUCT",               // The reward is a free product.
                "freeProductAction": {
                    "includeItemsFromConditionSet": false, // The free item is NOT a shirt.
                    "productBasedCondition": {
                        "type": "PRODUCT",
                        "productCondition": {
                            "criteriaList": [         // Identifies the item that will be made free.
                                {
                                    "entity": "CATEGORY",
                                    "operator": "IN",
                                    "values": ["Ties"]// The free item must be from the "Ties" category.
                                }
                            ],
                            "kpi": "QUANTITY",        // Use a KPI to specify how many ties are made free.
                            "operator": "EQUALS",     // The quantity must be an exact match.
                            "value": "1"              // Exactly ONE tie will be made free.
                        }
                    }
                }
            }
        }
    },
    "customerActivationRequired": false,
    "maxIssuancePerCustomer": 10,
    "promotionRestrictions": {},
    "customFieldValues": {}
}''\'''

Any Large Pizza for $10 : [PER_UNIT Action]

Requirement 3: The brand wants to set up a cart promotion, "Any Large Pizza for $10," with conditions that if a customer buys any item from the "Large Pizzas" category, its price is set to $10.
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmRvY2RlbW86MmQ1OTNhMjI2MTk1OGE2NWI5ZjAxMzU5NGIwNDllZTk=' \
--header 'Cookie: _cfuvid=5O_PtucI3YnfDUgjgMPnHbPeEKcKJjaHWDOkNDip3Po-1760116657904-0.0.1.1-604800000' \
--data '{
  "name": "Any Large Pizza for 10 Dollars",
  "orgId": 100737,
  "type": "POS",
  "messageLabel": "Hot Deal: Any Large Pizza for just $10!",
  "active": true,
  "priority": 2,
  "isStackable": true,
  "startDate": 1759363200000,
  "endDate": 1790985600000,
  "campaignId": "286039",
  "condition": {
    "type": "CART",
    "cartCondition": {
      "kpi": "ITEMCOUNT",
      "operator": "GREATER_THAN_OR_EQUAL",
      "value": 1
    }
  },
  "action": {
    "type": "PER_UNIT",
    "perUnitAction": {
      "perUnitKPI": "QUANTITY",
      "perUnitDivider": "1",
      "rewardAction": {
        "type": "FIXED_PRICE",
        "fixedPriceAction": {
          "value": 10,
          "includeItemsFromConditionSet": false,
          "productBasedCondition": {
            "type": "PRODUCT",
            "productCondition": {
              "criteriaList": [
                {
                  "entity": "CATEGORY",
                  "values": [
                    "Large Pizzas"
                  ],
                  "operator": "IN"
                }
              ],
              "kpi": "NONE"
            }
          }
        }
      }
    }
  },
  "customerActivationRequired": false,
  "maxIssuancePerCustomer": 10,
  "promotionRestrictions": {},
  "customFieldValues": {}
}'

Work From Home Bundle - 50% Off : [PRODUCT_BASED Action]

Requirement 4: The brand wants to set up a cart promotion in which "If a customer buys a Laptop, a Mouse, and a Keyboard all in the same transaction, they get 50% off all three items."
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmJ1a2w6NzYzNDkxOGFmN4ZjY3MmNhZjY1ZmY=' \
--header 'Cookie: _cfuvid=8M02INsasy1bHCM-1760357020184-0.0.1.1-604800000' \
--data '{
    "name": "Work From Home Bundle - 50% Off",
    "type": "POS",
    "messageLabel": "Get 50% off when you buy a Laptop, Mouse, and Keyboard together!",
    "active": true,
    "priority": 0,
    "isStackable": false,
    "startDate": 1759363200000,
    "endDate": 1790985600000,
    "campaignId": "286039",
    "condition": {
        "type": "COMBO_PRODUCT",                   // The trigger requires a combination of products.
        "comboProductCondition": {
            "productConditions": [                 // All three of these conditions must be met.
                {
                    "kpi": "QUANTITY",
                    "operator": "GREATER_THAN_OR_EQUAL",
                    "value": "1",
                    "criteriaList": [
                        { "entity": "CATEGORY", "operator": "IN", "values": ["Laptops"] }
                    ]
                },
                {
                    "kpi": "QUANTITY",
                    "operator": "GREATER_THAN_OR_EQUAL",
                    "value": "1",
                    "criteriaList": [
                        { "entity": "CATEGORY", "operator": "IN", "values": ["Mice"] }
                    ]
                },
                {
                    "kpi": "QUANTITY",
                    "operator": "GREATER_THAN_OR_EQUAL",
                    "value": "1",
                    "criteriaList": [
                        { "entity": "CATEGORY", "operator": "IN", "values": ["Keyboards"] }
                    ]
                }
            ]
        }
    },
    "action": {
        "type": "PRODUCT_BASED",                     // The action is a discount on specific products.
        "productBasedAction": {
            "type": "PERCENTAGE",                     // The discount is 50%.
            "value": 50,
            "includeItemsFromConditionSet": true      // CRITICAL: This tells the action to discount the items from the main condition (the bundle).
        }
    },
    "customerActivationRequired": false,
    "maxIssuancePerCustomer": 10,
    "promotionRestrictions": {},
    "customFieldValues": {}
}''\'''

Ultimate Workstation Bundle - $1200 : [FIXED_PRICE Action]

Requirement: A tech store wants to create an "all-in-one" bundle deal. "If a customer buys a premium laptop (over $1000), a 'Pro Gaming Mouse', AND a 'Mechanical Keyboard' all in the same transaction, they get all three items for a combined, fixed price of $1200."
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmJ1a2w6NzYzNDkxOGFmNDI3MGQ3YzI4ZjU4ZjY3MmNhZjY1ZmY=' \
--header 'Cookie: _cfuvid=8M02INwaH44vLLEiiCcBIHKDdvTjqsnNjksasy1bHCM-1760357020184-0.0.1.1-604800000' \
--data '{
    "name": "Ultimate Workstation Bundle - $1200",
    "type": "POS",
    "messageLabel": "Get a Premium Laptop, Pro Mouse, and Mechanical Keyboard for just $1200!",
    "active": true,
    "priority": 1,
    "isStackable": false,
    "startDate": 1759363200000,
    "endDate": 1790985600000,
    "campaignId": "286039",
    "condition": {
        "type": "COMBO_PRODUCT",                   // The trigger requires a 3-part combo.
        "comboProductCondition": {
            "productConditions": [
                {
                    "criteriaList": [ { "entity": "CATEGORY", "operator": "IN", "values": ["Laptops"] } ],
                    "kpi": "AMOUNT",
                    "operator": "GREATER_THAN_OR_EQUAL",
                    "value": "1000"               // Part 1: A laptop valued at $1000 or more.
                },
                {
                    "criteriaList": [ { "entity": "SKU", "operator": "IN", "values": ["GM-PRO-001"] } ],
                    "kpi": "QUANTITY",
                    "operator": "GREATER_THAN_OR_EQUAL",
                    "value": "1"                  // Part 2: The specific 'Pro Gaming Mouse'.
                },
                {
                    "criteriaList": [ { "entity": "CATEGORY", "operator": "IN", "values": ["Mechanical Keyboards"] } ],
                    "kpi": "QUANTITY",
                    "operator": "GREATER_THAN_OR_EQUAL",
                    "value": "1"                  // Part 3: Any mechanical keyboard.
                }
            ]
        }
    },
    "action": {
        "type": "FIXED_PRICE",                    // The reward sets a fixed price for the items.
        "fixedPriceAction": {
            "value": 1200,                        // The fixed price for the entire bundle is $1200.
            "includeItemsFromConditionSet": true, // The price applies to the items from the main condition.
            "productBasedCondition": {
                "type": "COMBO_PRODUCT",          // This re-defines the items to satisfy the validator.
                "comboProductCondition": {
                    "productConditions": [        // Each part MUST use kpi: QUANTITY and operator: EQUALS.
                        {
                            "criteriaList": [ { "entity": "CATEGORY", "operator": "IN", "values": ["Laptops"] } ],
                            "kpi": "QUANTITY",
                            "operator": "EQUALS",
                            "value": "1"
                        },
                        {
                            "criteriaList": [ { "entity": "SKU", "operator": "IN", "values": ["GM-PRO-001"] } ],
                            "kpi": "QUANTITY",
                            "operator": "EQUALS",
                            "value": "1"
                        },
                        {
                            "criteriaList": [ { "entity": "CATEGORY", "operator": "IN", "values": ["Mechanical Keyboards"] } ],
                            "kpi": "QUANTITY",
                            "operator": "EQUALS",
                            "value": "1"
                        }
                    ]
                }
            }
        }
    },
    "customerActivationRequired": false,
    "maxIssuancePerCustomer": 10,
    "promotionRestrictions": {},
    "customFieldValues": {}
}'\'''

Any Large Pizza for $10 : [FIXED_PRICE Action]

Requirement: The brand wants to set up a cart promotion, "Any Large Pizza for $10." The condition is that if a customer buys any item from the "Large Pizzas" category, its price is set to a fixed $10.
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--data '{
    "name": "Any Large Pizza for 10 Dollar",
    "type": "POS",
    "messageLabel": "Hot Deal: Any Large Pizza for just $10!",
    "active": true,
    "priority": 2,
    "isStackable": true,
    "startDate": 1759363200000,
    "endDate": 1790985600000,
    "campaignId": "286039",
    "condition": {
        "type": "PRODUCT",
        "productCondition": {
            "criteriaList": [
                {
                    "entity": "CATEGORY",
                    "operator": "IN",
                    "values": [
                        "Large Pizzas"
                    ]
                }
            ],
            "kpi": "QUANTITY",
            "operator": "GREATER_THAN_OR_EQUAL",
            "value": "1"
        }
    },
    "action": {
        "type": "FIXED_PRICE",
        "fixedPriceAction": {
            "value": 10,
            "includeItemsFromConditionSet": true,
            "productBasedCondition": {
                "type": "PRODUCT",
                "productCondition": {
                    "criteriaList": [
                        {
                            "entity": "CATEGORY",
                            "operator": "IN",
                            "values": [
                                "Large Pizzas"
                            ]
                        }
                    ],
                    "kpi": "QUANTITY",
                    "operator": "EQUALS",
                    "value": "1"
                }
            }
        }
    },
    "customerActivationRequired": false,
    "promotionRestrictions": {},
    "customFieldValues": {}
}'\'''

Happy Hour Daily Discount : [CUSTOMER Level Restriction]

Customer level restriction requirement: A coffee shop wants to offer a "Happy Hour" cart promotion for "$2 off any drink" but wants to limit each customer to using this offer only once per day.
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmRvY2RlbW86MmQ1OTNhMjI2MTk1OllZTk=' \
--header 'Cookie: _cfuvid=m_cAUxdzS7nWq3g15w1dpuKfA-1760347164530-0.0.1.1-604800000' \
--data '{
    "name": "Happy Hour Daily Discount",          
    "type": "CUSTOMER",                          
    "messageLabel": "$2 off any drink, once per day!",
    "active": true,
    "priority": 10,
    "isStackable": false,
    "startDate": 1759363200000,
    "endDate": 1790985600000,
    "campaignId": "286039",
    "condition": {
        "type": "PRODUCT",                        
        "productCondition": {
            "criteriaList": [
                {
                    "entity": "CATEGORY",         
                    "operator": "IN",
                    "values": ["Coffee", "Tea", "Juice"] 
                }
            ],
            "kpi": "QUANTITY",
            "operator": "GREATER_THAN_OR_EQUAL",
            "value": "1"                          
        }
    },
    "action": {
        "type": "CART_BASED",
        "cartBasedAction": {
            "type": "ABSOLUTE",
            "value": 2                            
        }
    },
    "promotionRestrictions": {
        "Customer": [                             
            {
                "kpi": "REDEMPTION",
                "frequency": "DAYS",
                "minTimeBetweenRepeat": 86400000,
                "limit": "1"
            }
        ]
    }
}'\'''

Monthly Freshness Deal : [FIXED Window Restriction]

Customer level restriction requirement (fixed window): A grocery chain offers a "Monthly Freshness Deal" — customers can redeem a 10% discount up to 3 times per calendar month.
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmRvY2RlbW86MmQ1OTNhMjI2MTk1OllZTk=' \
--header 'Cookie: _cfuvid=m_cAUxdzS7nWq3g15w1dpuKfA-1760347164530-0.0.1.1-604800000' \
--data '{
    "name": "Monthly Freshness Deal",
    "type": "CUSTOMER",
    "messageLabel": "10% off on fresh produce, up to 3 times this month!",
    "active": true,
    "priority": 10,
    "isStackable": false,
    "startDate": 1759363200000,
    "endDate": 1790985600000,
    "campaignId": "286039",
    "condition": {
        "type": "PRODUCT",
        "productCondition": {
            "criteriaList": [
                {
                    "entity": "CATEGORY",
                    "operator": "IN",
                    "values": ["Produce", "Dairy", "Bakery"]
                }
            ],
            "kpi": "QUANTITY",
            "operator": "GREATER_THAN_OR_EQUAL",
            "value": "1"
        }
    },
    "action": {
        "type": "CART_BASED",
        "cartBasedAction": {
            "type": "PERCENTAGE",
            "value": 10
        }
    },
    "promotionRestrictions": {
        "Customer": [
            {
                "kpi": "REDEMPTION",
                "windowType": "OVERALL",
                "limit": "20"
            },
            {
                "kpi": "REDEMPTION",
                "windowType": "FIXED",
                "fixedWindowConfig": {
                    "cycleType": "CALENDAR_MONTH"
                },
                "limit": "3"
            }
        ]
    }
}'\'''

25% Off Sitewide (Capped at $100) : [CART Level Restriction]

Cart level restriction requirement: A fashion retailer offers a "25% Off Everything" cart promotion but wants to cap the maximum discount at $100 per transaction.
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmRvY2RlbW86MmQ1OOGE2NWI5ZjAxMzU5NGIwNDllZTk=' \
--header 'Cookie: _cfuvid=m_cAUxdAzS7nWq3g15w1dpuKfA-1760347164530-0.0.1.1-604800000' \
--data '{
    "name": "25% Off Sitewide (Capped at $100)",    
    "type": "POS",                                
    "messageLabel": "Get 25% off your order! Max discount $100.",
    "active": true,
    "priority": 5,
    "isStackable": false,
    "startDate": 1759363200000,
    "endDate": 1790985600000,
    "campaignId": "286039",
    "condition": {
        "type": "CART",
        "cartCondition": {
            "kpi": "SUBTOTAL",
            "operator": "GREATER_THAN",
            "value": 0                            
        }
    },
    "action": {
        "type": "CART_BASED",
        "cartBasedAction": {
            "type": "PERCENTAGE",                 
            "value": 25                           
        }
    },
    "promotionRestrictions": {
        "Cart": [                                 
            {
                "kpi": "DISCOUNT",                
                "limit": "100"                    
            }
        ]
    }
}'\''
'

Grand Opening - First 1000 Customers : [PROMOTION Level Restriction]

Promotion Level Restriction requirement: A new store is launching with a "Grand Opening" offer where the first 1,000 customers get $10 off.
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmRvY2RlbW86MmQ1OTN5ZjAxMzU5NGIwNDllZTk=' \
--header 'Cookie: _cfuvid=m_cAUxdAS9kIldmF3g15w1dpuKfA-1760347164530-0.0.1.1-604800000' \
--data '{
    "name": "Grand Opening - First 1000 Customers", 
    "type": "POS",
    "messageLabel": "$10 off for our first 1000 customers!",
    "active": true,
    "priority": 1,                                
    "isStackable": false,
    "startDate": 1759363200000,
    "endDate": 1790985600000,
    "campaignId": "286039",
    "condition": {
        "type": "CART",
        "cartCondition": {
            "kpi": "SUBTOTAL",
            "operator": "GREATER_THAN_OR_EQUAL",
            "value": 10                           
        }
    },
    "action": {
        "type": "CART_BASED",
        "cartBasedAction": {
            "type": "ABSOLUTE",
            "value": 10                           
        }
    },
    "promotionRestrictions": {
        "Promotion": [                            
            {
                "kpi": "REDEMPTION",              
                "limit": "1000"                   
            }
        ]
    }
}'\'''

15% Off First Order - Single-Use Codes : [CODE Level Restriction]

Code level restriction requirement: A company provides new subscribers with a unique, single-use code for "15% off their first order."
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmRvY2RlbWjI2MTk1OGE2NWI5ZjAxMzU5NGIwNDllZTk=' \
--header 'Cookie: _cfuvid=m_cAUxdAagijzS7nWq3g15w1dpuKfA-1760347164530-0.0.1.1-604800000' \
--data '{
    "name": "15% Off First Order - Single-Use Codes", 
    "type": "CODE",                              
    "messageLabel": "Welcome! Here is 15% off your first order.",
    "active": true,
    "priority": 0,
    "isStackable": false,
    "startDate": 1759363200000,
    "endDate": 1790985600000,
    "campaignId": "286039",
    "condition": {
        "type": "CART",
        "cartCondition": {
            "kpi": "SUBTOTAL",
            "operator": "GREATER_THAN",
            "value": 0                            
        }
    },
    "action": {
        "type": "CART_BASED",
        "cartBasedAction": {
            "type": "PERCENTAGE",
            "value": 15                           
        }
    },
    "promotionRestrictions": {
        "Code": [                                 
            {
                "kpi": "REDEMPTION",              
                "limit": "1"                      
            }
        ]
    }
}'\'''

Milestone Reward - $50 Voucher : [EARNING Criteria]

Requirement: brand wants to setup a cart promotion where a customer reaches milestone 12345, they get a $50 voucher.
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmJNzYzNDkxOGFU4ZjY3MmNhZjY1ZmY=' \
--header 'Cookie: _cfuvid=m_cAUxdASmg15w1dpuKfA-1760347164530-0.0.1.1-604800000' \
--data '{
    "name": "Milestone Reward - $50 Voucher",
    "type": "EARNING",
    "messageLabel": "Congratulations! You'\''ve earned a $50 voucher.",
    "active": true,
    "priority": 1,
    "isStackable": false,
    "startDate": 1760332800000,
    "endDate": 1792031999000,
    "campaignId": "286039",
    "condition": {
        "type": "CART",
        "cartCondition": {
            "kpi": "SUBTOTAL",
            "operator": "GREATER_THAN_OR_EQUAL",
            "value": "50.000000"
        }
    },
    "action": {
        "type": "CART_BASED",
        "cartBasedAction": {
            "type": "ABSOLUTE",
            "value": "50.000000"
        }
    },
    "earningCriteria": {
        "active": true,
        "earnedFromType": "MILESTONE",
        "eventType": "TransactionAdd",
        "criteriaName": "Milestone_Achievement_12345",
        "criteriaDsl": "true",
        "criteriaDslJson": "{ \"arity\":\"literal\", \"value\":\"true\", \"type\":\"boolean:primitive\" }",
        "groupId": 1,
        "milestoneId": 12345
    }
}'

New Store Opening Special : [STORE Criteria]

Requirement: The brand wants to offer a "15% Off Store Opening Special" that is only valid at their two new store locations (IDs: 101 and 102).
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmJ1a2w6NzYzNDkxOGFmN4ZjU4ZjY3MmNhZjY1ZmY=' \
--header 'Cookie: _cfuvid=Fl.R3pP_RtM6ZaoUweo7cHOk4zcxuRg-1761063598566-0.0.1.1-604800000' \
--data '{
    "name": "New Store Opening Special",
    "type": "POS",
    "startDate": 1761019200000,
    "endDate": 1764565199999,
    "campaignId": 286039,
    "storeCriteria": {
        "type": "STORE",
        "values": [101, 102],
        "operator": "IN"
    },
    "condition": {
        "type": "CART",
        "cartCondition": {
            "kpi": "SUBTOTAL",
            "operator": "GREATER_THAN",
            "value": 0
        }
    },
    "action": {
        "type": "CART_BASED",
        "cartBasedAction": {
            "type": "PERCENTAGE",
            "value": 15
        }
    }
}'

Weekday Happy Hour : [TIME Criteria]

Requirement: The brand wants a "Weekday Happy Hour" offering 20% off from 4:00 PM to 5:59 PM every Monday through Friday.
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmJ1a2w6NzYzNDkxOGFmNDIZjU4ZjY3MmNhZjY1ZmY=' \
--header 'Cookie: _cfuvid=Fl.R3pP_RilU3aoUweo7cHOk4zcxuRg-1761063598566-0.0.1.1-604800000' \
--data '{
    "name": "Weekday Happy Hour",
    "type": "POS",
    "startDate": 1761019200000,
    "endDate": 1764565199999,
    "campaignId": "286039",
    "timeCriteria": {
        "startTime": "16:00",                 
        "durationInHours": "2",               
        "repeatFrequency": "WEEKS",
        "weeklyValues": [
            "MONDAY",
            "TUESDAY",
            "WEDNESDAY",
            "THURSDAY",
            "FRIDAY"
        ]
    },
    "condition": {
        "type": "PRODUCT",
        "productCondition": {
            "criteriaList": [ { "entity": "CATEGORY", "operator": "IN", "values": ["Beverages"] } ],
            "kpi": "QUANTITY",
            "operator": "GREATER_THAN_OR_EQUAL",
            "value": "1"
        }
    },
    "action": {
        "type": "PRODUCT_BASED",
        "productBasedAction": {
            "type": "PERCENTAGE",
            "value": "20",
            "includeItemsFromConditionSet": true
        }
    }
}'

Gold Tier Exclusive : [SUPPLEMENTARY Criteria]

Requirement: Offer an exclusive "10% off for Gold Tier members" (Tier ID 99) who are part of the main loyalty program (ID 123).
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmJ1a2w6NzYzNDkxOGFmND3YzI4ZjU4ZjY3MmNhZjY1ZmY=' \
--header 'Cookie: _cfuvid=Fl.R3pP_RilU3UFbHOk4zcxuRg-1761063598566-0.0.1.1-604800000' \
--data '{
    "name": "Gold Tier Exclusive",
    "type": "CUSTOMER",
    
    "startDate": 1761019200000,
    "endDate": 1764565199999,
    "campaignId": "286039",
    "supplementaryCriteria": {
        "loyaltyProgramId": 123,
        "programType": "TIER",
        "partnerProgramId": 99
    },
    "condition": {
        "type": "CART",
        "cartCondition": { "kpi": "SUBTOTAL", "operator": "GREATER_THAN", "value": 0 }
    },
    "action": {
        "type": "CART_BASED",
        "cartBasedAction": { "type": "PERCENTAGE", "value": 10 }
    }
}'

Response

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json