Newer Version Available

This content describes an older version of this product. View Latest

Opt Out from a Promotion

Opt out a loyalty program member from an available promotion.

Resource to Opt Out of a Promotion by Using the Promotion ID

1unenroll(promotionId:for:version:devMode:)

Signature

1public final func unenroll(
2       promotionId: String,
3       for membershipNumber: String,
4       version: String = LoyaltyAPIVersion.defaultVersion,
5       devMode: Bool = false) async throws

Resource to Opt Out of a Promotion by Using the Promotion Name

1unenroll(promotionName:for:version:devMode:)

Signature

1public final func unenroll(
2       promotionName: String,
3       for membershipNumber: String,
4       version: String = LoyaltyAPIVersion.defaultVersion,
5       devMode: Bool = false) async throws

Input Parameters

Parameter Type Description Required or Optional
devMode Boolean Indicates whether the request is run in developer mode (true) or not (false). Optional
membershipNumber String Unique identifier of the member who wants to opt out of a promotion Required
promotionId String ID of the promotion that the member wants to opt out of. Required
promotionName String Name of the promotion that the member wants to opt out of. Required
version String Version of the API. The request body is available in version 55.0 and later. Optional

Sample Output

1{
2    "message" : null,
3    "outputParameters" : {
4        "outputParameters" : {
5            "results" : [ {
6                "LoyaltyProgramMbrPromotionId" : "1lpT100000000h4IAA"
7            } ]
8        }
9    },
10    "simulationDetails" : { },
11    "status" : true
12}

Output Parameter

Parameter Type Description
LoyaltyProgramMbrPromotionId String The ID of the promotion that the member opts out of.