Enroll for Promotions

Enroll loyalty program member to a promotion, while asynchronously sending data to the Enroll for Promotions API.

Resource

enrollIn(promotion:for:version:)

Signature

public func enrollIn(
    promotionName: String,
    membershipNumber: String,
    version: String = LoyaltyAPIVersion.defaultVersion) async throws

Input Parameters

Parameter Type Description Required or Optional
promotionName String Name of the promotion that the member wants to enroll into. Required
membershipNumber String Unique identifier of the member. 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": [
                {
                    "MemberId": "1lp4x00000002ffAAA"
                }
            ]
        }
    },
    "simulationDetails": {},
    "status": true
}

Output Parameter

Parameter Type Description
memberId String The ID of the member enrolled for the promotion.