Issue Loyalty Promotion to Customers

Direct issue promotions, also known as LOYALTY promotions in the backend, are a type of promotion where a specific promotion is initially issued to customers based on their behavioural events or transactions. Subsequently, upon meeting the criteria defined in the promotion during their next transaction, the benefits are provided.

This API allows you to issue promotions directly to the customers (the customer earns the promotion).

🚧

Note

This is an old API and it is recommended to use the new Direct Issue API for issuing a promotion to a single or customers in bulk.

API endpoint example

https://eucrm.cc.capillarytech.com/v2/promotion/issue?identifierName=mobile&identifierValue=18767431754&source=INSTORE

Prerequisites

  • Authentication - Basic or OAuth authentication
  • Access group resource - Write access to customer group resource
  • The promotion type should be LOYALTY.

Resource information

URI/v2/promotion/issue
HTTP methodPOST
Pagination supported?NA
Rate limitNA
Batch supportNA

Query Parameters

Parameter
(Parameters marked with * are mandatory)
Data typeDescription
identifierName*EnumIdentifier type to identify the customer. Values allowed: email, mobile, externalId, id
identifierValue*StringValue of the identifier.
source*EnumSpecifies the source from where customer details are retrieved. Values allowed: FACEBOOK, WEB_ENGAGE, INSTORE, MARTJACK, TMALL, TAOBAO, JD, ECOMMERCE, WEBSITE, LINE, MOBILE_APP
typeEnumType of entity. Values allowed: CUSTOMER.
accountIdStringUnique account ID of the customer.

Body Parameters

Parameter
(Parameters marked with * are mandatory)
Data typeDescription
programId*LongUnique ID for the program associated with the promotion.
promotionId*LongUnique ID for the promotion into which enrol or issue occurs.
{
    "programId": 469,
    "promotionId": 65777
}

Response parameters

Parameter NameData TypeDescription
warningsObjectA list of warnings, if any, in the response.
errorsObjectA list of errors, if any, in the response.
sideEffectsObjectResultant object generated on running the API. This includes details related to the promotion and program on which promotion issued.
- programIdLongUnique ID for the program associated with the promotion.
- issualIdIntegerNot applicable for direct promotion issue. This is for backend usage.
earnedIdIntegerUnique ID gnererated when the promotion is issued to a customergenerated.
- promotionIdLongUnique ID for the promotion into which enrol or issue occurs.
- typeStringThe value of the field is Points promotion. This parameter is not valid.
{
    "warnings": [],
    "errors": [],
    "sideEffects": [
        {
            "programId": 2750,
            "issualId": 809,
            "earnedId": 764,
            "promotionId": 201436,
            "type": "Points promotion"
        }
    ]
}
{
    "warnings": [
        {
            "status": false,
            "code": 8890,
            "message": "promotion not issued due to config issues or customer exhausted limits"
        }
    ],
    "errors": [],
    "sideEffects": []
}
{
    "warnings": [],
    "errors": [
        {
            "status": false,
            "message": "invalid programId passed",
            "code": 1101
        }
    ]
}
{
    "warnings": [],
    "errors": [
        {
            "status": false,
            "message": "promotion id passed is invalid",
            "code": 8874
        }
    ]
}
{
    "warnings": [],
    "errors": [
        {
            "message": "identifierName, identifierValue, source can not be empty",
            "code": 11013,
            "status": false
        }
    ]
}
{
    "warnings": [],
    "errors": [
        {
            "status": false,
            "code": 8015,
            "message": "Customer not found for the given identifiers"
        }
    ]
}

API-specific error codes

Error CodeDescription
11013Mandatory parameters identifierName, identifierValue, or source missing.
1212Entity type invalid.
8874Promotion ID is invalid.
1101Program ID is invalid.
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!