Newer Version Available
Enroll for Promotions
Enroll loyalty program member to a promotion, while asynchronously sending data to
the Enroll for Promotions API.
Resource
1enrollIn(promotion:for:version:)Signature
1public func enrollIn(
2 promotionName: String,
3 membershipNumber: String,
4 version: String = LoyaltyAPIVersion.defaultVersion) async throwsInput 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
1{
2 "message": null,
3 "outputParameters": {
4 "outputParameters": {
5 "results": [
6 {
7 "MemberId": "1lp4x00000002ffAAA"
8 }
9 ]
10 }
11 },
12 "simulationDetails": {},
13 "status": true
14}Output Parameter
| Parameter | Type | Description |
|---|---|---|
| memberId | String | The ID of the member enrolled for the promotion. |