Get Loyalty Promotion by ID

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

This API is being phased out and will no longer be available for viewing loyalty promotions.

To view loyalty promotions, use the Get Details of all Loyalty Promotions API


Retrieves a paginated list of promotions for a given program. You can filter the promotions based on source type, event name etc.

By default, the types of promotions are not available for all the orgs. This needs to be enabled separately. For more details on the types of promotions, refer Types of promotions.

📘

Note

This API fetches results for loyalty promotions created on the old UI.

Example request

curl --location 'https://eu.api.capillarytech.com/api_gateway/loyalty/v1/programs/973/promotionsV2?limit=100&offset=0&sourceType=USER_CREATED' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic **********' \
--header 'Cookie: _cfuvid=ZkF.LSNXg9S52IfnjuqAXPBT0mhsN4NBGQOun0VO.bo-1758631730852-0.0.1.1-604800000'

Prerequisites

  • Authentication: Basic or OAuth credentials
  • Access group resource: Read access to customer group resource

Resource information

URI/api_gateway/loyalty/v1/programs/{programId}/promotionsV2
HTTP MethodGET
PaginationYes
Batch supportNo

Path parameters

Parameter NameData TypeDescription
programIdStringUnique ID of the program

Query parameters

Parameter NameData TypeDescription
limit*StringNumber of results that need to be displayed. The values from zero to a maximum of 100 are supported.
sourceType*ENUMFilter promotion data based on its source type. Possible values are UI, IMPORT, GOODWILL, CAMPAIGN, POINTS_TRANSFER, IMPORT_API, PROMOTION_API, POINTS_CONTRIBUTION_TO_GROUP,MANUAL_POINTS_ADJUSTMENT, BADGES, USER_CREATED <br/><br/> Use the filter USER_CREATED to filter the promotions created for User Created Challenges (UCC)
offset*StringStart index for data retrieval. This value should not be negative.
promotionIdIntegerThe unique ID of the promotion.
includeInactivePromotionsBooleanInclude promotions that are currently inactive.<br/>By default this is set to false.
startRuleIdentifierIntegerThe unique identifier of the start rule.
eventNameStringSet the event name to filter based on an event.

Response body

{
    "status": {
        "code": 200,
        "message": "success"
    },
    "validationErrors": null,
    "data": [
        {
            "id": 96664,
            "name": "test_promo_uniqueName110",
            "description": "creating promotion via API",
            "promotionStatus": "LIVE",
            "lastUpdateDate": "2025-06-23T09:25:04Z",
            "lastUpdatedBy": -1,
            "rulesetInfos": [
                {
                    "id": 126412694,
                    "orgName": "DocDemo",
                    "contextID": 2932,
                    "orgID": 100737,
                    "contextType": "program",
                    "rules": [
                        {
                            "id": 126600796,
                            "exp": "true",
                            "expJSON": "{ \"arity\": \"literal\", \"value\": \"true\", \"type\": \"boolean:primitive\" }",
                            "jsonType": "JNODE",
                            "isActive": true,
                            "priority": -1,
                            "startDate": 1089532593324,
                            "endDate": 33593126193324,
                            "createdOn": 1750670704532,
                            "caseToActions": {
                                "true": [
                                    {
                                        "id": 126778453,
                                        "actionName": "AWARD_TARGET_POINTS_ACTION",
                                        "actionClass": "com.capillary.shopbook.pointsengine.endpoint.impl.action.AwardTargetPointsActionImpl",
                                        "mandatoryPropertiesValues": {
                                            "TargetRuleId": "123",
                                            "ProRateOnSourceValue": "EVENT_DEFAULT_VALUE",
                                            "DelayStrategy": "AS_DEFINED_IN_ALLOCATION_STRATEGY",
                                            "SourceValueRoundingStrategy": "ACTUAL",
                                            "TargetGroupId": "1234567",
                                            "ExpiryStrategy": "81042",
                                            "TargetRuleName": "TargetRuleName",
                                            "AwardStrategy": "82690",
                                            "PointsRoundingStrategy": "ACTUAL"
                                        },
                                        "mandatoryComplexPropertiesValues": {},
                                        "description": null
                                    }
                                ]
                            },
                            "ruleScope": "SERVER",
                            "createdBy": -1,
                            "modifiedBy": -1,
                            "modifiedOn": 1750670704532,
                            "name": "Rule 1",
                            "description": "Rule 1",
                            "expDataType": null,
                            "filterInfo": [],
                            "ruleSetId": 126412694,
                            "updatedViaNewUI": false
                        }
                    ],
                    "ruleScope": "SERVER",
                    "startDate": 1089532593324,
                    "endDate": 33593126193324,
                    "createdOn": 1750670704532,
                    "createdBy": -1,
                    "modifiedBy": -1,
                    "modifiedOn": 1750670704532,
                    "name": "rulesetName_uniqueue1",
                    "packageName": "",
                    "description": "Promotional Rulesets",
                    "filterInfo": [
                        {
                            "id": 126654282,
                            "orgID": 100737,
                            "ruleID": -1,
                            "name": "LoyaltyType",
                            "className": "com.capillary.shopbook.emf.impl.filter.LoyaltyTypeFilterImpl",
                            "isInclude": true,
                            "propertyToValues": {
                                "loyaltyType": [
                                    "loyalty"
                                ]
                            }
                        },
                        {
                            "id": 126654283,
                            "orgID": 100737,
                            "ruleID": -1,
                            "name": "EventSource",
                            "className": "com.capillary.shopbook.emf.impl.filter.EventSourceFilterImpl",
                            "isInclude": true,
                            "propertyToValues": {
                                "eventSource": [
                                    "INSTORE"
                                ]
                            }
                        }
                    ],
                    "eventType": null,
                    "cappingInfo": [],
                    "updatedViaNewUI": false,
                    "label": "userCreatedLabel_2025-06-23T09:25:04.532Z",
                    "private": true
                }
            ],
            "programName": "DocDemoDefaultProgram",
            "programId": 973,
            "startDate": "2025-06-23T00:00Z",
            "endDate": "2026-08-25T23:59:59Z",
            "identifier": "test_promo_uniqueIdentifier110",
            "isActive": true,
            "eventName": "TARGETCOMPLETED",
            "allocatePointsOn": "BILL",
            "limits": {
                "pointsPerCustomer": 10,
                "numberOfTimesPerCustomer": 2,
                "totalPointsInPromotion": 10,
                "totalPointsPerEventLimit": -1
            },
            "useProportions": false,
            "pointsOfferType": "LOYALTY",
            "promotionRestrictions": {
                "restrictions": {
                    "redemptionRestrictions": [
                        {
                            "name": "MAX_ALLOWED_TIMES_PER_CUSTOMER",
                            "value": 3,
                            "type": "PERIOD_BASED",
                            "periodType": "MOVING_WINDOW",
                            "periodUnit": "WEEKLY"
                        },
                        {
                            "name": "MAX_ALLOWED_TIMES_PER_PROMOTION",
                            "value": 3,
                            "type": "NON_PERIOD_BASED",
                            "periodType": null,
                            "periodUnit": null
                        },
                        {
                            "name": "MAX_REDEMPTIONS_PER_EARN_PER_CUSTOMER",
                            "value": 100,
                            "type": "NON_PERIOD_BASED",
                            "periodType": null,
                            "periodUnit": null
                        }
                    ],
                    "issualRestrictions": [
                        {
                            "name": "MAX_NUMBER_OF_ISSUALS_PER_CUSTOMER",
                            "value": 3
                        }
                    ],
                    "earnRestrictions": [
                        {
                            "name": "MAX_NUMBER_OF_EARNS_PER_CUSTOMER",
                            "value": 3
                        }
                    ],
                    "expiryRestrictions": [
                        {
                            "name": "ISSUAL_PROMOTION_EXPIRY_BASED_ON",
                            "value": 10,
                            "type": "PROMOTION"
                        }
                    ]
                },
                "scope": null,
                "loyaltyEarningType": "ISSUE_AND_EARN",
                "expiryReminder": null,
                "targetGroupIds": [
                    1234567
                ],
                "targetRuleIds": [
                    123
                ],
                "linkedTargetGroupVsTargetRuleIdMap": {
                    "1234567": [
                        123
                    ]
                },
                "cappingStatus": null,
                "skipEarnedDateCheckOnRedeem": false,
                "isStackable": false,
                "isConsideredForRanking": false,
                "isExclusive": false,
                "isAlwaysApply": false
            }
        }
    ],
    "pageDetails": {
        "pageNumber": 0,
        "pageSize": 100,
        "totalEntries": 1,
        "pageCount": 1
    }
}

Response parameters

FieldData TypeDescription
statusObjectContains the status of the API response.
    • codeIntegerThe HTTP status code indicating the outcome of the request.
    • messageStringA human-readable message summarising the outcome of the API request.
validationErrorsObject or nullContains validation error details when the request fails server-side validation; null if no errors occur.
dataArray of ObjectsContains the list of promotions matching the request parameters and filters.
    • idIntegerThe unique identifier for the promotion.
    • nameStringThe name of the promotion.
    • descriptionStringA text field describing the promotion's purpose and business context.
    • promotionStatusStringThe operational status of the promotion, indicating its current position in the promotion lifecycle.
    • lastUpdateDateString (ISO 8601)The date and time when the promotion was last modified, in ISO 8601 format.
    • lastUpdatedByIntegerThe user ID of the person who performed the most recent modification to the promotion.
    • rulesetInfosArray of ObjectsThe rulesets that define the conditions and actions governing how the promotion is evaluated and applied.
        • idIntegerThe unique identifier for the ruleset.
        • orgNameStringThe name of the organization that owns and manages this ruleset.
        • contextIDIntegerThe ID of the context, such as a program, in which the ruleset is configured and evaluated.
        • orgIDIntegerThe unique system ID of the organization that owns this ruleset.
        • contextTypeStringSpecifies the context category, such as program or campaign, determining how the ruleset is applied.
        • rulesArray of ObjectsThe rules that define the eligibility conditions and triggering logic for the promotion within this ruleset.
            • idIntegerUnique identifier for the rule.
            • expStringThe conditional expression evaluated to determine whether the rule's actions are triggered.
            • expJSONStringThe structured JSON format of the rule expression, enabling programmatic evaluation of the rule logic.
            • jsonTypeStringSpecifies the JSON node structure type used to represent the rule expression.
            • isActiveBooleanIndicates if this rule is currently enforced during promotion evaluation; inactive rules are skipped.
            • priorityIntegerDetermines the evaluation order when multiple rules exist; lower values execute first and take precedence.
            • startDateLongThe epoch timestamp marking when this rule becomes active and begins to be evaluated.
            • endDateLongThe epoch timestamp marking when this rule stops being evaluated.
            • createdOnLongThe epoch timestamp recording when this rule was originally created.
            • caseToActionsObjectMaps rule expression outcomes to the actions the promotion executes when each outcome is satisfied.
                • trueArray of ObjectsActions to be executed when the expression evaluates to true.
                    • idIntegerID of the action to be executed.
                    • actionNameStringThe type of action to be performed, such as awarding points or issuing vouchers, when the rule condition is met.
                    • actionClassStringThe fully qualified Java class containing the implementation logic for this action.
                    • mandatoryPropertiesValuesObjectThe required configuration parameters for the action, controlling how it executes.
                        • (key-value pairs)Varies (String, Integer)Specific mandatory properties and their values.
                    • mandatoryComplexPropertiesValuesObjectComplex structured configurations required by the action; empty if no complex properties are needed.
                    • descriptionString or nullDescription of the action (if applicable).
            • ruleScopeStringSpecifies where the rule is evaluated, such as server-side or client-side, determining its execution environment.
            • createdByIntegerThe user ID of the person who originally created this rule.
            • modifiedByIntegerThe user ID of the person who made the most recent changes to this rule.
            • modifiedOnLongThe epoch timestamp recording when this rule was last updated.
            • nameStringThe display name assigned to this rule for identification within the ruleset.
            • descriptionStringA summary documenting the purpose and behaviour of this rule.
            • ruleSetIdIntegerThe unique identifier linking this rule to its parent ruleset.
            • updatedViaNewUIBooleanIndicates if this rule was last modified using the Loyalty+ UI.
   • ruleScopeStringSpecifies the execution scope, such as server-side or client-side, determining where the ruleset's rules are evaluated.
  • startDateStringThe epoch timestamp in milliseconds marking when this ruleset becomes active.
  • endDateStringThe epoch timestamp in milliseconds marking when this ruleset expires and stops being evaluated.
  • createdOnLongDate the rule was created, in epoch time.
  • createdByIntegerThe user ID of the person who originally created this ruleset.
     • modifiedByIntegerThe user ID of the person who made the most recent changes to this ruleset.
   • modifiedOnLongThe epoch timestamp recording when this rule was last updated.
   • nameStringThe display name assigned to this ruleset for identification and reference.
packageNameStringThe package identifier used to group related rulesets together.
descriptionStringA summary describing the purpose and scope of this ruleset.
filterInfoArrayThe filter objects that restrict which customers or conditions the ruleset's rules are evaluated against.
     • idIntegerUnique identifier of the filter.
 • orgIDIntegerOrganization ID linked to the filter.
 • ruleIDIntegerRule ID associated with the filter.
 • nameStringName of the filter. Example: LoyaltyType, EventSource
 • classNameStringJava class name that implements the filter.
isIncludeBooleanIndicates whether the filter:
-true : Includes entities that match the property values defined in propertyToValues.
-false : Excludes entities that match the property values defined in propertyToValues.
propertyToValuesObjectKey-to-list mapping of filter properties.
eventTypeStringThe category of customer event that triggers this ruleset's evaluation.
cappingInfoArrayThe capping configuration objects that enforce quantity or frequency limits on promotion benefits within the ruleset.
updatedViaNewUIBooleanIndicates if the rule was updated via the new UI.
labelStringA display tag used to organise and identify this ruleset.
privateBooleanIndicates if this ruleset is restricted to specific organisations or contexts, rather than shared broadly.
    • programNameStringThe name of the loyalty program under which this promotion operates.
    • programIdIntegerThe unique ID of the loyalty program to which this promotion belongs.
    • startDateString (ISO 8601)Specifies the date and time from which the promotion becomes active, in ISO 8601 format.
    • endDateString (ISO 8601)Specifies the date and time when the promotion stops being available to customers, in ISO 8601 format.
    • identifierStringSpecifies the external identifier configured for the promotion — a human-readable or externally assigned string used to reference it across systems.
    • isActiveBooleanIndicates if the promotion is currently available for earning and redemption.
    • eventNameStringSpecifies the customer action or milestone that activates this promotion.
    • allocatePointsOnStringSpecifies the transaction event at which promotion points are credited to the customer.
    • limitsObjectDefines various limits related to the promotion.
        • pointsPerCustomerIntegerThe maximum total points a single customer can earn from this promotion; -1 means unlimited.
        • numberOfTimesPerCustomerIntegerThe maximum number of times a customer can earn from this promotion; -1 means unlimited.
        • totalPointsInPromotionIntegerThe maximum total points available across all customers for this promotion; -1 means no overall cap.
        • totalPointsPerEventLimitIntegerThe maximum points awardable in a single event occurrence; -1 means no per-event cap.
    • useProportionsBooleanIndicates if points are distributed proportionally based on transaction values rather than as fixed amounts.
    • pointsOfferTypeStringSpecifies the category of points awarded by this promotion.
    • promotionRestrictionsObjectDefines restrictions for the promotion.
   • restrictionsObjectObject of redemption restrictions.
        • redemptionRestrictionsObjectContains information on the redemption limits for a promotion.
            • nameEnumType of redemption restriction. Possible values:<br/>MAX_ALLOWED_POINTS_PER_EVENT: The maximum points that can be earned for a single activity (make a transaction, redeem points etc.) done by a customer.<br/>MAX_ALLOWED_TIMES_PER_CUSTOMER: The maximum number of activities (make a transaction, redeem points etc.) a customer can do to earn points.<br/>MAX_ALLOWED_POINTS_PER_CUSTOMER:The maximum number of points a customer can earn from a promotion.<br/>MAX_ALLOWED_TIMES_PER_PROMOTION: The maximum number of activities (make a transaction, redeem points etc.) allowed across all customers in the brand for the promotion.<br/>MAX_ALLOWED_POINTS_PER_PROMOTION:The maximum number of points available across all customers in the brand for the promotion.<br/>MAX_REDEMPTIONS_PER_EARN_PER_CUSTOMER:The maximum number of times a customer can redeem a promotion after earning
            • valueIntegerNumber of units corresponding to the name. Specify -1 for no limit (max limit: 100).
            • typeEnumType of period for restriction. Possible values: PERIOD_BASED, NON_PERIOD_BASED.
            • periodTypeEnumType of period. Supported value: MOVING_WINDOW.
                • periodUnitEnumFrequency of the period. Possible values: DAILY, WEEKLY, MONTHLY.
        • issualRestrictionsObjectContains information on the issual limits for a promotion.
            • nameEnumType of issual restriction. Possible values:<br/>MAX_NUMBER_OF_ISSUALS_PER_CUSTOMER: Maximum number of times a promotion can be issued to a customer.
            • valueIntegerNumber of units corresponding to the name. Specify -1 for no limit (max limit: 100).
        • earnRestrictionsObjectContains information on the earn limits for a promotion (specific to enrol-and-issue promotions).
            • nameEnumType of earn restriction. Possible values:<br/>MAX_NUMBER_OF_EARNS_PER_CUSTOMER: The maximum number of times a loyalty promotion can be issued to a customer.<br/>MAX_NUMBER_OF_EARNS_PER_PROMOTION: The maximum number of times a loyalty promotion can be issued across customers.<br/>MAX_POINTS_PER_EARN_PER_CUSTOMER: The maximum number of points a customer can earn in a single event from a promotion.
            • valueIntegerNumber of units corresponding to the name. Specify -1 for no limit (max limit: 100).
        • expiryRestrictionsObjectContains information on the expiry for a promotion (mandatory for all promotion types).
            • nameEnumAction that is expiring. Possible values:<br/>ISSUAL_PROMOTION_EXPIRY_BASED_ON: The time period within which the customer must complete the activity required to issue the loyalty promotion. Once this lapses, the customer cannot earn the loyalty promotion.<br/>EARN_PROMOTION_EXPIRY_BASED_ON: The time period within which the customer must complete the activity required to receive the loyalty promotion benefits. Once this lapses, the customer cannot earn the benefits.
            • typeEnumType of expiration. Possible values: PROMOTION, CUSTOM.
            • valueIntegerNumber of days the loyalty promotion expires from the date of issual.
scopeObject or nullScope of the promotion restrictions.
isStackableBooleanIndicates if the promotion can be applied alongside other active promotions within the same transaction.
isConsideredForRankingBooleanIndicates if the promotion is included in priority ranking, which controls which promotions take precedence when multiple are applicable to the same transaction.
loyaltyEarningTypeStringIndicates how customers earn rewards under this promotion — whether points are issued automatically or the customer must first opt in before earning.
expiryReminderStringSpecifies the configuration for automated reminder communications sent to customers before their promotion benefits expire.
isExclusiveBooleanIndicates if the promotion is evaluated in isolation, preventing any other promotion from being applied in the same transaction.
isAlwaysApplyBooleanIndicates if the promotion is applied unconditionally, bypassing the ranking and stacking rules configured for the org.
targetGroupIdsArray of IntegersThe customer group IDs specifying which target segments are eligible for this promotion.
linkedTargetGroupVsTargetRuleIdMapObjectMaps each target customer group to the specific eligibility rules that apply to that group for this promotion.
cappingStatusStringIndicates whether capping limits are currently enforced, disabled, or not configured during promotion evaluation.
skipEarnedDateCheckOnRedeemBooleanDetermines whether redemption must occur within the validity window for the earned promotion.
  • false (default): Enforces date checks during redemption. The event date must be between the createdOn and expiresOn dates of the earn.
  • true: Skips the earned date window check during redemption; redemption can proceed even if the event date is before createdOn or after expiresOn.
targetRuleIdsArray of IntegersThe rule IDs specifying which earning rules define the points and benefits available through this promotion.
pageDetailsObjectContains metadata about the paginated result set, including current page, page size, and total record counts.
    • pageNumberIntegerCurrent page number in the paginated result.
    • pageSizeIntegerNumber of items displayed per page.
    • totalEntriesIntegerTotal number of records available for pagination.
   • pageCountIntegerTotal number of pages available for the current query and page size.

API specific error codes

ErrorDescription
8013Identifier name missing or incorrect.
8015Identifier value missing or incorrect.
8003Source is missing or incorrect.
4086limit, offset, or sourceType is missing
4055limit is greater than 100
4027promotionId or startRuleIdentifier doesn't exist
4083Incorrect event name is passed
4082eventName is null / empty
4084sourceType is empty / null
4085sourceType parameter has an invalid value
4056All mandatory query parameters are missing
4050Query parameter is not supported

Path Params
int64
required
int64
required
Responses

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