Convert promised points and alternate currencies to redeemable points.
This API can be used to convert promised points and alternate currencies to redeemable points or alternate currencies. All promised reward currencies (points and alternate currencies) are converted to regular reward currencies.
Prerequisites
- Authentication: Basic/OAuth authentication
- Access group: Default access group
Resource Information
URI | v2/points/unlockPromisedPoints |
HTTP Method | POST |
Pagination | No |
Batch support | NA |
Rate limit information | NA |
API endpoint example
https://eu.api.capillarytech.com/v2/points/unlockPromisedPoints
Query parameters
Parameter Name (Parameters marked with * are mandatory) |
Data Type | Description |
---|---|---|
identifierName* |
String |
Identifier type to identify the customer. Supported values: |
identifierValue* |
String |
Value corresponding to the |
source* |
Enum |
Source of customer information. Supported values: |
type |
String |
Type of entity. Supported value: |
Request body
{
"eventName": "TransactionAdd",
"billNumber": 16484,
"eventLogId": 1235315,
"lineItemIds": [
64384,
64743,
94745
],
"itemCodes": [
"gd739",
"gd123"
],
"billDate": 2022-02-12,
"sourceStoreId": 1122,
"sourceTilId": 323,
"sourceProgramId": 2121
}
Request body parameters
Parameter | Data Type | Description |
---|---|---|
eventName* | String | Unique ID of the event that issued the points |
billNumber* | String | Unique bill number of the transaction |
eventLogId | Array | Unique ID that is generated when the event is triggered. |
lineItemIds | Array (Long) | List of unique identifiers for line items in a transaction or bill. |
itemCodes | Array (String) | List of codes or SKUs that represent specific products or items in a transaction. |
billDate | String | Date of the transaction in YYYY-MM-DD |
sourceStoreId | Integer | Unique ID of the store where the transaction occurred. |
sourceTillId | Integer | Unique till ID where the transaction occurred. |
sourceProgramId | Integer | Unique ID of the loyalty program where the transaction occurred. To retrieve the programId , use the Get Loyalty Programs API . |
Response body
{
"pointsUnlocked": [
{
"billNumber": 374,
"pointsUnlocked": 6,
"programId" : 56
},
{
"billNumber": 374
"itemCode": 7583,
"pointsUnlocked": 24,
"programId" : 12
},
{
"billNumber": 374
"itemCode": 4364,
"pointsUnlocked": 12,
"programId" : 34
},
{
"pointsUnlocked": 24,
"programId" : 12,
"promotionIdentifier":"id1"
"promotionId":12
"promotionName":"promotion 1"
}
]
}
Response parameters
Parameter (Parameters marked with * are mandatory) |
Description |
---|---|
pointsUnlocked |
Object containing details of the points unlocked. |
|
Unique bill number of the transaction |
|
List of codes or SKUs that represent specific products or items in a transaction. |
|
Total number of points unlocked for the bill. |
|
Unique ID of the loyalty program where the transaction occurred. |
|
External identifier for the loyalty promotion. Required if |
|
Unique name of the promotion. |
API Specific Error Code
Error Code | Description | Reason / When It Occurs |
---|---|---|
1645 | Group details passed are not valid. | Occurs when an invalid or incorrect USERGROUP2 identifier is passed in query parameters. |
82323284 | identifierName , identifierValue , or source cannot be empty. | Happens when one or more of these fields are missing or empty in the request. |
82323277 | No bill found for given bill number. | Triggered when an invalid or non-existent billNumber is passed in query parameters. |
82323271 | Bill number missing. | Raised when billNumber is not included in the request body. |
82323272 | Event name not found. | Occurs when eventName is missing or invalid in the request body. |
82323276 | Entity type invalid. | Happens when an invalid entity.type is passed in query parameters. |
3918 | Error unlocking points: no eventLog found for given eventLogId. | Raised when an invalid or non-existent eventLogId is provided in the request body. |
82323282 | No promise points found to unlock. | Returned when no promised points are found for the given request context (e.g., item codes, line items). |