Get Loyalty Promotion by ID

Get details of the promotion using promotion ID.

This API retrieves the details of the specified promotion using the promotion ID and the corresponding program ID. It provides detailed information about the specific promotion including the type of promotion, its status, associated ruleset, program details, dates, limits, stacking, ranking, and restrictions.

By default, the types of promotions, ranking and stacking 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.

Types of promotions

There are three different types of promotions:

  • GENERIC (UI term - Available without issue)
  • LOYALTY (UI term - Direct issue)
  • LOYALTY_EARNING (UI term - Enrol & Issue)

The field pointsOfferType in the response provides information on the type of promotion.

Limits and restrictions

if the Types of promotions are enabled for your organisation, then the information regarding the limits and restrictions on issual, earning, or redemption is available in the objects promotionRestriction, object. This information is also replicated in the limits objects.

If your organisation does not have the Types of promotions enabled, the details on the limits and restrictions are only available in the limits object.

API endpoint example

<[https://eu.api.capillarytech.com/api_gateway/loyalty/v1/programs/469/promotions/57099/get>

Prerequisites

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

Resource information

URI/api_gateway/loyalty/v1/programs\{programId\}/promotions\{promotionId\}/get
HTTP methodGET
Pagination supported?No
Rate limitNA
Batch supportNA

Path parameters

ParameterDatatypeDescription
programId*LongUnique identifier of the loyalty program.
promotionId*LongUnique identifier of the loyalty promotion. Getting details of a loyalty promotion is currently supported by using the promotionId.
curl --location 'https://eu.api.capillarytech.com/api_gateway/loyalty/v1/programs/973/promotions/95085/get' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'Authorization: Basic *******' \
--header 'Cookie: _cfuvid=PalohBnIeOaJn_i7_SIjlvuMVIMKCKUXffaPvYTwUdU-1758871239198-0.0.1.1-604800000'

Response parameters

ParameterTypeDescription
statusObjectContains status information for the response.
.codeIntegerResponse code. Eample: 200
.messageStringStatus message. Example: success
validationErrorsObject or nullValidation errors, if any.
dataArray of ObjectsContains promotion data.
.idIntegerUnique identifier of the promotion.
.nameStringName of the promotion.
.descriptionStringDescription of the promotion.
.promotionStatusStringCurrent status of the promotion. Example: COMPLETED, LIVE, PENDING, EXPIRED, UPCOMING
.lastUpdateDateString (ISO 8601)The date and time when the promotion was last updated.
.lastUpdatedByIntegerID of the user who last updated the promotion.
.rulesetInfosArrayInformation about the ruleset associated with the promotion.
..idIntegerUnique identifier for the ruleset.
..orgNameStringOrganization name.
..contextIDIntegerContext ID of the ruleset.
..orgIDIntegerOrganization ID.
..contextTypeStringType of context. Example: program
..rulesArrayRules defined for the promotion.
...idIntegerUnique identifier for the rule
...expStringExpression defining the rule.
...expJSONStringExpression in JSON format.
...jsonTypeStringJSON type of the expression.
...isActiveBooleanIndicates if the rule is active.
...priorityIntegerPriority level of the rule.
...startDateLongRule start date (epoch).
...endDateLongRule end date (epoch).
...createdOnLongRule creation timestamp (epoch).
...caseToActionsObjectDefines actions when rule evaluates to true.
....trueArrayActions executed when the expression evaluates to true.
.....idIntegerAction ID.
.....actionNameStringName of the action.
.....actionClassStringJava class implementing the action.
.....mandatoryPropertiesValuesObjectKey-value pairs of mandatory properties.
......(key-value pairs)String/IntegerSpecific property values (e.g., "PointType": "Main").
.....mandatoryComplexPropertiesValuesObjectHolds mandatory complex properties.
.....descriptionStringDescription of the action.
...ruleScopeStringscope of the rule. Example: SERVER
...createdByIntegerID of the user who created the rule.
...modifiedByIntegerID of the user who last modified the rule.
...modifiedOnLongLast modified date (epoch).
...nameStringRule name.
...descriptionStringRule description.
...expDataTypeStringData type of the rule expression.
...filterInfoArrayFilters applied to the rule.
...ruleSetIdIntegerID of the ruleset to which the rule belongs.
...updatedViaNewUIBooleanIndicates whether the rule was updated via the new UI.
..ruleScopeStringScope of the ruleset.
..startDateLongRuleset start date (epoch).
..endDateLongRuleset end date (epoch).
..createdOnLongRuleset creation timestamp (epoch).
..createdByIntegerID of ruleset creator.
..modifiedByIntegerID of last user who modified the ruleset.
..modifiedOnLongRuleset last modification timestamp.
..nameStringRuleset name.
..packageNameStringPackage name.
..descriptionStringRuleset description.
..filterInfoArray of ObjectsFilters applied to the ruleset.
...idIntegerFilter ID.
...orgIDIntegerOrganization ID.
...ruleIDIntegerAssociated rule ID.
...nameStringFilter name (e.g., "LoyaltyType", "EventSource").
...classNameStringJava class name implementing the filter.
...isIncludeBooleanWhether the filter includes or excludes matches.
...propertyToValuesObjectKey-value pairs defining filter property values.
....(key-value pairs)Array of StringsValues applied in the filter (e.g., "loyalty", "INSTORE").
..eventTypeString or nullEvent type (if applicable).
..cappingInfoArrayCapping info for the ruleset.
..updatedViaNewUIBooleanWhether ruleset updated via new UI.
..labelString or nullRuleset label.
..privateBooleanWhether ruleset is private.
.programNameStringProgram name.
.programIdIntegerProgram identifier.
.startDateString (ISO 8601)Promotion start date.
.endDateString (ISO 8601)Promotion end date.
.identifierStringPromotion unique identifier.
.isActiveBooleanIndicates if promotion is active.
.eventNameStringEvent name triggering the promotion.
.allocatePointsOnStringDefines when points are allocated. Example: BILL
.limitsObjectDefines limits of the promotion.
..pointsPerCustomerIntegerMaximum points a customer can earn.
..numberOfTimesPerCustomerIntegerMaximum number of activities per customer that can allocate points.
..totalPointsInPromotionIntegerMaximum points permitted across customers within the promotion duration.
..totalPointsPerEventLimitIntegerLimit on the total points that can be earned per event within the promotion.
.useProportionsBooleanIndicates whether proportions are used for the promotion.
.pointsOfferTypeStringType of promotion. Example: GENERIC/LOYALTY/LOYALTY_EARNING
.promotionRestrictionsObjectRestrictions and settings for the promotion. Issual restrictions - Provides info on the restrictions on the enrolment of the customers. earnRestrictions provides information on the restrictions on the promotion issual. expiryRestrictions provide info on the enrol and issue expiry. Redemption restrictions provides information on the maximum redemptions of points per issue of promotion
..restrictionsStringRestriction details.
..scopeStringScope of restrictions.
..loyaltyEarningTypeEnumMode of loyalty earning for the promotion. Values: ISSUE_AND_EARN, DIRECT_EARN
..expiryReminderStringNotification config for reminding customers before promotion/earn expiry.
..targetGroupIdsArrayTarget group identifiers
..targetRuleIdsArrayTarget rule identifiers
..linkedTargetGroupVsTargetRuleIdMapObjectCanonical mapping of target group ID to a list of target rule IDs
..cappingStatusStringStatus flag indicating whether capping is active/considered for the promotion scope.
..skipEarnedDateCheckOnRedeemBooleanIndicates whether to skip the earned date check during redemption. If true, the system bypasses the earned date check during redemption validations.
..isStackableBooleanIndicates whether promotion can be stacked.
..isConsideredForRankingBooleanIndicates whether the promotion participates in ranking strategies.
..isExclusiveBooleanIndicates whether promotion is exclusive. If true, users cannot combine this promotion with other promotions during application.
..isAlwaysApplyBooleanIndicates whether promotion always applies. If true, always apply promotion when eligible, irrespective of ranking/strategy conflicts.

Example response

{
    "status": {
        "code": 200,
        "message": "success"
    },
    "validationErrors": null,
    "data": [
        {
            "id": 95085,
            "name": "AllRewards",
            "description": "",
            "promotionStatus": "COMPLETED",
            "lastUpdateDate": "2025-06-23T08:02:58Z",
            "lastUpdatedBy": 75155288,
            "rulesetInfos": [
                {
                    "id": 126408744,
                    "orgName": "DocDemo",
                    "contextID": 973,
                    "orgID": 100737,
                    "contextType": "program",
                    "rules": [
                        {
                            "id": 126595178,
                            "exp": "true",
                            "expJSON": "\n{\n  \"arity\":\"literal\",\n  \"value\":\"true\",\n  \"type\":\"boolean:primitive\"\n}",
                            "jsonType": "JNODE",
                            "isActive": true,
                            "priority": -1,
                            "startDate": 1118300462375,
                            "endDate": 2064985262375,
                            "createdOn": 1749452462375,
                            "caseToActions": {
                                "true": [
                                    {
                                        "id": 126771365,
                                        "actionName": "AWARD_POINTS_ACTION",
                                        "actionClass": "com.capillary.shopbook.pointsengine.endpoint.impl.action.AwardPointsActionImpl",
                                        "mandatoryPropertiesValues": {
                                            "ProRateOnSourceValue": "EVENT_DEFAULT_VALUE",
                                            "DelayStrategy": "AS_DEFINED_IN_ALLOCATION_STRATEGY",
                                            "SourceValueRoundingStrategy": "ACTUAL",
                                            "EvaluatedEntity": "USER",
                                            "ExpiryStrategy": "11833",
                                            "PointType": "Main",
                                            "AwardStrategy": "11879",
                                            "DelayExtendedFieldName": "",
                                            "PointsRoundingStrategy": "ACTUAL"
                                        },
                                        "mandatoryComplexPropertiesValues": {},
                                        "description": "2X"
                                    },
                                    {
                                        "id": 126771366,
                                        "actionName": "CONVERT_POINTS_TO_REWARD_ACTION",
                                        "actionClass": "com.capillary.shopbook.pointsengine.endpoint.impl.action.RewardIssualActionImpl",
                                        "mandatoryPropertiesValues": {
                                            "quantityBasedOn": "POINTS_ON_EVENT",
                                            "brandName": "DOCDEMO",
                                            "rewardId": "295948",
                                            "brandId": "61",
                                            "quantityValue": "",
                                            "isRewardIssualForCustomerActivity": "true",
                                            "fulfillmentStatus": "ON ITS WAY"
                                        },
                                        "mandatoryComplexPropertiesValues": {},
                                        "description": "Convert points to reward action"
                                    },
                                    {
                                        "id": 126771367,
                                        "actionName": "BADGE_EARN_ACTION",
                                        "actionClass": "com.capillary.shopbook.pointsengine.endpoint.impl.action.BadgeEarnActionImpl",
                                        "mandatoryPropertiesValues": {
                                            "ownerType": "Loyalty_Promotion",
                                            "badgeMetaId": "67eb99516666db076c3c7519",
                                            "badgeMetaName": "Badge Issue georgetest",
                                            "referenceId": "973_TransactionAdd_c143a683"
                                        },
                                        "mandatoryComplexPropertiesValues": {},
                                        "description": "Badge Issue georgetest"
                                    },
                                    {
                                        "id": 126771368,
                                        "actionName": "ISSUE_ALTERNATE_CURRENCY_9DxGBP",
                                        "actionClass": "com.capillary.shopbook.pointsengine.endpoint.impl.action.BillAwardPointsActionImpl",
                                        "mandatoryPropertiesValues": {
                                            "ProRateOnSourceValue": "EVENT_DEFAULT_VALUE",
                                            "DelayStrategy": "AS_DEFINED_IN_ALLOCATION_STRATEGY",
                                            "SourceValueRoundingStrategy": "ACTUAL",
                                            "EvaluatedEntity": "USER",
                                            "AlternateCurrencyIdentifier": "9DxGBP",
                                            "ZeroAwardStrategy": "11879",
                                            "ExpiryStrategy": "11833",
                                            "PointType": "REGULAR",
                                            "AwardStrategy": "11879",
                                            "DelayExtendedFieldName": "",
                                            "PointsRoundingStrategy": "ACTUAL"
                                        },
                                        "mandatoryComplexPropertiesValues": {},
                                        "description": "2X"
                                    }
                                ]
                            },
                            "ruleScope": "SERVER",
                            "createdBy": 60594279,
                            "modifiedBy": 60594279,
                            "modifiedOn": 1749452462375,
                            "name": "Rule 1",
                            "description": "",
                            "expDataType": null,
                            "filterInfo": [],
                            "ruleSetId": 126408744,
                            "updatedViaNewUI": false
                        }
                    ],
                    "ruleScope": "SERVER",
                    "startDate": 1749427200000,
                    "endDate": 1751327999000,
                    "createdOn": 1749452462375,
                    "createdBy": 60594279,
                    "modifiedBy": 60594279,
                    "modifiedOn": 1749452462375,
                    "name": "ruleset_20250609070102",
                    "packageName": "",
                    "description": "",
                    "filterInfo": [
                        {
                            "id": 126644898,
                            "orgID": 100737,
                            "ruleID": -1,
                            "name": "LoyaltyType",
                            "className": "com.capillary.shopbook.emf.impl.filter.LoyaltyTypeFilterImpl",
                            "isInclude": true,
                            "propertyToValues": {
                                "loyaltyType": [
                                    "loyalty"
                                ]
                            }
                        },
                        {
                            "id": 126644899,
                            "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": null,
                    "private": false
                }
            ],
            "programName": "DocDemoDefaultProgram",
            "programId": 973,
            "startDate": "2025-06-09T00:00Z",
            "endDate": "2025-06-30T23:59:59Z",
            "identifier": "0b89574e-aab9-49ad-812f-c1ea709f5daf",
            "isActive": true,
            "eventName": "TRANSACTIONADD",
            "allocatePointsOn": "BILL",
            "limits": {
                "pointsPerCustomer": 0,
                "numberOfTimesPerCustomer": 0,
                "totalPointsInPromotion": 0,
                "totalPointsPerEventLimit": 0
            },
            "useProportions": false,
            "pointsOfferType": "GENERIC",
            "promotionRestrictions": {
                "restrictions": null,
                "scope": null,
                "loyaltyEarningType": null,
                "expiryReminder": null,
                "targetGroupIds": null,
                "targetRuleIds": null,
                "linkedTargetGroupVsTargetRuleIdMap": null,
                "cappingStatus": null,
                "skipEarnedDateCheckOnRedeem": false,
                "isStackable": false,
                "isConsideredForRanking": false,
                "isExclusive": false,
                "isAlwaysApply": false
            }
        }
    ]
}

API-specific error codes

Error codeDescription
4029Promotion ID is invalid.
2010Program ID is invalid.
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!