Get promotion data of a specific customer

Retrieve promotion data of a specific customer.

This API retrieves the promotion data of a specified customer. It provides detailed information on the various promotions the customer is associated with within a loyalty program. This includes the types of promotions, point and redemption restriction details, start and end dates, and activation status.

By default, the types of promotions are not available for all the orgs. This needs to be enabled separately. For more details on the types of promotions, refer Types of promotions.

Types of promotions

There are three different types of promotions:

  • GENERIC (UI term - Available without issue)
  • LOYALTY (UI term - Direct issue)
  • LOYALTY_EARNING (UI term - Enrol & Issue)

The field pointsOfferType in the response provides information on the type of promotion.

Limits and restrictions

If the Types of promotions are enabled for your organisation, then the information regarding the limits and restrictions on issual, earning, or redemption is available in the object promotionRestriction. This information is also replicated in the limits and customerUsage objects.

If your organisation does not have the Types of promotions enabled, the details on the limits and restrictions are available only in the limits and customerUsage objects.

API endpoint example

(https://eucrm.cc.capillarytech.com/v2/customers/lookup/promotionData?identifierName=externalId&identifierValue=000003873354&source=INSTORE&limit=10&offset=0)

Prerequisites

  • Authentication: Basic or OAuth credentials
  • Access group resource: Read access to customer group resource

Resource information

URI/v2/customers/lookup/promotionData
HTTP MethodGET
PaginationYes
Batch supportNo
Rate limit informationNA

Query parameters

Parameter NameData TypeDescription
identifierName*StringIdentifier type to identify the customer.
identifierValue*StringValue for the identifier.
source*StringSource from which you want to fetch the customer details.
limitStringNumber of results that need to be displayed. The values from zero to a maximum of 100 are supported.
offsetStringStart index for data retrieval. This value should not be negative.
https://eucrm.cc.capillarytech.com/v2/customers/lookup/promotionData?identifierName=externalId&identifierValue=000003873354&source=INSTORE&limit=10&offset=0

Response parameters

ParameterData TypeDescription
pageDetailsObjectObject containing pagination details.
- pageNumberIntegerPage number of the current result set.
- pageSizeIntegerNumber of entries per page.
- totalEntriesIntegerTotal number of entries in the result set.
- pageCountIntegerTotal number of pages in the result set.
customerIdIntegerIdentifier of the customer.
promotionsObjectAn object containing details of promotions.
- promotionIdIntegerUnique identifier for the promotion issued to the customer.
- promotionNameStringName of the promotion.
- programIdIntegerIdentifier of the loyalty program associated with the promotion.
- startDateStringStart date of the promotion.
- endDateStringEnd date of the promotion.
- identifierStringUniversally Unique Identifier for the promotion.
- descriptionStringDescription of the promotion.
- activeBooleanIndicates if the promotion is active.
- eventNameStringEvent triggering the promotion.
- promotionMetadataObjectArray containing metadata for the promotion.
- - keyStringKey of the metadata.
- - valueStringValue of the metadata.
- - brandDefinedBooleanIndicates if the metadata is brand-defined.
- limitsObjectObject containing limits set for the promotion.
- - maxPointsPerEventIntegerMaximum number of points offered per event.
- - pointsPerCustomerIntegerMaximum points a customer can earn.
- - numberOFTimesPerCustomerIntegerThe maximum number of activities per customer that can allocate points.
- - totalPointsInPromotionIntegerThe maximum points permitted across customers within the promotion duration.
- customerUsageObjectObject containing customer usage details.
- - currentPointsPerCustomerStringThe current points accrued by the customer.
- - currentNumberOfTimesPerCustomerIntegerThe number of activities through which the customer has received the points.
- - currentTotalPointsInPromotionStringThe points received by all customers within the promotion duration.
- pointsOfferTypeStringType of promotion. The types of promotion are GENERIC, LOYALTY, and LOYALTY_EARNING.
- promotionRestrictionObjectObject containing promotion restriction details. Information in this field is replicated if Advanced loyalty Promotion is available in your org.
- - issualRestrictionsObjectArray containing issual restriction details.
- - - kpiStringKey performance indicator for the restriction. The KPI values are NUMBER_OF_EARNS, NUMBER_OF_ISSUALS, NUMBER_OF_TIMES, and NUMBER_OF_POINTS.
- - - maxLimitStringMaximum times a customer can be enrolled in a promotion.
- - - currentCustomerUsageStringThe present count of a customer's enrolment in a promotion.
- - - limitOnStringSpecifies what the limit applies to. The values are EVENT, CUSTOMER, or PROMOTION.
- - earnRestrictionsObjectArray containing earn restriction details.
- - - kpiStringKey performance indicator for the restriction. The KPI values are NUMBER_OF_EARNS, NUMBER_OF_ISSUALS, NUMBER_OF_TIMES, and NUMBER_OF_POINTS.
- - - maxLimitStringMaximum times a promotion can be issued to a customer.
- - - currentCustomerUsageStringThe present number of instances a promotion is issued to the customer.
- - - limitOnStringSpecifies what the limit applies to. The values are EVENT, CUSTOMER, or PROMOTION.
- - redemptionRestrictionsObjectArray containing redemption restriction details.
- - - kpiStringKey performance indicator for the restriction. The KPI values are NUMBER_OF_EARNS, NUMBER_OF_ISSUALS, NUMBER_OF_TIMES, and NUMBER_OF_POINTS.
- - - maxLimitStringMaximum number of times the points can be availed.
- - - currentCustomerUsageStringThe present number of points availed by the customer.
- - - limitOnStringSpecifies what the limit applies to. The values are EVENT, CUSTOMER, or PROMOTION.
- - - typeStringType of restrictions. The values are NON_PERIOD_BASED or PERIOD_BASED.
warningsObjectAn array containing any warnings.

{
    "pageDetails": {
        "pageNumber": 0,
        "pageSize": 10,
        "totalEntries": 8,
        "pageCount": 1
    },
    "customerId": 555380204,
    "promotions": [
        {
            "promotionId": 56800,
            "promotionName": "issue promotion 1",
            "programId": 469,
            "startDate": "2024-04-04T00:00:00.000Z",
            "endDate": "2024-05-31T23:59:59.000Z",
            "identifier": "f2604502-3356-4994-a9d0-2608cb86702e",
            "description": "Promotion Description",
            "active": true,
            "eventName": "TransactionAdd",
            "promotionMetadata": [
                {
                    "key": "No. of steps",
                    "value": "500",
                    "brandDefined": true
                },
                {
                    "key": "preferred language",
                    "value": "english",
                    "brandDefined": true
                }
            ],
            "limits": {
                "maxPointsPerEvent": "10",
                "pointsPerCustomer": "1000",
                "numberOFTimesPerCustomer": 10,
                "totalPointsInPromotion": "1000"
            },
            "customerUsage": {
                "currentPointsPerCustomer": "0",
                "currentNumberOfTimesPerCustomer": 0,
                "currentTotalPointsInPromotion": "0"
            },
            "pointsOfferType": "GENERIC",
            "promotionRestriction": {
                "issualRestrictions": [],
                "earnRestrictions": [],
                "redemptionRestrictions": [
                    {
                        "kpi": "NUMBER_OF_POINTS",
                        "maxLimit": "10",
                        "limitOn": "EVENT",
                        "type": "NON_PERIOD_BASED"
                    },
                    {
                        "kpi": "NUMBER_OF_TIMES",
                        "maxLimit": "10",
                        "currentCustomerUsage": "0",
                        "limitOn": "CUSTOMER",
                        "type": "NON_PERIOD_BASED"
                    },
                    {
                        "kpi": "NUMBER_OF_POINTS",
                        "maxLimit": "1000",
                        "currentCustomerUsage": "0",
                        "limitOn": "CUSTOMER",
                        "type": "NON_PERIOD_BASED"
                    },
                    {
                        "kpi": "NUMBER_OF_TIMES",
                        "maxLimit": "100",
                        "currentCustomerUsage": "0",
                        "limitOn": "PROMOTION",
                        "type": "NON_PERIOD_BASED"
                    },
                    {
                        "kpi": "NUMBER_OF_POINTS",
                        "maxLimit": "1000",
                        "currentCustomerUsage": "0",
                        "limitOn": "PROMOTION",
                        "type": "NON_PERIOD_BASED"
                    },
                    {
                        "kpi": "NUMBER_OF_REDEMPTIONS_PER_EARN",
                        "maxLimit": "100",
                        "currentCustomerUsage": "0",
                        "limitOn": "CUSTOMER",
                        "type": "NON_PERIOD_BASED"
                    }
                ]
            }
        },
        {
            "promotionId": 56746,
            "promotionName": "Trackredeem1",
            "programId": 469,
            "startDate": "2024-04-03T00:00:00.000Z",
            "endDate": "2024-04-10T23:59:59.000Z",
            "identifier": "01a833e1-60e1-45d7-84bc-ba9154d4f86a",
            "description": "Promotion Description",
            "active": true,
            "eventName": "TargetCompleted",
            "limits": {
                "maxPointsPerEvent": "0",
                "pointsPerCustomer": "0",
                "numberOFTimesPerCustomer": 0,
                "totalPointsInPromotion": "0"
            },
            "customerUsage": {
                "currentPointsPerCustomer": "0",
                "currentNumberOfTimesPerCustomer": 0,
                "currentTotalPointsInPromotion": "0"
            },
            "pointsOfferType": "GENERIC",
            "promotionRestriction": {
                "issualRestrictions": [],
                "earnRestrictions": [],
                "redemptionRestrictions": [
                    {
                        "kpi": "NUMBER_OF_REDEMPTIONS_PER_EARN",
                        "maxLimit": "100",
                        "currentCustomerUsage": "0",
                        "limitOn": "CUSTOMER",
                        "type": "NON_PERIOD_BASED"
                    }
                ]
            }
        },
        {
            "promotionId": 56695,
            "promotionName": "Spend100NFR",
            "programId": 469,
            "startDate": "2024-04-02T00:00:00.000Z",
            "endDate": "2024-04-10T23:59:59.000Z",
            "identifier": "32e6c3b9-8f27-4f37-884e-b139a3e77dbd",
            "description": "Spend100NFR",
            "active": true,
            "eventName": "TransactionAdd",
            "limits": {
                "maxPointsPerEvent": "0",
                "pointsPerCustomer": "0",
                "numberOFTimesPerCustomer": 0,
                "totalPointsInPromotion": "0"
            },
            "customerUsage": {
                "currentPointsPerCustomer": "0",
                "currentNumberOfTimesPerCustomer": 0,
                "currentTotalPointsInPromotion": "0"
            },
            "pointsOfferType": "GENERIC",
            "promotionRestriction": {
                "issualRestrictions": [],
                "earnRestrictions": [],
                "redemptionRestrictions": []
            }
        },
        {
            "promotionId": 56690,
            "promotionName": "Metro - 50% Bonus Points ",
            "programId": 469,
            "startDate": "2024-04-02T00:00:00.000Z",
            "endDate": "2024-05-22T23:59:59.000Z",
            "identifier": "5beea349-919b-4a9e-944b-5892b2ed9fe2",
            "description": "Metro - 50% Bonus Points ",
            "active": true,
            "eventName": "TargetCompleted",
            "limits": {
                "maxPointsPerEvent": "0",
                "pointsPerCustomer": "0",
                "numberOFTimesPerCustomer": 0,
                "totalPointsInPromotion": "0"
            },
            "customerUsage": {
                "currentPointsPerCustomer": "0",
                "currentNumberOfTimesPerCustomer": 0,
                "currentTotalPointsInPromotion": "0"
            },
            "pointsOfferType": "GENERIC",
            "promotionRestriction": {
                "issualRestrictions": [],
                "earnRestrictions": [],
                "redemptionRestrictions": []
            }
        },
        {
            "promotionId": 56452,
            "promotionName": "Loyalty_Badges2",
            "programId": 469,
            "startDate": "2024-03-28T00:00:00.000Z",
            "endDate": "2024-06-30T23:59:59.000Z",
            "identifier": "6f50e886-27c5-4c37-9b81-97f51ab05cff",
            "description": "Loyalty_Badges2",
            "active": true,
            "eventName": "TargetCompleted",
            "limits": {
                "maxPointsPerEvent": "0",
                "pointsPerCustomer": "0",
                "numberOFTimesPerCustomer": 0,
                "totalPointsInPromotion": "0"
            },
            "customerUsage": {
                "currentPointsPerCustomer": "0",
                "currentNumberOfTimesPerCustomer": 0,
                "currentTotalPointsInPromotion": "0"
            },
            "pointsOfferType": "GENERIC",
            "promotionRestriction": {
                "issualRestrictions": [],
                "earnRestrictions": [],
                "redemptionRestrictions": []
            }
        },
        {
            "promotionId": 56799,
            "promotionName": "test direct issue1",
            "programId": 469,
            "startDate": "2024-04-04T00:00:00.000Z",
            "endDate": "2024-05-31T23:59:59.000Z",
            "identifier": "33f9564c-4b91-4beb-b21b-7c9463d8c29d",
            "description": "Promotion Description",
            "active": true,
            "eventName": "TransactionAdd",
            "limits": {
                "maxPointsPerEvent": "10",
                "pointsPerCustomer": "100",
                "numberOFTimesPerCustomer": 100,
                "totalPointsInPromotion": "1000"
            },
            "customerUsage": {
                "currentPointsPerCustomer": "10.000",
                "currentNumberOfTimesPerCustomer": 1,
                "currentTotalPointsInPromotion": "0"
            },
            "pointsOfferType": "LOYALTY",
            "promotionRestriction": {
                "issualRestrictions": [
                    {
                        "kpi": "NUMBER_OF_ISSUALS",
                        "maxLimit": "100",
                        "currentCustomerUsage": "1",
                        "limitOn": "CUSTOMER"
                    }
                ],
                "earnRestrictions": [],
                "redemptionRestrictions": [
                    {
                        "kpi": "NUMBER_OF_POINTS",
                        "maxLimit": "10",
                        "limitOn": "EVENT",
                        "type": "NON_PERIOD_BASED"
                    },
                    {
                        "kpi": "NUMBER_OF_TIMES",
                        "maxLimit": "100",
                        "currentCustomerUsage": "1",
                        "limitOn": "CUSTOMER",
                        "type": "NON_PERIOD_BASED"
                    },
                    {
                        "kpi": "NUMBER_OF_POINTS",
                        "maxLimit": "100",
                        "currentCustomerUsage": "10.000",
                        "limitOn": "CUSTOMER",
                        "type": "NON_PERIOD_BASED"
                    },
                    {
                        "kpi": "NUMBER_OF_TIMES",
                        "maxLimit": "1000",
                        "currentCustomerUsage": "0",
                        "limitOn": "PROMOTION",
                        "type": "NON_PERIOD_BASED"
                    },
                    {
                        "kpi": "NUMBER_OF_POINTS",
                        "maxLimit": "1000",
                        "currentCustomerUsage": "0",
                        "limitOn": "PROMOTION",
                        "type": "NON_PERIOD_BASED"
                    },
                    {
                        "kpi": "NUMBER_OF_REDEMPTIONS_PER_EARN",
                        "maxLimit": "100",
                        "currentCustomerUsage": "0",
                        "limitOn": "CUSTOMER",
                        "type": "NON_PERIOD_BASED"
                    }
                ]
            }
        },
        {
            "promotionId": 57092,
            "promotionName": "Divya_Test_Promotion",
            "programId": 469,
            "startDate": "2024-04-10T00:00:00.000Z",
            "endDate": "2024-05-31T23:59:59.000Z",
            "identifier": "1858e8b2-8c76-4166-8ced-ec50a9846f66",
            "description": "Divya_Test_Promotion",
            "active": true,
            "eventName": "TransactionAdd",
            "limits": {
                "maxPointsPerEvent": "0",
                "pointsPerCustomer": "0",
                "numberOFTimesPerCustomer": 0,
                "totalPointsInPromotion": "0"
            },
            "customerUsage": {
                "currentPointsPerCustomer": "100.000",
                "currentNumberOfTimesPerCustomer": 1,
                "currentTotalPointsInPromotion": "0"
            },
            "pointsOfferType": "LOYALTY",
            "promotionRestriction": {
                "issualRestrictions": [
                    {
                        "kpi": "NUMBER_OF_ISSUALS",
                        "maxLimit": "1",
                        "currentCustomerUsage": "1",
                        "limitOn": "CUSTOMER"
                    }
                ],
                "earnRestrictions": [],
                "redemptionRestrictions": [
                    {
                        "kpi": "NUMBER_OF_REDEMPTIONS_PER_EARN",
                        "maxLimit": "1",
                        "currentCustomerUsage": "0",
                        "limitOn": "CUSTOMER",
                        "type": "NON_PERIOD_BASED"
                    }
                ]
            }
        },
        {
            "promotionId": 57099,
            "promotionName": "test enroll and issue",
            "programId": 469,
            "startDate": "2024-04-10T00:00:00.000Z",
            "endDate": "2024-05-31T23:59:59.000Z",
            "identifier": "10c2fc95-acd4-476b-9784-9ccb7a410874",
            "description": "Promotion Description",
            "active": true,
            "eventName": "TransactionAdd",
            "limits": {
                "maxPointsPerEvent": "0",
                "pointsPerCustomer": "0",
                "numberOFTimesPerCustomer": 0,
                "totalPointsInPromotion": "0"
            },
            "customerUsage": {
                "currentPointsPerCustomer": "0",
                "currentNumberOfTimesPerCustomer": 0,
                "currentTotalPointsInPromotion": "0"
            },
            "pointsOfferType": "LOYALTY_EARNING",
            "promotionRestriction": {
                "issualRestrictions": [
                    {
                        "kpi": "NUMBER_OF_ISSUALS",
                        "maxLimit": "10",
                        "currentCustomerUsage": "1",
                        "limitOn": "CUSTOMER"
                    }
                ],
                "earnRestrictions": [
                    {
                        "kpi": "NUMBER_OF_EARNS",
                        "maxLimit": "10",
                        "currentCustomerUsage": "2",
                        "limitOn": "CUSTOMER"
                    }
                ],
                "redemptionRestrictions": [
                    {
                        "kpi": "NUMBER_OF_REDEMPTIONS_PER_EARN",
                        "maxLimit": "10",
                        "currentCustomerUsage": "0",
                        "limitOn": "CUSTOMER",
                        "type": "NON_PERIOD_BASED"
                    }
                ]
            }
        }
    ],
    "warnings": []
}
"pointsOfferType": "GENERIC",
            "promotionRestriction": {
                "issualRestrictions": [],
                "earnRestrictions": [],
                "redemptionRestrictions": [
                    {
                        "kpi": "NUMBER_OF_REDEMPTIONS_PER_EARN",
                        "maxLimit": "100",
                        "currentCustomerUsage": "0",
                        "limitOn": "CUSTOMER",
                        "type": "NON_PERIOD_BASED"
                    }
                ]
"pointsOfferType": "LOYALTY",
            "promotionRestriction": {
                "issualRestrictions": [
                    {
                        "kpi": "NUMBER_OF_ISSUALS",
                        "maxLimit": "100",
                        "currentCustomerUsage": "1",
                        "limitOn": "CUSTOMER"
                    }
                ],
                "earnRestrictions": [],
                "redemptionRestrictions": [
                    {
                        "kpi": "NUMBER_OF_POINTS",
                        "maxLimit": "10",
                        "limitOn": "EVENT",
                        "type": "NON_PERIOD_BASED"
                    },
                    {
                        "kpi": "NUMBER_OF_TIMES",
                        "maxLimit": "100",
                        "currentCustomerUsage": "1",
                        "limitOn": "CUSTOMER",
                        "type": "NON_PERIOD_BASED"
                    },
                    {
                        "kpi": "NUMBER_OF_POINTS",
                        "maxLimit": "100",
                        "currentCustomerUsage": "10.000",
                        "limitOn": "CUSTOMER",
                        "type": "NON_PERIOD_BASED"
                    },
                    {
                        "kpi": "NUMBER_OF_TIMES",
                        "maxLimit": "1000",
                        "currentCustomerUsage": "0",
                        "limitOn": "PROMOTION",
                        "type": "NON_PERIOD_BASED"
                    },
                    {
                        "kpi": "NUMBER_OF_POINTS",
                        "maxLimit": "1000",
                        "currentCustomerUsage": "0",
                        "limitOn": "PROMOTION",
                        "type": "NON_PERIOD_BASED"
                    },
                    {
                        "kpi": "NUMBER_OF_REDEMPTIONS_PER_EARN",
                        "maxLimit": "100",
                        "currentCustomerUsage": "0",
                        "limitOn": "CUSTOMER",
                        "type": "NON_PERIOD_BASED"
                    }
                ]

            "pointsOfferType": "LOYALTY_EARNING",
            "promotionRestriction": {
                "issualRestrictions": [
                    {
                        "kpi": "NUMBER_OF_ISSUALS",
                        "maxLimit": "10",
                        "currentCustomerUsage": "1",
                        "limitOn": "CUSTOMER"
                    }
                ],
                "earnRestrictions": [
                    {
                        "kpi": "NUMBER_OF_EARNS",
                        "maxLimit": "10",
                        "currentCustomerUsage": "2",
                        "limitOn": "CUSTOMER"
                    }
                ],
                "redemptionRestrictions": [
                    {
                        "kpi": "NUMBER_OF_REDEMPTIONS_PER_EARN",
                        "maxLimit": "10",
                        "currentCustomerUsage": "0",
                        "limitOn": "CUSTOMER",
                        "type": "NON_PERIOD_BASED"
                    }
                ]

API specific error codes

ErrorDescription
8013Identifier name missing or incorrect.
8015Identifier value missing or incorrect.
8003Source is missing or incorrect.

Language
Authorization
Basic
base64
:
URL
Click Try It! to start a request and see the response here!