Create Reward Currency Limits

❗️

This API is currently under enhancement, so please don't use it. This page will be updated once the API is fully ready to be used.

This API allows you define earning limits for reward currencies (points and alternate currencies). You can also use this API to create a target/milestone and define earning limits on them.

👍

Note

For detailed information about our APIs and for hands-on testing, refer documentation in API overview and step-by-step guide on making your first API call in Make your first API call .

Prerequisites

  • Authentication: Basic/OAuth authentication
  • Default access group
  • Unique identifier of the loyalty program (programId)

Resource information

URI/api_gateway/loyalty/v1/programs/{programId}/cappings
HTTP methodPOST
PaginationNA
Rate limitNA
Batch supportNA

API endpoint example

http://eu.api.capillarytech.com/api_gateway/loyalty/v1/programs/973/cappings

Path Parameters

ParameterData TypeDescription
programIdIntegerUnique ID of the loyalty program.

Request body

{
    "scope": "INDIVIDUAL_EVENT",
    "name": "Capping_NoTarget",
    "entity": "POINTS",
    "eventName": "TRANSACTION_ADD",
    "isActive": true,
    "cappingEntityType": "TRANSACTION_ADD",
    "propertyValues": "{\"limit\": \"10002\", \"additionalFilters\": null}",
    "createdBy": 1824412,
    "enrollmentType": "ENROLL_VIA_AUDIENCE",
    "cappingFilterMapping": [
        {
            "eventSubTypeId": 23,
            "filterEntityType": "EVENT",
            "filterEntityId": 56
        }
    ]
}
{
    "scope": "INDIVIDUAL_EVENT",
    "name": "Capping_NoTarget",
    "entity": "ALTERNATE_CURRENCIES",
    "eventName": "TRANSACTION_ADD",
    "isActive": true,
    "cappingEntityType": "TRANSACTION_ADD",
    "propertyValues": "{\"limit\": \"10002\", \"additionalFilters\": null}",
    "createdBy": 1824412,
    "enrollmentType": "ENROLL_VIA_AUDIENCE",
     "entityIdentifier": "0nzyDx",
    "cappingFilterMapping": [
        {
            "eventSubTypeId": 23,
            "filterEntityType": "EVENT",
            "filterEntityId": 56
        }
    ]
}
{
    "scope": "INDIVIDUAL_CUSTOMER",
    "name": "PointsCapping",
    "entity": "POINTS",
    "targetGroups": "{\"active\": true, \"name\": \"CappingTarget\", \"periods\": [{\"refCode\": \"Cycle_1\", \"startDate\": \"2025-02-01\", \"endDate\": \"2025-04-28\"}], \"frequencyType\": \"CUSTOM\", \"trackingType\": \"CAPPING\", \"targetEvaluationType\": \"FIXED_CALENDAR_WINDOW\", \"preferredTillId\": -1, \"targets\": [{\"active\": true, \"name\": \"CappingTarget\", \"targetEntity\": \"POINTS\", \"defaultValues\": [{\"defaultValue\": \"100\"}], \"enrolmentMethod\": \"TRANSACTION\", \"targetType\": \"REGULAR_POINTS\", \"filters\": []}]}",
    "eventName": "TRANSACTION_ADD",
    "isActive": true,
    "cappingEntityType": "TRANSACTION_ADD",
    "propertyValues": "{\"limit\": \"10002\", \"additionalFilters\": null}",
    "createdBy": {{jp}},
    "enrollmentType": "ENROLL_VIA_AUDIENCE",
    "cappingFilterMapping": [
        {
            "eventSubTypeId": 23,
            "filterEntityType": "EVENT",
            "filterEntityId": 56
        }
    ]
}
{
    "scope": "INDIVIDUAL_CUSTOMER",
    "name": "AlternateCurrencyCapping",
    "entity": "ALTERNATE_CURRENCIES",
    "targetGroups": "{\"active\":true,\"name\":\"AlternateCurrencyCappingTG\",\"periods\":[{\"refCode\":\"Cycle_1\",\"startDate\":\"2025-02-01\",\"endDate\":\"2025-04-28\"}],\"frequencyType\":\"CUSTOM\",\"trackingType\":\"CAPPING\",\"targetEvaluationType\":\"FIXED_CALENDAR_WINDOW\",\"preferredTillId\":-1,\"targets\":[{\"active\":true,\"name\":\"AlternateCurrencyCappingTG\",\"targetEntity\":\"ALTERNATE_CURRENCIES\",\"defaultValues\":[{\"defaultValue\":\"100\"}],\"enrolmentMethod\":\"TRANSACTION\",\"targetType\":\"REGULAR\",\"filters\":[],\"extendedFieldInfo\":{\"alternateCurrencyIdentifier\":\"0nzyDx\",\"programId\":46}}]}",
    "eventName": "TRANSACTION_ADD",
    "isActive": true,
    "cappingEntityType": "TRANSACTION_ADD",
    "propertyValues": "{\"limit\": \"10002\", \"additionalFilters\": null}",
    "createdBy": {{jp}},
    "entityIdentifier": "0nzyDx",
    "enrollmentType": "ENROLL_VIA_AUDIENCE",
    "cappingFilterMapping": [
        {
            "eventSubTypeId": 23,
            "filterEntityType": "EVENT",
            "filterEntityId": 56
        }
    ]
}

Request body parameters

Parameter Name
(Parameters marked with * are mandatory )
Data TypeDescription
scope*EnumLevel at which limits is applied. Supported values:
INDIVIDUAL_EVENT: Limits reward currencies (points or alternate currencies) for a single transaction or behavioural event.
INDIVIDUAL_CUSTOMER: Limits reward currencies (points or alternate currencies ) across multiple transactions or behavioural events.
name*StringUnique name for the limits criteria. Maximum character limit: 200 characters, special characters are supported.
entity*EnumSpecifies which reward currency is being limited. Supported values:
POINTS: Limit the number of points a customer can earn.
ALTERNATE_CURRENCIES: Limit the number of alternate currencies a customer can earn.
targetGroupsString (JSON)Serialised JSON string defining the target group details. This is required when scope=INDIVIDUAL_CUSTOMER. Refer to the documentation for more information on creating points target and alternate currency targets.
eventName*EnumDefine the event that triggers the limits. Supported values:
TRANSACTION_ADD
isActiveBooleanIndicate if limiting reward currencies is active or inactive. Supported values:
true: Capping is active.
false: Capping is inactive.
cappingEntityType*EnumSpecifies where the limits are applied to. Supported values:
ALL_EVENTS: Limits reward currencies earned from all events, transactional and behavioural.
PROMOTION: Limits reward currencies earned from loyalty promotions.
TRANSACTION_ADD: Limits reward currencies earned from transactions.
propertyValues*String (JSON)Serialised JSON string containing the limits configurations such as reward currency limits and additional filtering rules. The limit field defines the reward currency limit.
createdBy*LongUnique customer identifier of the user who created the limit rules.
entityIdentifierStringUnique identifier of the alternate currency that is generated when creating an alternate currency.
enrollmentTypeEnumSpecifies how the customer is enrolled into the target group. Supported values:
UPLOAD: Customer details are uploaded and enrolled manually.
ENROLL_VIA_AUDIENCE: Customer are enrolled through audience groups. Use this if scope=INDIVIDUAL_CUSTOMER.
enrollmentTypeBodyString (JSON)JSON string containing enrollment configuration details.
cappingFilterMapping*ObjectObject containing details of filter configurations that determine when the limits rule applies.
- filterEntityType*EnumSpecifies what the filter applies to. Supported values: EVENT and PROMOTION
- eventSubTypeId*LongID of a specific event subtype that the capping applies to. This field is used to track specific variations or subtypes of events like TransactionAdd, PointsRedemption, etc.
Refer to the section on event subtype IDs for more information.
- filterEntityId*IntegerID of the event or promotion being filtered.
When filterEntityType is EVENT, the filterEntityId will correspond to a specific event ID.
When filterEntityType is PROMOTION, the filterEntityId will correspond to a specific promotion ID.

Event Subtype IDs

Category Event ID Event Name
Core Transaction Events 1 NewBill
3PointsRedemption
4VoucherRedemption
5ReturnBill
9TransactionFinished
11TransactionUpdate
16DelayedAccrual
19GroupTransactionUpdate
20GroupReturnBill
Customer Related Events 22 GroupMemberJoin
23GroupMemberLeave
25PointsTransfer
28TargetCompleted
29PointsRedemptionReversal
Communication Events 6 TrackerConditionSuccess
10ReferralPostProcessing
13EmailOpen
14EmailClick
17Scan
Generic/System Events -1 CampaignRefereeRedeem
CampaignReferralReferrer
IncomingSms
PartnerProgramTierUpdate
PartnerProgramDeLinking
SlabUpgrade
SocialConnectUpdate
VoucherPreRedemption

Response body

{
    "code": null,
    "message": "Capping created successfully"
}

Response parameters

FieldData TypeDescription
codeIntegerError code of the response, if any.
messageStringSuccess or error message for the response, if any.

API error codes

CodeDescriptionReason
-Scope must not be nullscope is not provided in the request.
-Name must not be nullname is not provided in the request.
-Entity must not be nullentity is not provided in the request.
-EventName must not be nulleventName is not provided in the request.
-CappingEntityType must not be nullcappingEntityType is not provided in the request.
-PropertyValues must not be nullpropertyValues is not provided in the request.
-CreatedBy must not be nullcreatedBy is not provided in the request.
-CappingFilterMapping must not be nullcappingFilterMapping object is not provided in the request.
-CappingFilterMapping must not be emptyParameters under cappingFilterMapping are not provided in the request.
-TargetGroups must not be null for INDIVIDUAL_CUSTOMERtargetGroups is not provided in the request. This is required when scope=INDIVIDUAL_CUSTOMER
-enrollmentTypeBody must not be null for AUDIENCE_FILTERIf scope=INDIVIDUAL_CUSTOMER and targetGroup has the AUDIENCE_FILTER parameter, the enrollmentTypeBody JSON string must not be empty.
max limit for cart and customer based capping is 50 eachThe maximum limit for the number of cappings for cart and customer has exceeded.

Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!