Convert Promised Points

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

URIv2/points/unlockPromisedPoints
HTTP MethodPOST
PaginationNo
Batch supportNA
Rate limit informationNA

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: mobile, id, externalId, cuid, primaryUserId

identifierValue*

String

Value corresponding to the identifierName provided.

source*

Enum

Source of customer information. Supported values: INSTORE,FACEBOOK,WEB_ENGAGE,WECHAT,MARTJACK,TMALL,TAOBAO,JD,ECOMMERCE,WEBSITE,LINE,MOBILE_APP

type

String

Type of entity. Supported value: USERGROUP2, CUSTOMER(default).

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

ParameterData TypeDescription
eventName*StringUnique ID of the event that issued the points
billNumber*StringUnique bill number of the transaction
eventLogIdArrayUnique ID that is generated when the event is triggered.
lineItemIdsArray (Long)List of unique identifiers for line items in a transaction or bill.
itemCodesArray (String)List of codes or SKUs that represent specific products or items in a transaction.
billDateStringDate of the transaction in YYYY-MM-DD
sourceStoreIdIntegerUnique ID of the store where the transaction occurred.
sourceTillIdIntegerUnique till ID where the transaction occurred.
sourceProgramIdIntegerUnique 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.

  • billNumber

Unique bill number of the transaction

  • itemCode

List of codes or SKUs that represent specific products or items in a transaction.

  • pointsUnlocked

Total number of points unlocked for the bill.

  • programId

Unique ID of the loyalty program where the transaction occurred.

  • promotionIdentifier

External identifier for the loyalty promotion. Required if promotionId is not provided.

  • promotionName

Unique name of the promotion.

API Specific Error Code

Error CodeDescriptionReason / When It Occurs
1645Group details passed are not valid.Occurs when an invalid or incorrect USERGROUP2 identifier is passed in query parameters.
82323284identifierName, identifierValue, or source cannot be empty.Happens when one or more of these fields are missing or empty in the request.
82323277No bill found for given bill number.Triggered when an invalid or non-existent billNumber is passed in query parameters.
82323271Bill number missing.Raised when billNumber is not included in the request body.
82323272Event name not found.Occurs when eventName is missing or invalid in the request body.
82323276Entity type invalid.Happens when an invalid entity.type is passed in query parameters.
3918Error unlocking points: no eventLog found for given eventLogId.Raised when an invalid or non-existent eventLogId is provided in the request body.
82323282No promise points found to unlock.Returned when no promised points are found for the given request context (e.g., item codes, line items).
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!