# Users Welcome to the User API Documentation for Annex Cloud! This comprehensive guide is designed to empower developers, administrators, and system integrators with the knowledge and tools necessary to seamlessly interact with our loyalty platform's user-related functionalities. As the cornerstone of our customer engagement ecosystem, the Users API enables you to effortlessly manage user profiles, personalize experiences, and unlock the full potential of our loyalty solutions. Whether you're aiming to integrate user registration into your application, retrieve user information for tailored experiences, or track user activity for insightful analytics, this documentation will serve as your compass in navigating the world of user management within our loyalty-based framework. We understand that your technical expertise is as unique as the experiences you aim to deliver to your users, and that's why we've crafted this guide to be both informative for newcomers and insightful for seasoned developers. By leveraging the power of the User API, you'll gain the ability to create, update, and retrieve user profiles, harnessing valuable data to drive loyalty strategies and cultivate lasting relationships. From conceptual overviews to in-depth endpoints and practical examples, we've curated a resource that not only imparts technical know-how but also encourages innovation and creativity in building user-centric solutions. Thank you for choosing Annex Cloud as your partner in loyalty solutions. ## Used to create a new loyalty member - [POST /users](https://annexcloud.redocly.app/loyalty/loyalty/users/createuser.md): 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. ## Get member information - [GET /users/{{memberId}}](https://annexcloud.redocly.app/loyalty/loyalty/users/paths/~1users~1%7B%7Bmemberid%7D%7D/get.md): This API method is used to fetch all the information for a loyalty member by passing the unique ID of the member. ## Update member details - [PATCH /users/{{memberId}}](https://annexcloud.redocly.app/loyalty/loyalty/users/userupdatereq.md): This method is used to update existing member information by merging the provided information with the current data. 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. ## Delete member - [POST /userDelete](https://annexcloud.redocly.app/loyalty/loyalty/users/userdelete.md): This method can be used to delete the member from the loyalty program. ## Get group information with group ID - [GET /users/{{memberId}}/allgroup](https://annexcloud.redocly.app/loyalty/loyalty/users/getgroupdetails.md): This API is used to retrieve the information of a member associated with a hierarchy management group. ## To search member details - [POST /users/search](https://annexcloud.redocly.app/loyalty/loyalty/users/usersearch.md): This API is used to search member details based on multiple query parameters. ## Merge two members - [POST /mergeuser](https://annexcloud.redocly.app/loyalty/loyalty/users/mergeuserpost.md): This method is used to merge two member accounts. The Secondary member account is merged with the Primary member account. Post merge, all the activities on the secondary member account are owned by the primary member. Also, if the primary member is missing member details, these details are filled in by the secondary member's details if available. Note - For 'Multi Template Summary Flag' enabled sites, the response shown below is sent to the email address provided against the mergedBy parameter. ## Get the status of the merge process by member’s ID - [GET /mergeuser/{{memberId}}](https://annexcloud.redocly.app/loyalty/loyalty/users/getmergeuser.md): This method is used to get the details of the primary member after the merge functionality is completed, and only a single member is left (the primary member). It displays how many members have been merged with the primary member, and some basic information, such as who the merge was initiated by and the reason for the merge. Note - For 'Multi Template Summary Flag' enabled sites, the response shows an additional status parameter which indicates whether the merge process is in-progress or completed. ## Fetch the activity summary by action ID - [GET /users/{{memberId}}/activitysummary/{{actionId}}](https://annexcloud.redocly.app/loyalty/loyalty/users/getuseridactivitysummaryactionid.md): This API retrieves a summary of a member's activity, including points that have been debited or credited. ## Used to create multiple loyalty member profiles - [POST /bulkpostusers](https://annexcloud.redocly.app/loyalty/loyalty/users/bulkpostusers.md): This API method is used for managing large-scale member registrations in the loyalty program. It facilitates the quick and efficient onboarding of multiple loyalty members simultaneously, by allowing the creation of several loyalty member profiles in a single request. This method significantly reduces the time and effort required to populate the loyalty program with new members, enhancing operational efficiency. NOTE - We recommend limiting requests to around 100 records. ## Used to update multiple loyalty member profiles - [POST /bulkpatchusers](https://annexcloud.redocly.app/loyalty/loyalty/users/postbulkpatchusers.md): This endpoint enables updating member information efficiently in bulk. NOTE - We recommend limiting requests to around 100 records. ## Get transaction erasure details - [GET /transactionErasure/{{memberId}}](https://annexcloud.redocly.app/loyalty/loyalty/users/gettransactionerasure.md): By passing the User ID, use this method to retrieve all transaction erasure details for a loyalty member. ## Perform transaction erasure - [POST /transactionErasure](https://annexcloud.redocly.app/loyalty/loyalty/users/posttransactionerasure.md): This method enables the member to perform Transaction Erasure for transactions that meet the predefined conditions. ## Undo transaction erasure - [PATCH /transactionErasure](https://annexcloud.redocly.app/loyalty/loyalty/users/transactionerasure.md): Patch method is used to undo the transaction erasure that is in progress and not yet completed. ## Fetch the activity details - [GET /users/{{memberId}}/activity](https://annexcloud.redocly.app/loyalty/loyalty/users/getuseractivityreq.md): By using this method, all activity details for a member can be retrieved.