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 

ParameterTypeDescriptionRequired or Optional
devModeBooleanIndicates whether the request is run in developer mode (true) or not (false).Optional
membershipNumberStringUnique identifier of the member who wants to opt out of a promotionRequired
promotionIdStringID of the promotion that the member wants to opt out of.Required
promotionNameStringName of the promotion that the member wants to opt out of.Required
versionStringVersion 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 

ParameterTypeDescription
LoyaltyProgramMbrPromotionIdStringThe ID of the promotion that the member opts out of.