Get Member Promotions

Retrieve a list of promotions that the member is eligible for, while asynchronously requesting data from the Get Member Promotions loyalty program process API.

Resource

Here’s the request when the input parameter is member ID.

getPromotions(memberId:version:devMode:)

Signature

public func getPromotions(
    memberId: String,
    version: String = LoyaltyAPIVersion.defaultVersion,
    devMode: Bool = false) async throws -> PromotionModel

Here’s the request when the input parameter is membership number.

getPromotions(memberNumber:version:devMode:)

Signature

public func getPromotions(
    membershipNumber: String,
    version: String = LoyaltyAPIVersion.defaultVersion,
    devMode: Bool = false) async throws -> PromotionModel

Input Parameters

Parameter Types Description Required or Optional
devMode Boolean Indicates whether the request is run in developer mode ((true)) or not ((false)).. Optional
memberId String Identifier of the member whose promotions are being retrieved. Required
membershipNumber String The membership number of the member whose promotions are being retrieved. Required
version String Version of the API. The request body is available in version 55.0 and later. Optional

Sample Output

{
    "message": null,
    "outputParameters": {
        "outputParameters": {
            "results": [
                {
                    "loyaltyPromotionType": "STANDARD",
                    "maximumPromotionRewardValue": 0,
                    "totalPromotionRewardPointsVal": 0,
                    "loyaltyProgramCurrency": "0lc4x000000L1bmAAC",
                    "memberEligibilityCategory": "Eligible",
                    "promotionEnrollmentRqr": true,
                    "fulfillmentAction": "CREDIT_POINTS",
                    "promotionName": "Anniversary promotion",
                    "promotionId": "0c84x000000CoNhAAK",
                    "startDate": "2020-01-01",
                    "endDate": "2022-12-31",
                    "description": "Double point promotion on member purchases on their anniversary",
                    "imageName": "offer2"
                },
                {
                    "loyaltyPromotionType": "CUMULATIVE",
                    "maximumPromotionRewardValue": 0,
                    "totalPromotionRewardPointsVal": 200,
                    "loyaltyProgramCurrency": "0lc4x000000L1bmAAC",
                    "memberEligibilityCategory": "Eligible",
                    "promotionEnrollmentRqr": false,
                    "fulfillmentAction": "CREDIT_POINTS",
                    "promotionName": "Referral Promotions",
                    "promotionId": "0c84x000000CoNiAAK",
                    "startDate": "2021-01-02",
                    "description": "Additional points for member referral",
                    "imageName": "promotion1"
                },
                {
                    "promEnrollmentStartDate": "2022-11-01",
                    "memberEligibilityCategory": "EligibleButNotEnrolled",
                    "promotionEnrollmentEndDate": "2022-11-30",
                    "promotionEnrollmentRqr": true,
                    "promotionName": "New Year Promotion Premium",
                    "promotionId": "0c84x000000CtzRAAS",
                    "startDate": "2022-11-01",
                    "description": "New Year Promotion Premium",
                    "imageName": "meal1"
                },
                {
                    "promEnrollmentStartDate": "2022-11-01",
                    "memberEligibilityCategory": "Eligible",
                    "promotionEnrollmentEndDate": "2022-11-30",
                    "promotionEnrollmentRqr": true,
                    "promotionName": "Christmas Promotion",
                    "promotionId": "0c84x000020CtzWAAS",
                    "startDate": "2022-12-01",
                    "description": "Christmas Promotion - Happy holidays, enjoy a joyful holiday season with this promotion",
                    "imageName": "promotion3"
                },
                {
                    "loyaltyPromotionType": "STANDARD",
                    "maximumPromotionRewardValue": 0,
                    "totalPromotionRewardPointsVal": 0,
                    "loyaltyProgramCurrency": "0lc4x000000L1bmAAC",
                    "memberEligibilityCategory": "Eligible",
                    "promotionEnrollmentRqr": true,
                    "fulfillmentAction": "CREDIT_POINTS",
                    "promotionName": "Anniversary promotion",
                    "promotionId": "0c84x004000CoNhAAK",
                    "startDate": "2020-01-01",
                    "description": "Double point promotion on member purchases on their anniversary",
                    "imageName": "offers"
                },
                {
                    "loyaltyPromotionType": "CUMULATIVE",
                    "maximumPromotionRewardValue": 0,
                    "totalPromotionRewardPointsVal": 200,
                    "loyaltyProgramCurrency": "0lc4x000000L1bmAAC",
                    "memberEligibilityCategory": "Eligible",
                    "promotionEnrollmentRqr": false,
                    "fulfillmentAction": "CREDIT_POINTS",
                    "promotionName": "Referral Promotions",
                    "promotionId": "0c84x000006CoNiAAK",
                    "startDate": "2021-01-02",
                    "description": "Additional points for member referral",
                    "imageName": "shoes1"
                },
                {
                    "promEnrollmentStartDate": "2022-11-01",
                    "memberEligibilityCategory": "EligibleButNotEnrolled",
                    "promotionEnrollmentEndDate": "2022-11-30",
                    "promotionEnrollmentRqr": true,
                    "promotionName": "Thanksgiving Promotion Premium",
                    "promotionId": "0c84x070000CtzRAAS",
                    "startDate": "2022-11-01",
                    "description": "Thanksgiving Promotion Premium",
                    "imageName": "jean1"
                },
                {
                    "promEnrollmentStartDate": "2022-11-01",
                    "memberEligibilityCategory": "Ineligible",
                    "promotionEnrollmentEndDate": "2022-11-30",
                    "promotionEnrollmentRqr": true,
                    "promotionName": "New Year Promotion Premium",
                    "promotionId": "0c84x000000CtzWAAS",
                    "startDate": "2022-11-01",
                    "description": "New Year Promotion Premium - Ineligible",
                    "imageName": "coffee1"
                }
            ]
        }
    },
    "simulationDetails": {},
    "status": true
}

Output Parameters

Parameter Type Description
description String The description of the promotion.
endDate String The end date of the promotion.
fulfillmentAction String Specifies the fulfillment action of the related promotion. Possible values are: Credit_Points and Issue_Voucher
imageName String The name for the promotion image.
loyaltyProgramCurrency String The loyalty program currency associated with the promotion.
loyaltyPromotionType String The type of promotion. Possible values are:
  • Cumulative
  • Standard
  • Joint
maximumPromotionRewardValue Double The value that can be accumulated for the promotion.
memberEligibilityCategory String Specifies whether the loyalty program member is eligible for the promotion. Possible values are:
  • Eligible
  • EligibleButNotEnrolled
  • Ineligible
message String The request response message.
promEnrollmentStartDate String The date when the enrollment in the related promotion starts.
promotionEnrollmentEndDate String The date when the enrollment in the related promotion ends.
promotionEnrollmentRqr Boolean Indicates whether the related promotion requires member enrollment.
promotionId String The ID related to the promotion.
promotionImageURL String The URL for the promotion image. 

In the promotion record, enter an image URL and ensure that the webpage that hosts the image is publicly accessible.

promotionName String The name of the promotion.
startDate String The start date of the related promotion.
status Boolean Indicates whether the member is eligible to enroll for the promotion.
totalPromotionRewardPointsVal Double The total points credited to the loyalty program member for the related promotion.