# Used to create a new loyalty member. To create new loyalty members and enroll them in the loyalty program, use the POST method in the user API. A unique ID must be specified while creating a new member. All other additional fields in the request and response body are listed below. The Annex Cloud User API uses the Zend Framework’s email validation library to verify email addresses in compliance with RFC 2822. The validation rules are - The email must contain a local part and a hostname separated by @. Local part length must not exceed 64 characters. Hostname length must not exceed 255 characters. Both the local part and hostname must adhere to RFC 2822 formatting rules. The hostname must be a valid domain name. If an email does not meet these requirements, the API will return a validation error. Endpoint: POST /users Version: 3.0.0 Security: ## Request fields (application/json): - `id` (string, required) Enter the unique ID of the loyalty member. Example: "jacklee2023" - `email` (string) Enter the email address of the loyalty member. Example: "jacklee2023@gmail.com" - `firstName` (string) Enter the first name of the loyalty member. Example: "John" - `lastName` (string) Enter the last name of the loyalty member. Example: "Deo" - `optInStatus` (string) Enter the opt-in status as YES for opt-in or NO for opt-out. The default opt-in status is YES. Example: "YES" - `optInDate` (string) Enter the loyalty member's opt-in date in yyyy-MM-dd'T'HH:mm:ssZ format. If the opt-in date is not provided, by default, the system takes the current date and time automatically. Example: "2024-08-08T07:00:12+0000" - `status` (string) If the activity-based membership status flag is OFF- Enter the loyalty member’s status as active or inactive. By default, the status is active and can be changed to inactive as per the client’s request. If the activity-based membership status flag is ON- Any values submitted in the status parameter will be ignored. The system automatically manages member status based on the defined activity-based criteria. Example: "ACTIVE" - `phone` (string) Enter the loyalty member’s phone number. Example: "123-123-4567" - `birthDate` (string) Enter the loyalty member's date of birth. Example: "1989-12-11" - `createDate` (string) Enter the date when the loyalty member’s profile was created in yyyy-MM-dd'T'HH:mm:ssZ format. If the date is not provided, by default, the system takes the current date and time automatically. Example: "2024-08-08T07:00:12+0000" - `anniversaryDate` (string) Enter the loyalty member's anniversary date in yyyy-MM-dd format. This can be their birthdate, the date they joined the loyalty program or marriage date. Example: "2023-12-11" - `userProfileImageUrl` (string) Enter the image URL for the loyalty member’s profile picture. Note - The image value should be in base64 encoded format. Example: "aHR0cHM6Ly93d3cuc29jaWFsYW5uZXguY29tL3B1YmxpYy9tYW5hZ2VvcHRpb25zZGVzaWduMTYvaW1hZ2VzL3Byb2R1Y3RfbGFuZGluZy9sb3lhbHR5LWhvdmVyLnBuZw==" - `zipcode` (string) Enter the zip code of the loyalty member's residence. Example: "517501" - `source` (string) Enter the source of the loyalty member's profile creation. For example, website, application, or in-store. Example: "website" - `optReason` (string) Enter the reason for opting in or out of the loyalty program. The default opt-in status is YES. Note - For opt-in, the action ID is 149, while for opt-out, it is 150. Example: "New member" - `extendedAttribute` (object) Enter the member attributes defined in your program configuration. This can be customized according to requirements. It accepts multiple parameters; however, these parameters must be defined under Products > Additional Loyalty Settings > Extended Attributes. Note - The extended attributes listed below are examples only. All extended attributes must be configured for the program as stated above. - `extendedAttribute.userType` (string) Enter the employment status of the member as employed, unemployed, or student. Example: "Employed" - `extendedAttribute.userStatus` (string) Enter the unique referrer code provided by the Refer-a-Friend program (if applicable), when creating a loyalty member profile. Example: "Enabled" - `raf` (object) Enter the incentiveId and referrerCode. This functionality is accessible to programs that have enabled the Refer a Friend (RAF) module. Note 1- This module is only displayed when new members sign up for the loyalty program using a referrer code. Note2- This functionality is also applicable to multi-template sites. - `raf.incentiveId` (integer) Enter the incentive ID. Example: 936 - `raf.referrerCode` (string) Enter the unique referrer code provided by the Refer-a-Friend program (if applicable), when creating a loyalty member profile. Example: "3bhqc5k" - `heirarchyDetails` (object) Enter the following information for the hierarchy management group (if enabled in the program). - `heirarchyDetails.groupId` (string) Enter the group ID for the group to which the loyalty member is being added. Example: "91" - `heirarchyDetails.userType` (string) Enter the role of the loyalty member within the group. For example, administrator, primary member and secondary member. Example: "Administrator" - `heirarchyDetails.addedBy` (string) Enter the unique ID of the group administrator who added the new loyalty member to the group. Example: "jason.limit3@gmail.com" - `heirarchyDetails.userGroupStatus` (string) Enter the group status as active or inactive. The group administrator has permission to change the status of the group. Example: "ACTIVE" ## Response 200 fields (application/json): - `Data` (object) Displays the following parameters- - `Data.siteId` (string) Displays Annex Cloud site ID for the loyalty program. Example: "29235480" - `Data.id` (string) Displays the unique ID of the loyalty member. Example: "jacklee2023" - `Data.email` (string) Displays the email address of the loyalty member. Example: "jacklee2023@gmail.com" - `Data.firstName` (string) Displays the first name of the loyalty member. Example: "John" - `Data.lastName` (string) Displays the last name of the loyalty member. Example: "Deo" - `Data.zipCode` (string) Displays the zip code of the loyalty member's residence. Example: 51750 - `Data.optInStatus` (string) Displays the opt-in status as YES for opt-in or NO for opt-out. The default opt-in status is YES. Example: "YES" - `Data.optInDate` (string) Displays the opt-in date of the loyalty member in yyyy-MM-dd'T'HH:mm:ssZ format. Example: "2024-08-08T07:00:12+0000" - `Data.status` (string) If the activity-based membership status flag is OFF- Displays the loyalty member’s status as active or inactive. By default, the status is active and can be changed to inactive as per the client’s request. If the activity-based membership status flag is ON- Displays the member status based on the defined activity-based criteria. Example: "ACTIVE" - `Data.phone` (string) Displays the phone number of the loyalty member. Example: "123-123-4567" - `Data.birthDate` (string) Displays the date of birth of the loyalty member in yyyy-MM-dd format. Example: "1989-12-11" - `Data.anniversaryDate` (string) Displays the loyalty member's anniversary date, which can be their birthdate, the date they joined the loyalty program or marriage date in yyyy-MM-dd format. Example: "2023-12-11" - `Data.userProfileImageUrl` (string) Displays the image URL for the loyalty member’s profile picture. Example: "https://www.socialannex.com/public/manageoptionsdesign16/images/product_landing/loyalty-hover.png" - `Data.createDate` (string) Displays the date and time in yyyy-MM-dd’T’HH:mm:ssZ format on which the loyalty member profile was created. Example: "2024-08-08T07:00:12+0000" - `Data.updateDate` (string) Displays the date and time in yyyy-MM-dd’T’HH:mm:ssZ format on which the loyalty member was updated. Example: "2024-08-08T07:00:12+0000" - `Data.extendedAttribute` (object) Displays the member attributes defined in your program configuration. This can be customized according to requirements. It accepts multiple parameters; however, these parameters must be defined under Products > Additional Loyalty Settings > Extended Attributes. Note - The extended attributes listed below are examples only. All extended attributes must be configured for the program as stated above. - `Data.extendedAttribute.userType` (string) Displays the employment status of the member as employed, unemployed, or student. Example: "Employed" - `Data.extendedAttribute.userStatus` (string) Displays the unique referrer code provided by the Refer-a-Friend program (if applicable), when creating a loyalty member profile. Example: "Enabled" - `Data.raf` (object) Displays the refer-a-friend object if the member was created with a referral code. This functionality is accessible to clients who have the Refer a Friend (RAF) module. Note1- This module is only displayed to new members who sign up using a referrer code and take advantage of the loyalty program. Note2- This functionality is also applicable to multi-template sites. - `Data.raf.personalLink` (string) Displays the unique refer a friend bitly link. Example: "https://bit.ly/3rShgt7\"" - `Data.raf.inviteCode` (string) Displays the unique invite code shared by the loyalty member to invite others to the loyalty program. Example: "3rShgt7" - `Data.raf.referrerCode` (string) Displays the unique referral code from the referrer, used while creating a member (referee). Example: "3bhqc5k" - `Data.raf.referrerName` (string) Displays the name of the referrer whose referrer code was used while creating a member (referee). Example: "Adam" - `Data.heirarchyDetails` (object) Displays the following information for the hierarchy management group (if enabled in the program). - `Data.heirarchyDetails.groupName` (string) Displays the name of the group to which the member is added. Example: "Sweet Family 15" - `Data.heirarchyDetails.groupCreationDate` (string) Displays the group creation date in yyyy-MM-dd'T'HH:mm:ssZ format. Example: "2020-10-12T00:00:00+0000" - `Data.heirarchyDetails.previousTier` (string) Displays the previous tier that was assigned to the loyalty member. For example, Bronze, Silver, Gold. The name of the tier is defined by the client during configuration of the loyalty program. Example: "Sliver" - `Data.heirarchyDetails.currentTier` (string) Displays the name of the loyalty member’s current tier. For example, Bronze, Silver, Gold. The name of the tier is defined by the client during configuration of the loyalty program. Example: "Gold" - `Data.heirarchyDetails.groupUpdateDate` (string) Displays the date the group was updated in yyyy-MM-dd'T'HH:mm:ssZ format. Example: "2020-10-12T00:00:00+0000" - `Data.heirarchyDetails.source` (string) Displays the source of the loyalty member's profile creation, whether it was from a website, application, or in-store. The actions can also be performed from a store while doing the check-out. Example: "website" ## Response 201 fields ## Response 400 fields ## Response 404 fields ## Response 405 fields ## Response 409 fields ## Response 422 fields