Create points restriction

This API allows the brand to restrict the customer to the number of points they burn/redeem in the rewards catalog.

This helps brands control the customer’s activity on the rewards catalog and instead use these points while making transactions, eventually bringing more business to the brands.

👍

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 .

An org can have a limit of 50 restrictions that can be created.

A specific KPI, you can set a maximum of 15 active restrictions.

Prerequisites

  • Basic or OAuth Authentication
  • Default access group

Resource information

URIapi_gateway/rewards/core/v1/brand/constraints
HTTP MethodPOST
PaginationNo
Batch supportNo
Rate limit informationNone

API endpoint example

https://eucrm.cc.capillarytech.com/api_gateway/rewards/core/v1/brand/constraints

Request body parameters

ParameterData TypeDescription
kpi*StringThe KPI on which the restriction is applied. Supported value: POINTS
constraintLevel*EnumThe level at which restrictions would be defined by org and applied.
Supported values: CUSTOMER_CONTENT_TYPE, CUSTOMER.

Only one combination of Constraint_Level & KPI is allowed with the DAILY, WEEKLY, or MONTHLY frequency type.
frequencyType*EnumThe frequency at which the constraint is applied. Supported values: DAILY, WEEKLY, MONTHLY. The points redemption is only applicable on fixed window restrictions.
intervalValue*IntegerThe interval at which the frequency is applied.
constraintLimitValue*IntegerThe limit value for the constraint.
isActive*BooleanStatus of the constraint, whether it is active or not
redemptionType*StringType of intouch reward.
Supported values: INTOUCH_REWARD, VENDOR_INTOUCH_REWARD, VENDOR_ONLY_REWARD, CART_PROMOTION, MILES, VOUCHER, POINTS, CHARITY, CASH_BACK,CASH_WALLET,CARD_DISC, GAMES.
[
    {   
        "kpi" :"POINTS",
        "constraintLevel" : "CUSTOMER_REDEMPTION_TYPE",
        "frequencyType" : "MONTHLY",
        "intervalValue" : 1,
        "constraintLimitValue" : 100,
        "isActive" : true,
        "redemptionType": "NULL"
    }

]
[
    {
        "orgId": 51544,
        "kpi": "POINTS",
        "constraintLevel": "CUSTOMER",
        "frequencyType": "DAILY",
        "constraintLimitValue": 3,
        "isActive": true,
        "intervalValue": 1,
        "redemptionType": "INTOUCH_REWARD"
    }
]
[
    {
        "orgId": 51544,
        "kpi": "POINTS",
        "constraintLevel": "CUSTOMER_REDEMPTION_TYPE",
        "frequencyType": "DAILY",
        "constraintLimitValue": 3,
        "isActive": true,
        "intervalValue": 1,
        "redemptionType": "INTOUCH_REWARD"
    }
]
[
    {   "kpi" :"POINTS",
        "constraintLevel" : "CUSTOMER",
        "frequencyType" : "DAILY",
        "intervalValue" : 1,
        "constraintLimitValue" : 5,
        "isActive" : true,
        "redemptionType": "VOUCHER"
    },
    {   "kpi" :"POINTS",
        "constraintLevel" : "CUSTOMER_REDEMPTION_TYPE",
        "frequencyType" : "WEEKLY",
        "intervalValue" : 1,
        "constraintLimitValue" : 10,
        "isActive" : true,
        "redemptionType": "CHARITY"
    },
    {   "kpi" :"POINTS",
        "constraintLevel" : "CUSTOMER_REDEMPTION_TYPE",
        "frequencyType" : "WEEKLY",
        "intervalValue" : 1,
        "constraintLimitValue" : 10,
        "isActive" : true,
        "redemptionType": "GAMES"
    }

]
[
    {   "kpi" :"POINTS",
        "constraintLevel" : "CUSTOMER",
        "frequencyType" : "DAILY",
        "intervalValue" : 1,
        "constraintLimitValue" : 5,
        "isActive" : true
    },
    {   "kpi" :"POINTS",
        "constraintLevel" : "CUSTOMER_REDEMPTION_TYPE",
        "frequencyType" : "WEEKLY",
        "intervalValue" : 1,
        "constraintLimitValue" : 10,
        "isActive" : true,
        "redemptionType": "MILES"
    }

]

Resopnse parameters

ParameterData TypeDescription
rewardConstraintIdIntegerUnique identifier for the reward constraint
orgIdIntegerUnique identifier for the org
kpiStringThe KPI on which the restriction is applied. Supported value: POINTS
constraintLevelStringThe level at which restrictions would be defined by org and applied on.
Supported values: CUSTOMER_CONTENT_TYPE, CUSTOMER.

Only one combination of Constraint_Level & KPI is allowed with the DAILY, WEEKLY, or MONTHLY frequency type.
frequencyTypeStringFrequency at which the constraint is applied, "DAILY"
constraintLimitValueIntegerThe limit value for the constraint.
isActiveBooleanStatus indicating whether the constraint is active
intervalValueIntegerThe interval at which the frequency is applied.
status.successBooleanIndicates if the status check was successful
status.codeIntegerStatus code associated with the constraint check
redemptionTypeStringType of intouch reward.
Supported values: INTOUCH_REWARD, VENDOR_INTOUCH_REWARD, VENDOR_ONLY_REWARD, CART_PROMOTION, MILES, VOUCHER, POINTS, CHARITY, CASH_BACK,CASH_WALLET,CARD_DISC, GAMES.
[
    {
        "rewardConstraintId": 7010,
        "orgId": 50672,
        "kpi": "POINTS",
        "constraintLevel": "CUSTOMER_REDEMPTION_TYPE",
        "frequencyType": "MONTHLY",
        "constraintLimitValue": 100,
        "isActive": true,
        "status": {
            "success": true,
            "code": 0
        },
        "redemptionType": "NULL"
    }
]
[
    {
        "rewardConstraintId": 6984,
        "orgId": 50672,
        "kpi": "POINTS",
        "constraintLevel": "CUSTOMER_REDEMPTION_TYPE",
        "frequencyType": "WEEKLY",
        "constraintLimitValue": 10,
        "isActive": true,
        "startDayOfTheWeek": "MONDAY",
        "status": {
            "success": true,
            "code": 0
        },
        "redemptionType": "CHARITY"
    },
    {
        "rewardConstraintId": 6985,
        "orgId": 50672,
        "kpi": "POINTS",
        "constraintLevel": "CUSTOMER_REDEMPTION_TYPE",
        "frequencyType": "WEEKLY",
        "constraintLimitValue": 10,
        "isActive": true,
        "startDayOfTheWeek": "MONDAY",
        "status": {
            "success": true,
            "code": 0
        },
        "redemptionType": "GAMES"
    },
    {
        "rewardConstraintId": 4915,
        "orgId": 50672,
        "kpi": "POINTS",
        "constraintLevel": "CUSTOMER",
        "frequencyType": "DAILY",
        "constraintLimitValue": 5,
        "isActive": true,
        "intervalValue": 1,
        "status": {
            "success": true,
            "code": 0,
        },
       "redemptionType": "VOUCHER"
    }
]
[
    {
        "rewardConstraintId": 4226,
        "orgId": 100606,
        "kpi": "POINTS",
        "constraintLevel": "CUSTOMER",
        "frequencyType": "DAILY",
        "constraintLimitValue": 3,
        "isActive": true,
        "intervalValue": 1,
        "status": {
            "success": true,
            "code": 0
        }
    }
]
[
    {
        "rewardConstraintId": 4227,
        "orgId": 100606,
        "kpi": "POINTS",
        "constraintLevel": "CUSTOMER_REDEMPTION_TYPE",
        "frequencyType": "DAILY",
        "constraintLimitValue": 3,
        "isActive": true,
        "intervalValue": 1,
        "status": {
            "success": true,
            "code": 0
        },
        "redemptionType": "INTOUCH_REWARD"
    }
]
[
    {
        "rewardConstraintId": 4228,
        "orgId": 100606,
        "kpi": "POINTS",
        "constraintLevel": "CUSTOMER_REDEMPTION_TYPE",
        "frequencyType": "WEEKLY",
        "constraintLimitValue": 10,
        "isActive": true,
        "startDayOfTheWeek": "TUESDAY",
        "status": {
            "success": true,
            "code": 0
        },
        "redemptionType": "MILES"
    },
    {
        "rewardConstraintId": 4226,
        "orgId": 100606,
        "kpi": "POINTS",
        "constraintLevel": "CUSTOMER",
        "frequencyType": "DAILY",
        "constraintLimitValue": 5,
        "isActive": true,
        "intervalValue": 1,
        "status": {
            "success": false,
            "code": 12014,
            "message": "Constraint already exist, use update constraints api"
        }
    }
]

API-specific errors

Error codeDescription
12014Constraint already exist. Use the update points restriction API to update the existing constraint.
12015Constraint does not exist with the passed constraintId, create a new constraint.
12016Cannot pass rewardConstraintId in the create new constraint API.
12017Pass the rewardConstraintId in the update points constraint API.
12018Please make sure isActive flag is true for all the entries in the request body in create constraint call.
12019The limit of org level constraint is reached. Please disable existing constraints to add new constraints. Max org constraints: 50
12020The limit of org level KPIs is reached. Please disable existing KPI constraints to add new constraints. Max org constraints: 15
12022Multiple restrictions are passed. Only one combination of constraint level and KPI is allowed.
Language
Authorization
Basic
base64
:
URL
Click Try It! to start a request and see the response here!