This API allows for manual adjustment of a customer's loyalty tier (slab), including upgrading, downgrading, renewing the current tier, or extending its expiry date.
Prerequisites
- Authentication: Basic/OAuth authentication
- Access group: Default access group
Resource Information
URI | v2/slab/manualSlabAdjustment |
HTTP Method | POST |
Pagination | No |
Batch support | NA |
Rate limit information | NA |
API Endpoint Example
https://eu.api.capillarytech.com/v2/slab/manualSlabAdjustment?identifierName=id&identifierValue=8124102&source=INSTORE
Query Parameters
Parameter Name (Parameters marked as * are mandatory) |
Data Type | Description |
---|---|---|
source* |
String |
Source of customer information. Supported values: |
identifierName* |
String |
Identifier type to identify the customer. Supported values: |
identifierValue* |
String |
Value corresponding to the |
type |
String |
Type of entity to adjust the tier. Supported values: |
Request Body Example
{
"programId": 973,
"toSlabName": "Emerald",
"slabAction": "UPGRADE",
"manualSlabActionValidity": "FIXED_DURATION",
"manualSlabActionValidityUpto": "20",
"reassessTierOnNextActivity": true,
"slabChangeReason": "Won the tier giveaway"
}
Request Body Parameters
Parameter (Parameters marked as * are required) | Data Type | Description |
---|---|---|
programId* |
Integer |
Unique ID of the loyalty program. To retrieve the |
slabAction* |
Enum |
Type of slab change being performed. Supported values: |
toSlabName |
String |
Name of the slab to upgrade or downgrade the customer to. This parameter is required if |
manualSlabActionValidity* |
Enum |
Validity period for the tier change. Supported values: |
manualSlabActionValidityUpto* |
Long |
Date or number of days the customer's tier upgrade or downgrade is valid till. |
reassessTierOnNextActivity |
Boolean |
Specify if the customer's tier during their next transaction or activity should be re-evaluated. The value is |
slabChangeReason |
String |
Reason for changing, renewing or extending the customer's tier. Character limit: 255 characters. |
Response Body
{
"programId": 973,
"entityId": 424134447,
"sideEffects": [
{
"entityType": "USER",
"previousSlabName": "Ruby",
"previousSlabNumber": 2,
"upgradedSlabName": "Emerald",
"upgradedSlabNumber": 3,
"slabExpiryDate": "30th Nov, 2025",
"type": "slab"
}
],
"warnings": []
}
{
"programId": 2834,
"entityId": 424134447,
"sideEffects": [
{
"entityType": "USER",
"previousSlabName": "GOLD",
"previousSlabNumber": 3,
"upgradedSlabName": "Silver",
"upgradedSlabNumber": 2,
"slabExpiryDate": "30th Nov, 2025",
"type": "slab"
}
],
"warnings": []
}
{
"programId": 2834,
"entityId": 424134447,
"sideEffects": [
{
"entityType": "USER",
"previousSlabName": "GOLD",
"previousSlabNumber": 3,
"upgradedSlabName": "GOLD",
"upgradedSlabNumber": 3,
"slabExpiryDate": "30th Nov, 2025",
"type": "slab"
}
],
"warnings": []
}
Response Body Parameters
Parameter | Description |
---|---|
programId | Unique ID of the loyalty program. |
entityId | Unique ID of the customer whose slab was adjusted. |
sideEffects | Object containing details of the tier adjustment. |
- entityType | Type of entity part of the tier adjustment. Possible values: USER , USERGROUP2 |
- previousSlabName | Customer's slab name before the adjustment. |
- previousSlabNumber | Numerical representation of the previous slab. For example, if the slab was the third slab in the order, the value will be 3 . |
- upgradedSlabName | Customer's slab name after the adjustment. |
- upgradedSlabNumber | Numerical representation of the upgraded or downgraded slab. For example, if the slab was the second slab in the order, the value will be 2 . |
- slabExpiryDate | New expiry date of the customer's slab. |
- type | Type of side effect. Possible value: slab |
warnings | Object containing warnings, if any. |
API Specific Error Code
Error Code | Description | Reason |
---|---|---|
1101 | invalid programId passed | Program ID invalid or unsupported |
8015 | Customer not found for the given identifiers | Invalid customer ID passed |
8917 | slabAction field is not set | Invalid slabAction field passed |
8920 | manualSLabActionValidity field is not set | Invalid manualSLabActionValidity field passed |
8921 | manualSLabActionValidityUpto value should be an integer | Valid Integer not passed for manualSLabActionValidityUpto field |
8923 | slab not found for the given slab name | Invalid or unsupported slab name |
8925 | target slab must be higher than the current slab | Invalid toslabname field passed |