Update Cart Promotion

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

This API updates an existing cart promotion's configuration.

  • When you call this API, the system replaces the existing promotion configuration with the new values you provide in the request body. You can update fields such as the promotion name, conditions, actions, validity dates, restrictions, and status.
  • To activate or deactivate a promotion without updating its configuration, use the Activate Cart Promotion or Deactivate Cart Promotion APIs instead.

Example request

curl --location --request PUT 'https://eu.api.capillarytech.com/api_gateway/v1/promotions/68de8ef2f398ae3dc8802e20' \
--header 'Content-Type: application/json' \
--header 'X-CAP-API-AUTH-ORG-ID: 100232' \
--header 'user-agent: pyapps_auto_Promotion_Engine_Eucrm_Smoke' \
--header 'Authorization: Basic bmFtYW5fZG9jOxxxxxxxxjZlY2I2MmEy' \
--data '{
    "name": "CODE_Promotion_Test_17573886",
    "priority": 0,
    "active": true,
    "messageLabel": "test!!",
    "type": "CODE",
    "condition": {
      "type": "CART",
      "cartCondition": {
        "kpi": "SUBTOTAL",
        "operator": "EQUALS",
        "value": 250.0
      }
    },
    "action": {
      "type": "CART_BASED",
      "cartBasedAction": {
        "type": "ABSOLUTE",
        "value": 25.0
      }
    },
    "createdBy": 70707,
    "createdOn": 0,
    "lastUpdatedBy": 70707,
    "startDate": "1857388651000",
    "endDate": "1857475051000",
    "campaignId": 39077,
    "mode": "DISCOUNT",
    "promotionRestrictions": {
      "Code": [
        {
          "kpi": "REDEMPTION",
          "limit": 1
        }
      ]
    },
    "isStackable": false
  }'

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

Path parameters

FieldTypeRequiredDescription
Promotion idStringYesIndicates the unique identifier of the promotion. This is returned in the data.id field of the promotion payload during promotion creation.

Body parameters

This table describes the top-level fields required to create any type of cart promotion.

FieldTypeRequiredDescriptionUpdatable
nameStringYesIndicates a unique name of the cart promotion. Character limit: 1-50.Yes
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.No
messageLabelStringOptionalSpecifies a label for the cart promotion message. There is no character limit set for labels. Example: SummerSale2025.Yes
activeBooleanYesIndicates if the cart promotion is active. Supported values: true, false. Default value is true. Note: Use the activate/deactivate endpoints to change status.No
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.Yes
isStackableBooleanYesIndicates whether this cart promotion can be used with other cart promotions. Supported values: true, false. Default: false.Yes
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.Yes
startDateISOStringConditionalDefines 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.Yes
endDateLongConditionalSpecifies 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.Yes
endDateISOStringConditionalDefines 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.Yes
campaignIdStringYesSpecifies the unique identifier of the campaign that the cart promotion is linked to. Example: 12345. There is no validation for the campaign ID.Yes
conditionObjectYesSpecifies the rules that determine how the cart promotion applies.Yes
..typeEnumYesCART: Conditions based on the entire shopping cart's properties, like its total value or item count. Example: “Get $10 off when your subtotal is over $100.” TENDER: Conditions based on the customer's specific method of payment. Constrain: A TENDER condition must be paired with a TENDER action, and vice-versa. COMBO_PRODUCT: Conditions based on multiple specific products being purchased together. PRODUCT: Conditions based on a specific group of products, evaluated by quantity or total value. PAYMENT_MODE_SCOPE: Conditions based on a specific payment method used with a nested PRODUCT or CART condition. PAYMENT_MODE_COMBO_PRODUCT: Conditions based on a specific payment method used with a nested COMBO_PRODUCT condition. PAYMENT_MODE: Conditions based solely on a specific payment method, without any nested condition. See the “Condition Objects” tables below for the full structure.Yes
actionObjectYesSpecifies what happens when the cart promotion is applied.Yes
customerActivationRequiredBooleanOptionalIndicates if a customer must opt-in for a cart promotion before it can be redeemed. If true, the cart promotion is issued as INACTIVE and requires a customer action to become ACTIVE. Constraint: Cannot be changed if the promotion has already started (StartDate < Now).Conditional
maxIssuancePerCustomerIntegerOptionalDefines the total number of times this cart promotion can be issued to a single customer.Yes
promotionRestrictionsObjectOptionalDefines usage limits on the cart promotion, grouped by level: Customer, Cart, Promotion, Code. See the “Promotion Restrictions Object” table below for the full structure.Yes
customFieldValuesObjectOptionalDefines a key-value map for storing custom metadata. The structure is user-defined (e.g., {“key”: “value”}).Yes
earningCriteriaObjectConditionalDefines the conditions for earning a reward. Required when type is EARNING. See the “Earning Criteria Object” table below for the full structure.Yes
maxEarningPerCustomerIntegerOptionalSpecifies the maximum number of times a customer can earn the reward from an EARNING type cart promotion.Yes
storeCriteriaObjectOptionalLimits the promotion to specific stores, zones, or concepts. See the “Store Criteria Object” section for the full structure.Yes
timeCriteriaObjectOptionalRestricts the promotion to specific days of the week or hours of the day. See the “Time Criteria Object” section for the full structure.Yes
supplementaryCriteriaObjectOptionalTargets the promotion to customers in a specific loyalty tier or subscription program. See the “Supplementary Criteria Object” section for the full structure.Yes

Condition Objects (Rules that determine how the cart promotion applies)

The condition object must contain a type field (CART, TENDER, or COMBO_PRODUCT) which determines its structure.

Cart promotion with the cart promotions condition type as CART

FieldTypeRequiredDescriptionUpdatable
.cartConditionObjectYesDefines rules that apply to the entire shopping cart.Yes
..kpiEnumYesMetric to evaluate. Supported: SUBTOTAL, ITEMCOUNT.Yes
..operatorEnumYesComparison operator. Supported: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUAL.Yes
..valueNumberYesThe number to compare against. Example: 250.Yes

Example request

Requirement: The brand has 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.

Update requirement : Update the discount value to $25

curl --location --request PUT 'https://eu.api.capillarytech.com/api_gateway/v1/promotions/691db5e8d39e256f754adebe' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmRvY2RlbW86MmQ1OTNhMjI2MTk1OGE2NWI5ZjAxMzU5NGIwNDllZTk=' \
--header 'Cookie: _cfuvid=YV2a56AO81MbffOHN.iaUZSHrzW2CTxKsIRt7smuhRk-1763554178883-0.0.1.1-604800000' \
--data '{
  "name": "Spend 100 Get 10 Offer",
  "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": 25
    }
  },
  "customerActivationRequired": true,
  "maxIssuancePerCustomer": 1,
  "promotionRestrictions": {},
  "customFieldValues": {}
}'

Cart promotion with the cart promotions condition type as TENDER

FieldTypeRequiredDescriptionUpdatable
.tenderConditionObjectYesDefines rules based on the customer's method of payment.Yes
..tenderModesArrayYesLists specific payment modes that trigger this condition.Yes
...typeStringYesSpecifies the general payment category. Supported values: CARD, CASH, PAYMENT_VOUCHER.Yes
...identifiersArrayConditionalLists exact payment identifiers. For example, [“VISA_CARD”]. Required when the type is CARD or PAYMENT_VOUCHER.Yes
..conditionObjectConditionalDefines an additional condition that must also be met for this rule to apply. Required when tenderModes[].type is CARD or CASH. Must not be set when tenderModes[].type is PAYMENT_VOUCHER, as the condition is inherited from the voucher. Example - You want a cart promotion to apply only when a customer pays by card and the cart subtotal is greater than $500.Yes
...typeEnumYesSpecifies the type of nested condition. Supported values: CART, PRODUCT.Yes
...cartConditionObjectConditionalDefines rules based on specific products. Required when condition.type is CART. Example: You want a cart promotion to apply only when the customer pays by cash and buys at least 2 units of a specific product. Defines rules based on the overall cart, such as subtotal or item count. Example: Apply a $20 discount when the customer pays with a credit card and the cart subtotal ≥ $50.Yes
....kpiEnumYesDefines the metric to evaluate the cart. Supported values: SUBTOTAL, ITEMCOUNT.Yes
....operatorEnumYesDefines how to compare the metric. Supported values: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUAL.Yes
....valueNumberYesThe number to compare against.Yes
...productConditionObjectConditionalDefines rules based on specific products. Required when condition.type is PRODUCT. Example: Apply a $100 discount when the customer pays with a VISA card and buys at least 2 items from the “Paint Supplies” category.Yes
....criteriaListArrayYesLists criteria that identify the products targeted by this condition.Yes
....kpiEnumYesSpecifies the product-level metric. Supported values: NONE, QUANTITY.Yes
....operatorEnumConditionalDefines how to compare the product metric. Supported value: EQUALS.Yes
....valueStringConditionalSpecifies the target value for the comparison.Yes

Example request

Requirement: 1

The brand established a cart promotion, "Pay with VISA card, Get $20 Off on Orders Above $100," which stipulated that if a customer's cart subtotal was $\geq $100$ and they paid with a VISA card, an absolute discount of $$20$ would be applied. The brand now wants to update the promotion to "Cash Discount on Paint Supplies," by changing the tender condition to Cash, requiring the purchase of at least one item from the "Paint Supplies" category, and setting the discount value to $$5$.

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": {}
}'
Requirement 2:

The brand has 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 pays with cash, an absolute discount of $$5$ is applied. The brand now wants to update the promotion to "Cash Discount on Paint Supplies," requiring the customer to pay with Cash and purchase at least one item from the "Paint Supplies" category to receive a fixed discount of $5.

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": {}
}'

Cart promotion with the cart promotions condition type as COMBO_PRODUCT

FieldTypeRequiredDescriptionUpdatable
.comboProductConditionObjectYesDefines rules that require specific product combinations to qualify for the cart promotion. Example: A customer must buy one brush and one tube of Brand A toothpaste.Yes
..productConditionsArrayYesList of product condition objects. All listed conditions must be met for the cart promotion to apply. The maximum number of product conditions that you can set is 100.Yes
...kpiEnumYesMetric used to evaluate each condition. Supported values: NONE, QUANTITY. QUANTITY checks how many qualifying products are in the cart.Yes
...operatorEnumConditionalComparison logic for evaluating the metric. Supported values: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUAL.Yes
...valueStringConditionalTarget value for the comparison. The value should in number. If kpi is QUANTITY, operator is GREATER_THAN_OR_EQUAL, and value is 2, the condition applies when the cart contains two or more qualifying products.Yes
...criteriaListArrayYesDefines which products or attributes are part of the condition. Example: Products where entity = PRODUCT_NAME and values = ["Paint Brush"]. You can specify up to 250 SKUs (values) in a single condition.Yes
....entityStringYesProduct attribute to evaluate. Example: PRODUCT_NAME, BRAND, or CATEGORY. This should match with the line item names in the Add Transaction API payload.Yes
....operatorEnumYesDefines how attribute values are compared. Supported values: IN, NOT_IN. Example: IN checks if the product belongs to the specified brand or category.Yes
....valuesArrayYesList of attribute values to match against the entity.Yes

Example request

Requirement:

The brand has 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. The brand now wants to update the promotion to require the purchase of 2 Burgers and 2 Fries, and increase the discount value to $20%$.

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": "20.00",
      "productBasedCondition": {
        "type": "COMBO_PRODUCT",
        "comboProductCondition": {
          "productConditions": [
            {
              "kpi": "QUANTITY",
              "operator": "GREATER_THAN_OR_EQUAL",
              "value": "2",
              "criteriaList": [
                {
                  "entity": "CATEGORY",
                  "operator": "IN",
                  "values": [
                    "Burgers"
                  ]
                }
              ]
            },
            {
              "kpi": "QUANTITY",
              "operator": "GREATER_THAN_OR_EQUAL",
              "value": "2",
              "criteriaList": [
                {
                  "entity": "CATEGORY",
                  "operator": "IN",
                  "values": [
                    "Fries"
                  ]
                }
              ]
            }
          ]
        }
      }
    }
  },
  "customerActivationRequired": true,
  "maxIssuancePerCustomer": 1,
  "promotionRestrictions": {},
  "customFieldValues": {}
}'

Cart promotion with the cart promotion's condition type as PRODUCT

This condition type triggers a cart promotion based on the presence, quantity, or total value of specific products or product groups within the cart.

FieldTypeRequiredDescriptionUpdatable
.productConditionObjectYesDefines rules that apply to specific products in the shopping cart.Yes
..criteriaListArrayYesDefines the specific products that must be present in the cart to satisfy the condition.Yes
...entityStringYesThe product attribute to evaluate. Example: SKU, BRAND, or CATEGORY.Yes
...operatorEnumYesDefines how attribute values are compared. Supported: IN, NOT_IN.Yes
...valuesArrayYesList of attribute values to match against the entity. You can specify up to 250 SKUs (values) in a single condition.Yes
..kpiEnumYesMetric used to evaluate the matching products. Supported: NONE, QUANTITY, AMOUNT.Yes
..operatorEnumConditionalComparison logic for the metric. Supported: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUAL. Required if kpi is not NONE.Yes
..valueStringConditionalTarget value for the comparison. Required if kpi is not NONE.Yes
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. The brand now wants to update the promotion to "Buy 3 Paint Supplies Get 25% Off," requiring the purchase of exactly 3 items from the "Paint Supplies" category to receive a fixed discount of $15.

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": "EQUALS",
            "value": "3"
        }
    },
    "action": {
        "type": "CART_BASED",
        "cartBasedAction": {
            "type": "ABSOLUTE",
            "value": 25
        }
    },
    "customerActivationRequired": false,
    "maxIssuancePerCustomer": 1,
    "promotionRestrictions": {},
    "customFieldValues": {}
}'\'''

Cart promotion with condition type PAYMENT_MODE_SCOPE

This condition type combines payment using Points with a product or cart condition that will trigger the promotion benefits. For example, "Pay with Points to get 60% off on ChocoBrand biscuit."

FieldTypeRequiredDescriptionUpdatable
.paymentModeScopeConditionROObjectYesDefines the main container object for a payment condition.Yes
..paymentModeConditionROObjectYesDefines the specific payment method rules that will trigger the promotion.Yes
...paymentModeSelectionCriteriaROObjectYesSpecifies the specific criteria for selecting the payment mode.Yes
....operatorEnumYesIndicates the logical operator for the values list. Supported values: IN: Contains at least one item from the specified values. NOT_IN: Does not contain item from the specified values.Yes
....valuesArrayYesDefines an array of payment mode objects that are allowed.Yes
.....typeStringYesSpecifies the category of the payment method. Supported: CARD. CARD is always used as a payment type when the payment method is Points.Yes
.....identifiersArrayYesSpecifies the payment identifier. Supported: POINTSYes
..conditionObjectYesIndicates a standard subcondition/nested condition that must also be met for the promotion to be applied.Yes
...typeEnumYesDefines the type of the nested condition. Supported: PRODUCT: Condition is based on a specific product. CART: Condition is based on the overall cart.Yes
...productConditionObjectConditionalSpecifies the product condition details. Required if the condition type is PRODUCT.Yes
....criteriaListArrayYesDefines the specific products that must be in the cart to satisfy the condition.Yes
.....entityStringYesSpecifies the product attribute to evaluate. Supported values: SKU, BRAND, ATTRIBUTE, CATEGORY.Yes
.....operatorEnumYesDefines how attribute values are compared. Supported: IN, NOT_IN.Yes
.....valuesArrayYesDefines values to match against the product. Supports up to 250 values.Yes
....kpiEnumYesDefines the metric used to evaluate the matching products. Supported: NONE, QUANTITY, AMOUNT.Yes
....operatorEnumConditionalDefines the comparison logic for the metric. Required if KPI is not NONE. Supported: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUAL.Yes
....valueNumberConditionalSpecifies the target value for the comparison. Required if KPI is not NONE.Yes
...cartConditionObjectConditionalDefines the cart condition details. Required if ..condition.type is CART.Yes
....kpiEnumYesDefines the metric to evaluate the entire cart. Supported: SUBTOTAL, ITEMCOUNT.Yes
....operatorEnumYesIndicates the comparison operator. Supported: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUAL.Yes
....valueNumberYesSpecifies the number to compare the cart's KPI against.Yes

Constraints:

  • The promotion's top-level mode must be DISCOUNT.
  • The nested condition.type must be PRODUCT or CART.
  • CART_BASED action is not allowed. Use PRODUCT_BASED or PER_UNIT.

Cart promotion with condition type PAYMENT_MODE_COMBO_PRODUCT

This condition type combines payment using Points with a combo product condition. For example, "Buy Coke & ChocoBrand biscuit with Points payment mode, and get 50% off on Maggi noodles."

FieldTypeRequiredDescriptionUpdatable
.paymentComboProductConditionROObjectYesSpecifies the main container object for a payment based combo condition.Yes
..tenderConditionObjectYesDefines the specific payment method rules required to trigger the promotion.Yes
...paymentModeSelectionCriteriaROObjectYesSpecifies the criteria for selecting the payment mode.Yes
....operatorEnumYesIndicates the logical operator for the values list. Supported values: IN, NOT_IN.Yes
....valuesArrayYesDefines an array of payment mode objects to check against.Yes
.....typeStringYesSpecifies the category of the payment method. Supported: CARD.Yes
.....identifiersArrayYesDefines the specific payment identifiers. Supported: POINTS.Yes
..comboProductConditionObjectYesDefines the combo product condition. All product conditions listed inside must be fulfilled for the promotion to be triggered.Yes
...productConditionsArrayYesDefines the list of product rules that make up the combo. Each object in this list is one part of the combo.Yes
....criteriaListArrayYesDefines the specific products that must be in the cart for this part of the combo.Yes
.....entityStringYesSpecifies the product attribute to evaluate. Supported: SKU, BRAND, ATTRIBUTE, CATEGORY.Yes
.....operatorEnumYesDefines how attribute values are compared. Supported: IN, NOT_IN.Yes
.....valuesArrayYesDefines values to match against the product. Supports up to 250 values.Yes
....kpiEnumYesSpecifies the metric for evaluating the matching products. Supported: NONE, QUANTITY, AMOUNT.Yes
....operatorEnumConditionalComparison logic for the kpi. Required if kpi is not NONE. Supported: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUAL.Yes
....valueNumberConditionalSpecifies the target value. Required if kpi is not NONE.Yes

Constraints:

  • The promotion's top-level mode must be DISCOUNT.
  • CART_BASED action is not allowed. Use PRODUCT_BASED, FREE_PRODUCT, FIXED_PRICE, or PER_UNIT.

Cart promotion with condition type PAYMENT_MODE

This condition type triggers a cart promotion based solely on the payment method used, without requiring any nested product or cart condition. For example, "Pay with Points to get 10% off your order."

FieldTypeRequiredDescriptionUpdatable
.paymentModeConditionROObjectYesDefines the payment method rules that will trigger the promotion.Yes
..paymentModeSelectionCriteriaROObjectYesSpecifies the criteria for selecting the payment mode.Yes
...operatorEnumYesIndicates the logical operator for the values list. Supported values: IN, NOT_IN.Yes
...valuesArrayYesDefines the list of payment mode identifiers to match against. Supports up to 100 values. Example: ["POINTS"]Yes

Constraints:

  • The promotion's top-level mode must be DISCOUNT.
  • CART_BASED and PER_UNIT actions are not supported. Use PAYMENT_MODE_SCOPE or PAYMENT_MODE_COMBO_PRODUCT if you need a per-unit reward.

Note

  • A PRODUCT condition checks for one set of products that meet a single criteria.
  • A COMBO_PRODUCT condition checks for multiple, distinct sets of products that must all be present in the cart together.

Action Objects (specifies what happens when the cart promotion is applied)

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 Types and Scenarios

1. CART_BASED

Applies a discount to the entire shopping cart when a cart-level condition is met.
Example: Give a $200 discount when the cart subtotal is $1,000 or more.

The condition checks the cart’s total value; the action applies the discount to the entire cart.

2. TENDER

Applies a discount based on the customer’s payment method.
Example: Give a $100 discount when the customer pays using a VISA credit card.

The condition checks the payment type; the action applies a discount tied to that payment.

3. PRODUCT_BASED

A product-based action is used when the cart promotion applies a discount or reward action to specific products in the cart—not to the entire cart or a payment method. This action type is most commonly used for item-level offers, where the benefit depends on the products purchased or their attributes (such as category, brand, or quantity).

When to use it
  • Apply a percentage or fixed amount discount on certain products.
  • Offer discounts only on products that meet specific criteria, such as category, brand, or SKU.
  • Reward a related product set, for example, “Buy product A, get a discount on product B.”
  • Run category-level or brand-level cart promotions.

4. FREE_PRODUCT

Makes one or more specific items in the cart free of charge. This is the ideal action for "Buy X, Get Y Free" cart promotions.

Example: Buy a laptop and get a computer mouse for free.

The system identifies the product to be discounted and reduces its price to zero.

5. FIXED_PRICE

Changes the price of specific items to a set amount, regardless of their original price.

Example: Get any large pizza for $10.

The system finds the qualifying item and overrides its original price with the new fixed price.

6. PER_UNIT

Applies a reward action repeatedly for each qualifying group of items or value.
Example: Buy 2 Paint Buckets, get 1 Paint Brush free for every 2 buckets.

The condition checks the total quantity or amount, and the action applies a recurring reward action for each multiple of a defined value.

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.

When the cart promotions action type is CART_BASED

FieldTypeRequiredDescription
.cartBasedActionObjectYesDefines a reward action or discount that applies to the entire shopping cart once the cart promotion’s condition is met. It’s used when the benefit is calculated at the cart level, not per product or payment type. Example:Apply a $200 discount when the cart subtotal is $1,000 or more.
..typeEnumYesType of action. Supported value: ABSOLUTE (fixed monetary discount).
..valueNumberYesFixed monetary amount for the discount.
Requirement:

The brand has 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. The brand now wants to update the promotion to "Spend $200, Get $20 Off," with the condition that if the cart's subtotal is greater than or equal to $$200$, a fixed discount of $$20$ 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 Z2VvcmdlLmRvY2RlbW81OGE2NWI5ZjAxMzU5NGIwNDllZTk=' \
--data '{
  "name": "Spend 200 Get 20 Off",
  "orgId": 100737,
  "type": "CUSTOMER",
  "messageLabel": "Get $20 off on orders over $200!",
  "active": true,
  "priority": 0,
  "isStackable": false,
  "startDate": 1759363200000,
  "endDate": 1790985600000,
  "campaignId": "286039",
  "condition": {
    "type": "CART",
    "cartCondition": {
      "kpi": "SUBTOTAL",
      "operator": "GREATER_THAN_OR_EQUAL",
      "value": 200
    }
  },
  "action": {
    "type": "CART_BASED",
    "cartBasedAction": {
      "type": "ABSOLUTE",
      "value": 20
    }
  },
  "customerActivationRequired": true,
  "maxIssuancePerCustomer": 1,
  "promotionRestrictions": {},
  "customFieldValues": {}
}'

When the cart promotions action type is TENDER

FieldTypeRequiredDescriptionUpdatable
.tenderBasedActionObjectYesDefines a reward action or discount that applies when the customer uses a specific payment method (tender) during checkout. It’s used for conditions tied to cards or cash payments. Apply a $100 discount when the customer pays using a VISA credit card.Yes
..typeEnumYesSpecifies how the discount or reward action amount is calculated. Supported value: ABSOLUTE, PERCENTAGE.Yes
..valueStringYesSpecifies the amount discount to apply in numbers. Example: If the value is $20, the system applies a fixed discount for example, $20 off.Yes
Requirement

The brand has 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. The brand now wants to update the promotion by changing the fixed discount value from $20 to $30.

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": "30"
    }
  },
  "customerActivationRequired": true,
  "maxIssuancePerCustomer": 1,
  "promotionRestrictions": {},
  "customFieldValues": {}
}'

When the cart promotions action type is PRODUCT_BASED

FieldTypeRequiredDescriptionUpdatable
.productBasedActionObjectYesDefines a discount or reward action applied to specific products that meet defined criteria. Example: Apply a 10% discount on Paint Supplies.Yes
..typeEnumYesDefines how the discount is calculated. Supported values: ABSOLUTE (fixed amount), PERCENTAGE (percentage-based). Example: type = PERCENTAGE applies 10% off.Yes
..valueNumberYesSpecifies the amount or percentage of the discount. Example: value = 10 applies a 10% discount if type is PERCENTAGE, or $10 off if type is ABSOLUTE.Yes
..includeItemsFromConditionSetBooleanYesControls whether the action benefit applies to the same items that satisfied the cart promotion trigger (true) or to a different target set defined by productBasedCondition (false). Example (true): “Buy 10 A, get $100 off those 10 A.” Example (false): “Buy 10 A, get $100 off B.”Yes
..productBasedConditionObjectYesDefines the set of products to which the action's benefit will be applied. The main condition decides when the cart promotion should trigger and the action-level condition here decides which products and the benefit applies to once it triggers.Yes
...typeEnumYesSpecifies how target products are grouped. Supported values: PRODUCT, COMBO_PRODUCT. Example: COMBO_PRODUCT targets combinations like Paint + Brush.Yes
...productConditionObjectConditionalDefines target products using product-level rules. Required if type = PRODUCT. Example: Apply discount to products in the “Paint Supplies” category.Yes
....criteriaListArrayYesList of rules that specify which products are eligible. Example: entity = CATEGORY, values = [“Paint Supplies”].Yes
....kpiEnumYesMetric used for filtering products. Supported values: NONE, QUANTITY. Example: QUANTITY = 2 means at least two products are required.Yes
....operatorEnumConditionalDefines how the KPI is compared. Supported value: EQUALS. Example: EQUALS ensures the quantity exactly matches the target value.Yes
....valueStringConditionalSpecifies the target number or value for the comparison. This should be defined in numbers. Example: value = “2” means exactly two items must be purchased.Yes
...comboProductConditionObjectConditionalDefines the set of product combinations that receive the discount or reward action when the cart promotion is applied. It specifies which combo of products — such as a bundle or paired items — will get the benefit, based on the action’s configuration. If includeItemsFromConditionSet is true, the discount applies to the same combo that triggered the cart promotion. If includeItemsFromConditionSet is false, the discount applies to a different combo defined here.Yes
....productConditionsArrayYesList of product condition objects. All listed conditions must be met for the discount to apply. Example: One Paint Brush and one ColorCo product.Yes
.....kpiEnumYesMetric used for evaluating combo conditions. Supported values: NONE, QUANTITY. Example: QUANTITY = 1 ensures each product is present at least once.Yes
.....operatorEnumConditionalLogical operator. Supported values: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUAL.Yes
.....valueStringConditionalNumeric target for KPI comparison. This should be defiend in numbers. Example: value = “1” means at least one item must be present.Yes
.....criteriaListArrayYesDefines which products or attributes are included in the combo. Example: entity = PRODUCT_NAME, values = [“Paint Brush”].Yes
......entityStringYesProduct attribute to evaluate (e.g., SKU).Yes
......operatorEnumYesDefines how the attribute values are compared. Supported values: IN, NOT_IN. Example: IN checks if the product belongs to “Paint Supplies.”Yes
......valuesArrayYesList of attribute values to match for inclusion. Example: values = [“Paint Brush”, “ColorCo”].Yes
Requirement 1:

The brand has set up a cart promotion where if a customer buys any laptop, they receive a $50%$ discount on an accessory bundle, which is defined as exactly one mouse and one keyboard, with the stipulation that if the cart contains more than one mouse or keyboard, the discount should only apply to one of each. The brand now wants to update the promotion by changing the discount value from $50%$ to $60%$.

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": "60",                            
            "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"              
                        }
                    ]
                }
            }
        }
    }
}'\''''\'''
Requirement 2:

A brand wants to offer a "$25%$ Off Snacks" cart promotion, where the discount applies only to the first two snack items a customer buys (e.g., if a customer buys five snack items, only two will receive the $25%$ discount). The brand now wants to update the promotion to be applied to "Drinks" instead of "Snacks."

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": ["Drinks"]
                }
            ],
            "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": [
                                "Drinks"
                            ]
                        }
                    ],
                    "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": {}
}'\'''

When the cart promotions action type is PER_UNIT

FieldTypeRequiredDescriptionUpdatable
.perUnitActionObjectYesDefines a reward action that can be applied repeatedly.Yes
..perUnitKPIEnumYesMetric used to group items. Supported: QUANTITY.Yes
..perUnitDividerStringYesSpecifies a numerical value that specifies the minimum quantity of items that must be purchased before a specified action (such as a discount or free item)is repeated. Example : Customer buys any two items from the 'Shirts' category, they are eligible to receive one item from the 'Ties' category for free Here the perUnitDivider will be 2, since every two item purchased is eligible for a free item repeatedly.Yes
..rewardActionObjectYesDefines the specific benefit for each group.Yes
...typeEnumYesType of per-unit reward action. Supported values : * PRODUCT_BASED: This action applies a direct discount (either a fixed amount or a percentage) to specific items., Example :A “25% Off All Snacks” cart promotion . When a customer adds any item from the “Snacks” category to their cart, the system applies a 25% discount to the price of just those snack items. * FREE_PRODUCT:This action makes a specific item free, often as part of a “Buy X, Get Y” offer. Example : A “Buy 2 Shirts, Get 1 Free” cart promotion . When the system detects three items from the “Shirts” category in the cart, it identifies the cheapest one among them and reduces its price to zero, making it free. * FIXED_PRICE:This action changes the price of a specific item to a set amount, regardless of its original price. Example: An “Any Large Pizza for $10” deal. When a customer adds any pizza from the “Large Pizzas” category to their cart, the system ignores its original price (e.g., $18) and changes it to the special fixed price of $10.Yes
...productBasedActionObjectConditionalRequired when rewardAction.type is PRODUCT_BASED.Yes
....typeEnumYesCalculation method. Supported: ABSOLUTE, PERCENTAGE.Yes
....valueNumberYesThe amount or percentage of the discount.Yes
....includeItemsFromConditionSetBooleanYesControls whether the action benefit applies to the same items that satisfied the cart promotion trigger (true) or to a different target set defined by productBasedCondition (false). Example (true): “Buy 10 A, get $100 off those 10 A.” Example (false): “Buy 10 A, get $100 off B.” Example : “If a customer buys a Laptop, a Mouse, and a Keyboard all in the same transaction, they get 50% off all three items.” By setting includeItemsFromConditionSet to true, the discount is applied directly to the same three items that triggered the cart promotion in the above example.Yes
....productBasedConditionObjectYesDefines the set of products to which the benefit will be applied.Yes
.....typeEnumYesTargeting method. Supported: PRODUCT, COMBO_PRODUCT.Yes
.....productConditionObjectConditionalDefines target products. Required if type is PRODUCT.Yes
......criteriaListArrayYesDefines an array of rule objects that specify which products are targeted.Yes
.......entityStringYesSpecifies the product attribute to evaluate, such as SKU, BRAND, or CATEGORY.Yes
.......valuesArrayYesSpecifies an array of strings to match against the entity attribute.Yes
.......operatorEnumYesSpecifies the operator for the list comparison. Supported values: IN, NOT_IN.Yes
......kpiEnumYesSpecifies an optional metric for filtering products. Supported values: NONE, QUANTITY.Yes
......operatorEnumConditionalSpecifies the logical operator for product comparison. Supported values: EQUALS.Yes
......valueStringConditionalSpecifies the target value for the product KPI comparison.Yes
.....comboProductConditionObjectConditionalDefines target combos. Required if type is COMBO_PRODUCT.Yes
......productConditionsArrayYesArray of product condition objects.Yes
...freeProductActionObjectConditionalRequired when rewardAction.type is FREE_PRODUCT.Yes
....includeItemsFromConditionSetBooleanYesControls whether the action benefit applies to the same items that satisfied the cart promotion trigger (true) or to a different target set defined by productBasedCondition (false). Example (true): “Buy 10 A, get $100 off those 10 A.” Example (false): “Buy 10 A, get $100 off B.” Example : “If a customer buys a Laptop, a Mouse, and a Keyboard all in the same transaction, they get 50% off all three items.”Yes
....productBasedConditionObjectYesDefines exactly which products are to be marked as free.Yes
.....typeEnumYesTargeting method. Supported: PRODUCT, COMBO_PRODUCT.Yes
.....productConditionObjectConditionalDefines target products. Required if type is PRODUCT.Yes
......criteriaListArrayYesDefines an array of rule objects that specify which products are targeted.Yes
.......entityStringYesSpecifies the product attribute to evaluate, such as SKU, BRAND, or CATEGORY.Yes
.......valuesArrayYesSpecifies an array of strings to match against the entity attribute.Yes
.......operatorEnumYesSpecifies the operator for the list comparison. Supported values: IN, NOT_IN.Yes
......kpiEnumYesSpecifies an optional metric for filtering products. Supported values: NONE, QUANTITY.Yes
......operatorEnumConditionalSpecifies the logical operator for product comparison. Supported values: EQUALS.Yes
......valueStringConditionalSpecifies the target value for the product KPI comparison.Yes
.....comboProductConditionObjectConditionalDefines target combos. Required if type is COMBO_PRODUCT.Yes
...fixedPriceActionObjectConditionalDefines a reward action where products are sold at a fixed price. Required when rewardAction.type is FIXED_PRICE.Yes
....valueNumberYesSpecifies the new, fixed price for the qualifying items.Yes
....includeItemsFromConditionSetBooleanYesControls whether the action benefit applies to the same items that satisfied the cart promotion trigger (true) or to a different target set defined by productBasedCondition (false). Example (true): “Buy 10 A, get $100 off those 10 A.” Example (false): “Buy 10 A, get $100 off B.” Example : “If a customer buys a Laptop, a Mouse, and a Keyboard all in the same transaction, they get 50% off all three items.”Yes
....productBasedConditionObjectYesDefines exactly which products are to be sold at the fixed price.Yes
.....typeEnumYesSpecifies the product targeting method for the action. Supported values: PRODUCT, COMBO_PRODUCT.Yes
.....productConditionObjectConditionalDefines target products using a list of criteria. Required when type is PRODUCT.Yes
......criteriaListArrayYesDefines an array of rule objects that specify which products are targeted.Yes
.......entityStringYesSpecifies the product attribute to evaluate, such as SKU, BRAND, or CATEGORY.Yes
.......valuesArrayYesSpecifies an array of strings to match against the entity attribute.Yes
.......operatorEnumYesSpecifies the operator for the list comparison. Supported values: IN, NOT_IN.Yes
......kpiEnumYesSpecifies an optional metric for filtering products. Supported values: NONE, QUANTITY.Yes
......operatorEnumConditionalSpecifies the logical operator for product comparison. Supported values: EQUALS.Yes
......valueStringConditionalSpecifies the target value for the product KPI comparison.Yes
.....comboProductConditionObjectConditionalDefines the target combo products for the action. Required when type is COMBO_PRODUCT.Yes
......productConditionsArrayYesDefines an array of product condition objects that must all be satisfied for the action to apply.Yes
.......kpiEnumYesSpecifies an optional metric for filtering products. Supported values: NONE, QUANTITY.Yes
.......operatorEnumConditionalSpecifies the logical operator for the product kpi comparison.Yes
.......valueStringConditionalSpecifies the target value for the product kpi comparison.Yes
.......criteriaListArrayYesDefines an array of rule objects that specify the products in this part of the combo.Yes
........entityStringYesSpecifies the product attribute to evaluate, such as SKU, BRAND, or CATEGORY.Yes
........valuesArrayYesSpecifies an array of strings to match against the entity attribute.Yes
........operatorEnumYesSpecifies the operator for the list comparison. Supported values: IN, NOT_IN.Yes

Example request

Requirement 1 :

The brand has 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 using a PRODUCT_BASED reward action. The brand now wants to update the promotion to "Buy a Coffee, Get 50% Off a Pastry," changing the condition to 1 item from the "Coffee" category, and the reward to a $50%$ discount on 1 item from the "Pastries" category.

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 Coffee, Get 50% Off a Pastry",
    "type": "POS",
    "messageLabel": "Buy a Coffee, Get 50% Off a Pastry!",
    "active": true,
    "priority": 1,
    "isStackable": false,
    "startDate": 1759363200000,
    "endDate": 1790985600000,
    "campaignId": "286039",
    "condition": {
        "type": "PRODUCT",
        "productCondition": {
            "criteriaList": [
                {
                    "entity": "CATEGORY",
                    "operator": "IN",
                    "values": [
                        "Coffee"
                    ]
                }
            ],
            "kpi": "QUANTITY",
            "operator": "GREATER_THAN_OR_EQUAL",
            "value": "1"
        }
    },
    "action": {
        "type": "PER_UNIT",
        "perUnitAction": {
            "perUnitKPI": "QUANTITY",
            "perUnitDivider": "1",
            "rewardAction": {
                "type": "PRODUCT_BASED",
                "productBasedAction": {
                    "type": "PERCENTAGE",
                    "value": 50,
                    "includeItemsFromConditionSet": false,
                    "productBasedCondition": {
                        "type": "PRODUCT",
                        "productCondition": {
                            "criteriaList": [
                                {
                                    "entity": "CATEGORY",
                                    "operator": "IN",
                                    "values": [
                                        "Pastries"
                                    ]
                                }
                            ],
                            "kpi": "QUANTITY",
                            "operator": "EQUALS",
                            "value": "1"
                        }
                    }
                }
            }
        }
    },
    "customerActivationRequired": false,
    "maxIssuancePerCustomer": 10,
    "promotionRestrictions": {},
    "customFieldValues": {}
}'
Requirement 2:

The brand has set up a cart promotion where if a customer buys any two items from the "Shirts" category, they are eligible to receive one item from the "Ties" category for free. The brand now wants to update the promotion to "Buy 1 Trousers, Get 1 Belt Free," changing the trigger condition to 1 item from the "Trousers" category, and setting the perUnitDivider to 1 so that for every pair of trousers purchased, one item from the "Belts" category is 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 1 Trousers, Get 1 Belt Free",
    "type": "POS",
    "messageLabel": "Free belt when you buy trousers!",
    "active": true,
    "priority": 1,
    "isStackable": false,
    "startDate": 1759363200000,
    "endDate": 1790985600000,
    "campaignId": "286039",
    "condition": {
        "type": "PRODUCT",
        "productCondition": {
            "criteriaList": [
                {
                    "entity": "CATEGORY",
                    "operator": "IN",
                    "values": [
                        "Trousers"
                    ]
                }
            ],
            "kpi": "QUANTITY",
            "operator": "GREATER_THAN_OR_EQUAL",
            "value": "1"
        }
    },
    "action": {
        "type": "PER_UNIT",
        "perUnitAction": {
            "perUnitKPI": "QUANTITY",
            "perUnitDivider": "1",
            "rewardAction": {
                "type": "FREE_PRODUCT",
                "freeProductAction": {
                    "includeItemsFromConditionSet": false,
                    "productBasedCondition": {
                        "type": "PRODUCT",
                        "productCondition": {
                            "criteriaList": [
                                {
                                    "entity": "CATEGORY",
                                    "operator": "IN",
                                    "values": [
                                        "Belts"
                                    ]
                                }
                            ],
                            "kpi": "QUANTITY",
                            "operator": "EQUALS",
                            "value": "1"
                        }
                    }
                }
            }
        }
    },
    "customerActivationRequired": false,
    "maxIssuancePerCustomer": 10,
    "promotionRestrictions": {},
    "customFieldValues": {}
}'
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$ using a FIXED_PRICE reward action. The brand now wants to update the promotion to "Premium Burgers for $12," changing the target category to "Premium Burgers" and updating the fixed price value to $12.

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": "Premium Burgers for 12 Dollars",
    "orgId": 100737,
    "type": "POS",
    "messageLabel": "Get any Premium Burger for just $12!",
    "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": 12,
                    "includeItemsFromConditionSet": false,
                    "productBasedCondition": {
                        "type": "PRODUCT",
                        "productCondition": {
                            "criteriaList": [
                                {
                                    "entity": "CATEGORY",
                                    "values": [
                                        "Premium Burgers"
                                    ],
                                    "operator": "IN"
                                }
                            ],
                            "kpi": "NONE"
                        }
                    }
                }
            }
        }
    },
    "customerActivationRequired": false,
    "maxIssuancePerCustomer": 10,
    "promotionRestrictions": {},
    "customFieldValues": {}
}'
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." The brand now wants to update the promotion to "Shampoo and Conditioner Bundle," requiring a combo of 1 Shampoo and 1 Conditioner, and applying a $20%$ discount to both items using includeItemsFromConditionSet: true.

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": "Shampoo and Conditioner Bundle - 20% Off",
    "type": "POS",
    "messageLabel": "Get 20% off when you buy Shampoo and Conditioner together!",
    "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": [
                                "Shampoo"
                            ]
                        }
                    ]
                },
                {
                    "kpi": "QUANTITY",
                    "operator": "GREATER_THAN_OR_EQUAL",
                    "value": "1",
                    "criteriaList": [
                        {
                            "entity": "CATEGORY",
                            "operator": "IN",
                            "values": [
                                "Conditioner"
                            ]
                        }
                    ]
                }
            ]
        }
    },
    "action": {
        "type": "PRODUCT_BASED",
        "productBasedAction": {
            "type": "PERCENTAGE",
            "value": 20,
            "includeItemsFromConditionSet": true
        }
    },
    "customerActivationRequired": false,
    "maxIssuancePerCustomer": 10,
    "promotionRestrictions": {},
    "customFieldValues": {}
}'

When the cart promotion's action type is FREE_PRODUCT

FieldTypeRequiredDescriptionUpdatable
.freeProductActionObjectYesDefines a reward action where specific products are made free.Yes
..includeItemsFromConditionSetBooleanYesControls whether the action benefit applies to the same items that satisfied the cart promotion trigger (true) or to a different target set defined by productBasedCondition (false). Example (true): “Buy 10 A, get $100 off those 10 A.” Example (false): “Buy 10 A, get $100 off B.” Example: “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.”Yes
..productBasedConditionObjectYesDefines the set of products that are eligible to be made free. If multiple items in the cart match, the system typically makes the cheapest one free.Yes
...typeEnumYesSpecifies how target products are grouped. Supported: PRODUCT, COMBO_PRODUCT.Yes
...productConditionObjectConditionalDefines target products using product-level rules. Required when type is PRODUCT.Yes
....criteriaListArrayYesA list of rule objects that specify which products are targeted.Yes
.....entityStringYesSpecifies the product attribute to evaluate, such as SKU, BRAND, or CATEGORY.Yes
.....operatorEnumYesSpecifies the operator for the list comparison. Supported: IN, NOT_IN.Yes
.....valuesArrayYesSpecifies an array of strings to match against the entity attribute.Yes
....kpiEnumYesAn optional metric for filtering products. Supported: NONE, QUANTITY, AMOUNT.Yes
....operatorEnumConditionalThe logical operator for the KPI comparison. Required if kpi is not NONE. Supported: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUAL.Yes
....valueStringConditionalThe target value for the KPI comparison. Required if kpi is not NONE.Yes
...comboProductConditionObjectConditionalDefines the set of product combinations that can be made free. Required when type is COMBO_PRODUCT.Yes
....productConditionsArrayYesAn array of product condition objects. All conditions in this list must be satisfied for the combo to qualify.Yes
.....criteriaListArrayYesDefines the specific products to check in this part of the combo.Yes
......entityStringYesSpecifies the product attribute to evaluate, such as SKU, BRAND, or CATEGORY.Yes
......operatorEnumYesThe operator for the list comparison Supported values:IN, NOT_IN.Yes
......valuesArrayYesThe list of attribute values to match against.Yes
.....kpiEnumYesThe metric to evaluate for this part of the combo Supported values:NONE, QUANTITY, AMOUNT.Yes
.....operatorEnumConditionalThe comparison logic for the KPI Supported values: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUAL.Yes
.....valueStringConditionalThe target value for the KPI comparison.Yes

Example request

Requirement:

A tech store wants to create an "all-in-one" bundle deal with the requirement: "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." The brand now wants to update the promotion to "Free Keyboard with Laptop and Mouse," changing the condition to require only the Premium Laptop and Pro Gaming Mouse, and changing the action to make the Mechanical Keyboard (1 unit) FREE.

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": "Free Keyboard with Laptop and Mouse",
    "type": "POS",
    "messageLabel": "Buy a Premium Laptop and Pro Mouse, Get a Mechanical Keyboard Free!",
    "active": true,
    "priority": 1,
    "isStackable": false,
    "startDate": 1759363200000,
    "endDate": 1790985600000,
    "campaignId": "286039",
    "condition": {
        "type": "COMBO_PRODUCT",
        "comboProductCondition": {
            "productConditions": [
                {
                    "criteriaList": [
                        {
                            "entity": "CATEGORY",
                            "operator": "IN",
                            "values": [
                                "Laptops"
                            ]
                        }
                    ],
                    "kpi": "AMOUNT",
                    "operator": "GREATER_THAN_OR_EQUAL",
                    "value": "1000"
                },
                {
                    "criteriaList": [
                        {
                            "entity": "SKU",
                            "operator": "IN",
                            "values": [
                                "GM-PRO-001"
                            ]
                        }
                    ],
                    "kpi": "QUANTITY",
                    "operator": "GREATER_THAN_OR_EQUAL",
                    "value": "1"
                }
            ]
        }
    },
    "action": {
        "type": "PER_UNIT",
        "perUnitAction": {
            "perUnitKPI": "QUANTITY",
            "perUnitDivider": "1",
            "rewardAction": {
                "type": "FREE_PRODUCT",
                "freeProductAction": {
                    "includeItemsFromConditionSet": false,
                    "productBasedCondition": {
                        "type": "PRODUCT",
                        "productCondition": {
                            "criteriaList": [
                                {
                                    "entity": "CATEGORY",
                                    "operator": "IN",
                                    "values": [
                                        "Mechanical Keyboards"
                                    ]
                                }
                            ],
                            "kpi": "QUANTITY",
                            "operator": "EQUALS",
                            "value": "1"
                        }
                    }
                }
            }
        }
    },
    "customerActivationRequired": false,
    "maxIssuancePerCustomer": 10,
    "promotionRestrictions": {},
    "customFieldValues": {}
}'

When the cart promotion's action type is FIXED_PRICE

Important Constraint: For a FIXED_PRICE action to be valid, the productCondition or comboProductCondition that defines which items get the special price must use a kpi of QUANTITY and an operator of EQUALS.

FieldTypeRequiredDescriptionUpdatable
.fixedPriceActionObjectYesDefines a reward action where the price of a product is changed to a specific value.Yes
..valueNumberYesThe new, fixed price for the qualifying items.Yes
..includeItemsFromConditionSetBooleanYesControls whether the action benefit applies to the same items that satisfied the cart promotion trigger (true) or to a different target set defined by productBasedCondition (false). Example (true): “Buy 10 A, get $100 off those 10 A.” Example (false): “Buy 10 A, get $100 off B.” Example : “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.Yes
..productBasedConditionObjectYesDefines the specific set of products that will be sold at the fixed price.Yes
...typeEnumYesSpecifies how the target products are grouped. Supported: PRODUCT, COMBO_PRODUCT.Yes
...productConditionObjectConditionalDefines target products using product-level rules. Required when type is PRODUCT.Yes
....criteriaListArrayYesA list of rule objects that specify which products are targeted.Yes
.....entityStringYesSpecifies the product attribute to evaluate, such as SKU, BRAND, or CATEGORY.Yes
.....operatorEnumYesSpecifies the operator for the list comparison. Supported: IN, NOT_IN.Yes
.....valuesArrayYesSpecifies an array of strings to match against the entity attribute.Yes
....kpiEnumYesThe metric for filtering products. Constraint: Must be QUANTITY for this action type.Yes
....operatorEnumConditionalThe logical operator for the KPI comparison. Constraint: Must be EQUALS for this action type.Yes
....valueStringConditionalThe target quantity for the KPI comparison. Required if kpi is not NONE.Yes
...comboProductConditionObjectConditionalDefines the set of product combinations that will be sold at the fixed price. Required when type is COMBO_PRODUCT.Yes
....productConditionsArrayYesAn array of productCondition objects. All conditions in this list must be satisfied for the combo to qualify.Yes
.....criteriaListArrayYesDefines the specific products to check in this part of the combo.Yes
......entityStringYesThe product attribute to evaluate Supported values: CATEGORY, BRAND,SKU.Yes
......operatorEnumYesThe operator for the list comparison Supported values:IN, NOT_IN.Yes
......valuesArrayYesThe list of attribute values to match against.Yes
.....kpiEnumYesThe metric for this part of the combo. Constraint: Must be QUANTITY.Yes
.....operatorEnumConditionalThe comparison logic for the KPI. Constraint: Must be EQUALS.Yes
.....valueStringConditionalThe target quantity for the KPI comparison.Yes

Example Request

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$. The brand now wants to update the promotion to "Designer Jeans for $40," changing the target category to "Jeans" and the fixed price value to $40.

curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--data '{
    "name": "Designer Jeans for 40 Dollars",
    "type": "POS",
    "messageLabel": "Get any pair of Designer Jeans for just $40!",
    "active": true,
    "priority": 2,
    "isStackable": true,
    "startDate": 1759363200000,
    "endDate": 1790985600000,
    "campaignId": "286039",
    "condition": {
        "type": "PRODUCT",
        "productCondition": {
            "criteriaList": [
                {
                    "entity": "CATEGORY",
                    "operator": "IN",
                    "values": [
                        "Jeans"
                    ]
                }
            ],
            "kpi": "QUANTITY",
            "operator": "GREATER_THAN_OR_EQUAL",
            "value": "1"
        }
    },
    "action": {
        "type": "FIXED_PRICE",
        "fixedPriceAction": {
            "value": 40,
            "includeItemsFromConditionSet": true,
            "productBasedCondition": {
                "type": "PRODUCT",
                "productCondition": {
                    "criteriaList": [
                        {
                            "entity": "CATEGORY",
                            "operator": "IN",
                            "values": [
                                "Jeans"
                            ]
                        }
                    ],
                    "kpi": "QUANTITY",
                    "operator": "EQUALS",
                    "value": "1"
                }
            }
        }
    },
    "customerActivationRequired": false,
    "promotionRestrictions": {},
    "customFieldValues": {}
}'

Promotion restrictions Object

FieldTypeRequiredDescriptionUpdatable
.CustomerArrayConditionalSpecifies restrictions that apply per customer.Yes
.CartArrayConditionalSpecifies restrictions that apply per cart.Yes
.PromotionArrayConditionalSpecifies restrictions that apply to the overall cart promotion.Yes
.CodeArrayConditionalSpecifies restrictions that apply to cart promotion codes. Required when the main promotion type is CODE.Yes
..kpiEnumYesThe metric to be limited. Supported: • REDEMPTION: Limits redemption count. • TRANSACTION: Limits transaction count. • DISCOUNT: Caps total discount value.Yes
..frequencyEnumOptionalHow often the restriction resets. Supported: <br>* DAYS: The limit resets every N days. Example: A limit of 100 redemptions resets every 10 days. <br>* WEEKS: The limit resets weekly. Example: A limit of 500 redemptions resets each week, starting on Monday. DOES_NOT_REPEAT : The restriction is applied only once and does not reset. It acts as a single, lifetime limit for the duration of the promotion.. If omitted, the restriction does not repeat.Yes
..minTimeBetweenRepeatLongOptionalMinimum time between uses in milliseconds. Example: 86400000 (1 day).Yes
..limitBigDecimalYesMaximum allowed value for the restriction. Example: A REDEMPTION limit of "1"Yes
..windowTypeEnumOptionalSpecifies the type of limit window. Supported values: • OVERALL: Lifetime limit, no reset. • MOVING: Rolling window; uses frequency and minTimeBetweenRepeat. • FIXED: Resets on a recurring calendar cycle; requires fixedWindowConfig. If omitted, defaults to OVERALL (backward compatible with existing promotions). Constraints: MOVING and FIXED cannot coexist anywhere in the same promotion. OVERALL and MOVING cannot coexist on the same Level + KPI. OVERALL and FIXED can coexist on the same Level + KPI. Multiple FIXED restrictions with different cycle configurations on the same Level + KPI are valid. Per Level + KPI limits: max 1 OVERALL, max 1 MOVING, max 9 FIXED. A promotion supports a maximum of 10 restrictions in total across all levels. All cycle boundaries are computed in the org's configured timezone. Cannot be changed from FIXED to MOVING (or vice versa) on a live promotion.Conditional
..fixedWindowConfigObjectConditionalRequired when windowType is FIXED. Defines the cycle configuration for the fixed window.Conditional
...cycleTypeEnumYes (if fixedWindowConfig present)Defines the type of fixed cycle. Supported values: • CALENDAR_MONTH: Resets on the 1st of each calendar month. • WEEK: Resets weekly; configure the start day via weekStartDay. • N_DAY: Resets every N days from a configurable anchor date; configure the interval via refreshRate and the anchor via cycleReferenceDate.Yes
...weekStartDayEnumConditionalRequired when cycleType is WEEK. Specifies the day the weekly cycle starts. Supported values: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.Yes
...refreshRateIntegerConditionalRequired when cycleType is N_DAY. Defines the number of days per cycle (must be ≥ 1). Example: A value of 7 resets the limit every 7 days.Yes
...cycleReferenceDateLongOptionalEpoch timestamp in milliseconds used as the anchor date from which N-day cycles are calculated forward and backward. Only applicable when cycleType is N_DAY. Interpreted in the org's configured timezone. Defaults to the promotion's startDate if omitted.No
customer level 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 to ensure fair usage. The brand now wants to update the promotion to "Weekly Coffee Treat," increasing the discount to $5 but changing the restriction to limit customers to 1 redemption per week (resetting weekly).

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": "Weekly Coffee Treat",
    "type": "CUSTOMER",
    "messageLabel": "$5 off your favorite drink, once a week!",
    "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": 5
        }
    },
    "promotionRestrictions": {
        "Customer": [
            {
                "kpi": "REDEMPTION",
                "frequency": "WEEKS",
                "minTimeBetweenRepeat": 604800000,
                "limit": "1"
            }
        ]
    }
}'
customer level restriction requirement (fixed window):

A grocery chain wants to update their "Monthly Freshness Deal" promotion — customers can redeem a 10% discount up to 5 times per calendar month, with an overall lifetime cap of 30 redemptions.

curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions/{{promotionId}}' \
--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 5 times this month!",
    "active": true,
    "priority": 10,
    "isStackable": false,
    "startDate": 1759363200000,
    "endDate": 1790985600000,
    "campaignId": "286039",
    "promotionRestrictions": {
        "Customer": [
            {
                "kpi": "REDEMPTION",
                "windowType": "OVERALL",
                "limit": "30"
            },
            {
                "kpi": "REDEMPTION",
                "windowType": "FIXED",
                "fixedWindowConfig": {
                    "cycleType": "CALENDAR_MONTH"
                },
                "limit": "5"
            }
        ]
    }
}'
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. The brand now wants to update the promotion to "Flash Sale $50%$ Off," increasing the percentage discount to $50%$, but tightening the restriction to cap the maximum discount at $50 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": "Flash Sale 50% Off (Capped at $50)",
    "type": "POS",
    "messageLabel": "Flash Sale! Get 50% off (Max discount $50).",
    "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": 50
        }
    },
    "promotionRestrictions": {
        "Cart": [
            {
                "kpi": "DISCOUNT",
                "limit": "50"
            }
        ]
    }
}'
Promotion Level Restriction requirement:

A new store is launching with a "Grand Opening" offer where the first 1,000 customers get $10 off. The brand now wants to update the promotion to "Super Early Bird Special," limiting the offer to only the first 100 customers globally (Promotion level limit).

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"                   
            }
        ]
    }
}'\'''
Code level restriction requirement: A company provides new subscribers with a unique, single-use code for "$15%$ off their first order." The brand now wants to update the promotion to "Referral Program Codes," allowing each unique code to be redeemed up to 5 times (Code level limit) before it expires.
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": "Referral Program - 5 Uses Per Code",
    "type": "CODE",
    "messageLabel": "Share this code! Valid for 5 uses.",
    "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": "5"
            }
        ]
    }
}'

Earning Criteria Object

FieldTypeRequiredDescriptionUpdatable
.activeBooleanYesFlag to enable or disable this specific earning rule.Yes
.criteriaDslStringYesThe earning rule in simple language Example: "true": Always True (No Condition)Yes
.criteriaDslJsonStringYesEscaped JSON string of the rule's values. Example: "{ \"arity\":\"literal\", \"value\":\"true\", \"type\":\"boolean:primitive\" }"Yes
.criteriaNameStringYesA name for the earning criteria rule.Yes
.earnedFromTypeEnumYesType of event that triggers the rule. Supported: ACTIVITY: This type is used when a cart promotion is earned based on a customer's real-time actions, such as making a purchase (TransactionAdd). MILESTONE: This type is used when a cart promotion is earned because a customer has achieved a predefined goal or status within a program.Yes
.eventTypeEnumYesSpecific activity that triggers the rule. Supported: TransactionAdd , Customer Update , Registration.Yes
.groupIdIntegerYesIdentifier for grouping related earning criteria.Yes
.milestoneIdIntegerYesIdentifier for a specific milestone within an earning program.Yes
Requirement:

The brand wants to set up a cart promotion where if a customer reaches milestone 12345, they get a $50 voucher that they can use on their next purchase of $50 or more. The brand now wants to update the promotion to "Platinum Milestone Reward," changing the trigger to Milestone ID 67890, increasing the voucher value to $100, and raising the minimum purchase requirement to $150.

curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/promotions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmJ1a2w6NzYzNDkxOGFU4ZjY3MmNhZjY1ZmY=' \
--header 'Cookie: _cfuvid=m_cAUxdAS9kIldmg15w1dpuKfA-1760347164530-0.0.1.1-604800000' \
--data '{
    "name": "Platinum Milestone Reward - $100 Voucher",
    "type": "EARNING",
    "messageLabel": "Congratulations! You'\''ve earned a $100 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": "150.000000"
        }
    },
    "action": {
        "type": "CART_BASED",
        "cartBasedAction": {
            "type": "ABSOLUTE",
            "value": "100.000000"
        }
    },
    "earningCriteria": {
        "active": true,
        "earnedFromType": "MILESTONE",
        "eventType": "TransactionAdd",
        "criteriaName": "Milestone_Achievement_67890",
        "criteriaDsl": "true",
        "criteriaDslJson": "{ \"arity\":\"literal\", \"value\":\"true\", \"type\":\"boolean:primitive\" }",
        "groupId": 1,
        "milestoneId": 67890
    }
}'

Store Criteria Object

This object limits the promotion to specific physical or logical locations, such as a set of stores or a geographical zone.

FieldTypeRequiredDescriptionUpdatable
.typeEnumYesThe type of location entity. Supported values: • STORE: A specific store. • ZONE: A defined group of stores. • CONCEPT: A brand or store concept.Yes
.valuesArray of IntegersYesAn array of IDs corresponding to the type (e.g., [101, 204] for store IDs).Yes
.operatorEnumYesThe logical operator. Supported values: • IN: The promotion is valid only in the listed locations. • NOT_IN: The promotion is valid everywhere except the listed locations.Yes

Example Request

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
        }
    }
}'

Time Criteria Object

This object restricts the promotion to specific times of the day or days of the week, enabling use cases like "Happy Hour" or "Weekend Specials."

FieldTypeRequiredDescriptionUpdatable
.startTimeStringYesAn object specifying the start time. Must contain hour (0-23) and minute (0-59).Yes
.durationInHoursIntegerYesThe duration of the promotion window in hours from the startTime.Yes
.repeatFrequencyEnumYesHow often the time window repeats. Supported: WEEKS, DAYS, DOES_NOT_REPEAT.Yes
.weeklyValuesArray of StringsConditionalRequired if repeatFrequency is WEEKS. A list of days, e.g., ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"].Yes

Example Request

Requirement: The brand wants a "Weekday Happy Hour" offering 20% off from 4:00 PM to 5:59 PM (a 2-hour duration) 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
        }
    }
}'

Supplementary Criteria Object

This object targets customers based on their status in a loyalty program, such as their membership tier or subscription status.

FieldTypeRequiredDescriptionUpdatable
.loyaltyProgramIdIntegerYesThe ID of the loyalty program to check against.Yes
.programTypeEnumYesThe type of program. Supported values: • TIER: Targets customers in a specific loyalty tier. • SUBSCRIPTION: Targets customers with a specific subscription.Yes
.partnerProgramIdIntegerYesThe ID of the specific tier or subscription within the program that is being targeted.Yes

Example Request

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 }
    }
}'

Example response

{
    "data": {
        "id": "68de8ef2f398ae3dc8802e20",
        "name": "CODE_Promotion_Test_17573886",
        "orgId": 100737,
        "priority": 0,
        "active": true,
        "messageLabel": "test!!",
        "type": "CODE",
        "condition": {
            "type": "CART",
            "cartCondition": {
                "kpi": "SUBTOTAL",
                "operator": "EQUALS",
                "value": "250.000000"
            }
        },
        "action": {
            "type": "CART_BASED",
            "cartBasedAction": {
                "type": "ABSOLUTE",
                "value": "25.000000"
            }
        },
        "createdBy": 75197941,
        "createdOn": 1759416050903,
        "createdOnISO": "2025-10-02T14:40:50Z",
        "lastUpdatedBy": 75152721,
        "lastUpdatedOn": 1759416683389,
        "lastUpdatedOnISO": "2025-10-02T14:51:23Z",
        "startDate": 1857388651000,
        "startDateISO": "2028-11-09T13:17:31Z",
        "endDate": 1857475051000,
        "endDateISO": "2028-11-10T13:17:31Z",
        "campaignId": 39077,
        "promotionRestrictions": {
            "Code": [
                {
                    "kpi": "REDEMPTION",
                    "limit": "1.000000"
                }
            ]
        },
        "earnLimitedToSpecificAudience": false,
        "mode": "DISCOUNT",
        "maxIssuancePerCustomer": 1,
        "isStackable": false,
        "expiryDateChangeJobList": [
            {
                "jobType": "CODE",
                "status": "OPEN",
                "createdOn": 1759416683395,
                "createdOnISO": "2025-10-02T14:51:23Z",
                "lastUpdatedOn": 1759416683395,
                "lastUpdatedOnISO": "2025-10-02T14:51:23Z",
                "lastUpdatedBy": 75152721,
                "createdBy": 75152721,
                "message": "Changed to 'Expire on 2028-11-10T13:17:31Z' from 'Expire on 2025-09-23T18:29:59.999Z'",
                "requestId": "1778756bcb13f7d6b3d65587ae38f6da"
            }
        ]
    }
}

Response parameters

FieldTypeDescription
dataObjectContains the main container for the promotion object.
..idStringSpecifies the unique, system-generated identifier for the promotion.
..nameStringSpecifies the unique name of the promotion.
..orgIdIntegerSpecifies the unique identifier for the organization to which this promotion belongs.
..typeStringSpecifies the type of promotion. Possible values: POS, CODE, CUSTOMER, EARNING, REWARD.
..messageLabelStringSpecifies a customer-facing label for the promotion message.
..activeBooleanSpecifies if the 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.
..isStackableBooleanSpecifies if this promotion can be combined with other promotions. Defaults to false if not provided. Possible values: true, false.
..startDateLongSpecifies the start time of the promotion in Unix epoch milliseconds (UTC).
..startDateISOStringSpecifies the start time in ISO 8601 format (UTC).
..endDateLongSpecifies the end time of the promotion in Unix epoch milliseconds (UTC).
..endDateISOStringSpecifies the end time in ISO 8601 format (UTC).
..campaignIdStringSpecifies the identifier of the campaign that the promotion is linked to.
..createdByLongSpecifies the unique identifier of the user who created the promotion.
..createdOnLongSpecifies the creation time in Unix epoch milliseconds (UTC).
..createdOnISOStringSpecifies the creation time in ISO 8601 format (UTC).
..lastUpdatedByLongSpecifies the unique identifier of the user who last updated the promotion.
..lastUpdatedOnLongSpecifies the last update time in Unix epoch milliseconds (UTC).
..lastUpdatedOnISOStringSpecifies the last update time in ISO 8601 format (UTC).
..conditionObjectDefines the conditions under which the promotion applies.
....typeStringSpecifies the type of condition to evaluate. Possible values: CART, TENDER, COMBO_PRODUCT.
....cartConditionObjectContains rules for the entire shopping cart, present if condition.type is CART.
......kpiStringSpecifies the metric used to evaluate the cart. Possible values: SUBTOTAL, ITEMCOUNT.
......operatorStringSpecifies the comparison operator. Possible values: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUAL.
......valueStringSpecifies the numerical value to compare the kpi against, returned as a string.
....tenderConditionObjectContains rules based on the customer's payment method, present if condition.type is TENDER.
......tenderModesArrayContains an array of specific payment methods that will trigger the condition.
........typeStringSpecifies the category of the payment method. Possible value: CARD, CASH.
........identifiersArrayContains an array of strings for the exact payment methods, such as ["VISA_CARD", "MASTERCARD"].
......conditionObjectContains a nested condition (typically CART type) that must also be satisfied.
....comboProductConditionObjectContains a condition where multiple product sets must be in the cart, present if condition.type is COMBO_PRODUCT.
......productConditionsArrayContains an array of product conditions that must all be satisfied.
..actionObjectDefines the action taken when the promotion applies.
....typeStringSpecifies the scope of the action. Possible values: CART_BASED, PRODUCT_BASED, TENDER, PER_UNIT.
....cartBasedActionObjectContains an action for the entire cart, present if action.type is CART_BASED.
......typeStringSpecifies the type of cart-based action. Possible value: ABSOLUTE.
......valueStringSpecifies the fixed monetary amount for the discount, returned as a string.
....tenderBasedActionObjectContains the reward for a tender-based promotion, present if action.type is TENDER.
......typeStringSpecifies the calculation method. Possible value: ABSOLUTE.
......valueStringSpecifies the fixed monetary amount to be discounted, sent as a string.
....perUnitActionObjectContains a repeating reward, present if action.type is PER_UNIT.
......perUnitKPIStringSpecifies the metric used to group items. Possible value: QUANTITY.
......perUnitDividerStringSpecifies the number of units required to trigger one instance of the rewardAction.
......includeItemsFromConditionSetBooleanSpecifies if the action applies to the same items that triggered the condition.
......rewardActionObjectContains the specific benefit granted for each qualifying unit group.
........typeStringSpecifies the type of per-unit reward. Possible values: PRODUCT_BASED, FREE_PRODUCT, FIXED_PRICE.
........productBasedActionObjectContains a discount on specific products, present if rewardAction.type is PRODUCT_BASED.
..........typeStringSpecifies the discount calculation method. Possible values: ABSOLUTE, PERCENTAGE.
..........valueStringSpecifies the discount amount or percentage, returned as a string.
..........includeItemsFromConditionSetBooleanSpecifies if the discount applies to a different set of products than the triggering ones.
..........productBasedConditionObjectContains the set of products to which the action's benefit will be applied.
............typeStringSpecifies the product targeting mode. Possible values: PRODUCT, COMBO_PRODUCT.
............productConditionObjectContains target products using a list of criteria.
..............criteriaListArrayContains an array of rule objects specifying the products.
................entityStringSpecifies the product attribute to evaluate (e.g., CATEGORY, SKU, BRAND).
................operatorStringSpecifies the operator for the list comparison. Possible values: IN, NOT_IN.
................valuesArrayContains an array of strings to match against the entity.
..............kpiStringSpecifies an optional metric for filtering products. Possible values: NONE, QUANTITY.
........freeProductActionObjectContains a reward where products are given for free, present if rewardAction.type is FREE_PRODUCT.
..........includeItemsFromConditionSetBooleanSpecifies if the free products are different from the triggering ones.
..........productBasedConditionObjectContains exactly which products are to be marked as free.
........fixedPriceActionObjectContains a reward where products are sold at a fixed price, present if rewardAction.type is FIXED_PRICE.
..........valueStringSpecifies the new, fixed price for the qualifying items, returned as a string.
..........includeItemsFromConditionSetBooleanSpecifies if the fixed price applies to products different from the triggering ones.
..........productBasedConditionObjectContains exactly which products are to be sold at the fixed price.
..customerActivationRequiredBooleanSpecifies if a customer must opt-in for a promotion before it can be redeemed.
..maxIssuancePerCustomerIntegerSpecifies the total number of times this promotion can be issued to a single customer.
..earningCriteriaObjectContains conditions for EARNING type promotions, present if the main type is EARNING.
....activeBooleanSpecifies if this specific earning rule is active.
....criteriaDslStringSpecifies a domain-specific language string representing the earning rule.
....criteriaDslJsonStringSpecifies an escaped JSON string representation of the criteriaDsl rule.
....criteriaNameStringSpecifies a human-readable name for the earning criteria rule.
....durationObjectContains a placeholder object for future duration-based earning rules.
....earnedFromTypeStringSpecifies the type of event that can trigger the rule. Possible value: ACTIVITY.
....eventTypeStringSpecifies the specific activity that triggers the rule. Possible value: TransactionAdd.
....groupIdIntegerSpecifies an identifier for grouping related earning criteria.
....milestoneIdIntegerSpecifies an identifier for a specific milestone within an earning program.
..maxEarningPerCustomerInteger or nullSpecifies the maximum number of times a customer can earn the reward from an EARNING promotion.
..promotionRestrictionsObjectContains usage limits and constraints on the promotion.
....PromotionArrayContains restrictions that apply to the overall promotion.
....CustomerArrayContains restrictions that apply per customer.
....CartArrayContains restrictions that apply per cart.
....CodeArrayContains restrictions for CODE type promotions.
......kpiStringSpecifies the metric to be limited. Possible values: REDEMPTION, TRANSACTION, DISCOUNT.
......frequencyStringSpecifies how often the restriction resets. Possible values: DAYS, WEEKS.
......minTimeBetweenRepeatLongSpecifies the minimum time between uses in milliseconds.
......limitStringSpecifies the maximum allowed value for the restriction, returned as a string.
......windowTypeEnumSpecifies the type of limit window applied to the restriction.
......fixedWindowConfigObjectContains the cycle configuration for the restriction when windowType is FIXED.
.......cycleTypeEnumSpecifies the type of fixed cycle.
.......weekStartDayEnumSpecifies the start day of the weekly cycle when cycleType is WEEK.
.......refreshRateIntegerSpecifies the number of days per cycle when cycleType is N_DAY.
.......cycleReferenceDateLongSpecifies the anchor date from which the N_DAY cycle is calculated. Time format: epoch milliseconds.
..customFieldValuesObjectContains a key-value map for storing custom metadata.
..modeStringSpecifies the application mode of the promotion. Possible value: DISCOUNT.
..earnLimitedToSpecificAudienceBooleanSpecifies if earning is limited to a specific audience.
..expiryDateChangeJobListArrayContains a log of jobs created to change expiry dates for entities related to the promotion. This object only appears in the response to an Update Promotion call.
....jobTypeStringSpecifies the type of entity whose expiry date is being changed. Possible values: ISSUED, EARNED, CODE.
....statusStringSpecifies the current status of the change job. Possible values: OPEN, IN_PROGRESS, COMPLETED, FAILED, CANCELLED.
....createdOnLongSpecifies when the change job was created (epoch millis UTC).
....createdOnISOStringSpecifies when the change job was created in ISO 8601 format.
....createdByLongSpecifies the system-generated ID of the user or process that created this job.
....lastUpdatedOnLongSpecifies when the change job was last updated (epoch millis UTC).
....lastUpdatedOnISOStringSpecifies when the change job was last updated in ISO 8601 format.
....lastUpdatedByLongSpecifies the system-generated ID of the user that last updated this job.
....messageStringContains a descriptive message about the expiry date change, including the old and new dates.
....requestIdStringSpecifies the unique request ID associated with the update action.

Error codes

CodeDescription
400Invalid request. Check required parameters. Ensure all required parameters are provided and valid.
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 the 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.
Path Params
string
required
Response
200
Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!