Member Profile
Get the profile details of a loyalty program member, while asynchronously requesting
data from the Member Profile API.
Resource
1getMemberProfile(for:version:devMode:)Signature
1public func getMemberProfile(
2 for memberId: String,
3 version: String = LoyaltyAPIVersion.defaultVersion,
4 devMode: Bool = false) async throws -> ProfileModelInput Parameters
| Parameter | Type | 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 benefits are being retrieved. | Required |
| version | String | Version of the API. The request body is available in version 55.0 and later. | Optional |
Return Value
A ProfileModel instance of type:
1public struct ProfileModel : CodableSample Output
1{
2 "additionalLoyaltyProgramMemberFields": {
3 "City__c": null,
4 "Age__c": null,
5 "Anniversary__c": null,
6 "ReferredMemberPromotion__c": null,
7 "DateOfBirth__c": null,
8 "Hobbies__c": null,
9 "Gender__c": null,
10 "SeedData__c": false,
11 "Income__c": null,
12 "State__c": null,
13 "B2CRetail_Most_Recent_Survey_Email_Date__c": null
14 },
15 "associatedAccount": null,
16 "associatedContact": {
17 "contactId": "0034x00001EhiXSAAZ",
18 "email": "ab@gmail.com",
19 "firstName": "Aman",
20 "lastName": "Bindal"
21 },
22 "canReceivePartnerPromotions": true,
23 "canReceivePromotions": true,
24 "enrollmentChannel": "Email",
25 "enrollmentDate": "2022-01-01",
26 "groupCreatedByMember": null,
27 "groupName": null,
28 "lastActivityDate": null,
29 "loyaltyProgramMemberId": "0lM4x000000LECAEA4",
30 "loyaltyProgramName": "NTO Insider",
31 "memberCurrencies": [
32 {
33 "additionalLoyaltyMemberCurrencyFields": {},
34 "escrowPointsBalance": 0.0,
35 "expirablePoints": 0.0,
36 "lastAccrualProcessedDate": null,
37 "lastEscrowProcessedDate": null,
38 "lastExpirationProcessRunDate": null,
39 "lastPointsAggregationDate": null,
40 "lastPointsResetDate": null,
41 "loyaltyMemberCurrencyName": "Reward Points",
42 "loyaltyProgramCurrencyId": "0lc4x000000L1bmAAC",
43 "loyaltyProgramCurrencyName": null,
44 "memberCurrencyId": "0lz4x000000LC3nAAG",
45 "nextQualifyingPointsResetDate": null,
46 "pointsBalance": 17850,
47 "qualifyingPointsBalanceBeforeReset": 0.0,
48 "totalEscrowPointsAccrued": 0.0,
49 "totalEscrowRolloverPoints": 0.0,
50 "totalPointsAccrued": 0.0,
51 "totalPointsExpired": 0.0,
52 "totalPointsRedeemed": 0.0
53 },
54 {
55 "additionalLoyaltyMemberCurrencyFields": {},
56 "escrowPointsBalance": 0.0,
57 "expirablePoints": 0.0,
58 "lastAccrualProcessedDate": null,
59 "lastEscrowProcessedDate": null,
60 "lastExpirationProcessRunDate": null,
61 "lastPointsAggregationDate": null,
62 "lastPointsResetDate": null,
63 "loyaltyMemberCurrencyName": "Tier Points",
64 "loyaltyProgramCurrencyId": "0lc4x000000L1bnAAC",
65 "loyaltyProgramCurrencyName": null,
66 "memberCurrencyId": "0lz4x000000LC3oAAG",
67 "nextQualifyingPointsResetDate": "2023-01-01",
68 "pointsBalance": 4000,
69 "qualifyingPointsBalanceBeforeReset": 0.0,
70 "totalEscrowPointsAccrued": 0.0,
71 "totalEscrowRolloverPoints": 0.0,
72 "totalPointsAccrued": 0.0,
73 "totalPointsExpired": 0.0,
74 "totalPointsRedeemed": 0.0
75 }
76 ],
77 "memberStatus": "Active",
78 "memberTiers": [
79 {
80 "additionalLoyaltyMemberTierFields": {},
81 "areTierBenefitsAssigned": false,
82 "loyaltyMemberTierId": "0ly4x000000btVzAAI",
83 "loyaltyMemberTierName": "Silver",
84 "tierChangeReason": null,
85 "tierChangeReasonType": null,
86 "tierEffectiveDate": "2022-01-01",
87 "tierExpirationDate": "2023-08-31",
88 "tierGroupId": "0lt4x000000L1bXAAS",
89 "tierGroupName": null,
90 "tierId": "0lg4x000000L1bmAAC",
91 "tierSequenceNumber": 10
92 }
93 ],
94 "memberType": "Individual",
95 "membershipEndDate": "2023-01-01",
96 "membershipLastRenewalDate": null,
97 "membershipNumber": "Member1",
98 "referredBy": null,
99 "relatedCorporateMembershipNumber": null,
100 "transactionJournalStatementFrequency": "Monthly",
101 "transactionJournalStatementLastGeneratedDate": null,
102 "transactionJournalStatementMethod": "Mail"
103}Output Parameters
| Property Name | Type | Description |
|---|---|---|
| additionalLoyaltyProgramMemberFields | Map<String, Object> | The details of the custom fields added in the loyalty program member object. |
| associatedAccount | Codable | The details of the account record that is associated with the loyalty program member. |
| associatedContact | Codable | The details of the contact record that is associated with the loyalty program member. |
| canReceivePartnerPromotions | Boolean | Indicates whether the loyalty program member can receive partner promotions. |
| canReceivePromotions | Boolean | Indicates whether the loyalty program member can receive promotions (true) or not (false). |
| enrollmentChannel | String | The channel used by the member to enroll in the loyalty program. |
| enrollmentDate | String | The date on which the member enrolled in the loyalty program. |
| groupCreatedByMember | String | The membership number of the loyalty program member who created the group. |
| groupName | String | The name of the loyalty program group to which the member belongs. |
| lastActivityDate | String | The date on which the member performed their last activity. |
| loyaltyProgramMemberId | String | The ID of the loyalty program member. |
| loyaltyProgramName | String | The name of the loyalty program. |
| memberCurrencies | Codable | The currencies associated with the loyalty program member. |
| memberStatus | String | The status of the loyalty program member. |
| memberTiers | Codable | The tiers associated with the loyalty program member. |
| memberType | String | The type of loyalty program member. |
| membershipEndDate | String | The date on which the membership ends. |
| membershipLastRenewalDate | String | The date on which the loyalty program member last renewed their membership. |
| membershipNumber | String | The membership number of the loyalty program member. |
| referredBy | String | The membership number of the loyalty program member who referred the member to the loyalty program. |
| relatedCorporateMembershipNumber | String | The membership number of the Corporate type loyalty program member associate with the member. |
| transactionJournalStatementFrequency | String | The frequency at which transaction journal statements must be
delivered to the member. Possible values are:
|
| transactionJournalStatementLastGeneratedDate | String | The date on which the member's last transaction journal statement was generated. |
| transactionJournalStatementMethod | String | The method used to deliver transaction journal statements to the member. |