# To search member details

This API is used to search member details based on multiple query parameters. Note - This API can only return a maximum of 50 records, and customers can access more than 50 user records by using the user export report in the admin portal.

Endpoint: POST /users/search
Version: 3.0.0
Security: 

## Request fields (application/json):

  - `dataSearch` (object, required)
    Enter the following data to search member details.

  - `dataSearch.userId` (string)
    Enter the unique ID of the loyalty member.
    Example: "jacklee2023"

  - `dataSearch.email` (string)
    Enter the email address of the loyalty member.
    Example: "jacklee2023@gmail.com"

  - `dataSearch.firstName` (string)
    Enter the first name of the loyalty member. Note - The format of the first name must be in the format shown below as example.
    Example: "John% or %John%"

  - `dataSearch.lastName` (string)
    Enter the last name of the loyalty member. Note - The format of the last name must be in the format shown below as example.
    Example: "Deo% or %Deo%"

  - `dataSearch.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"

  - `dataSearch.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"

  - `dataSearch.optInStartDate` (string)
    Enter the opt-in start date after which the loyalty member details are searched. Note - All the member details are searched within the opt-in start and end dates.
    Example: "2020-05-02 01:28:13"

  - `dataSearch.optInEndDate` (string)
    Enter the opt-in end date. Note - All the member details are searched within the opt-in start and end dates.
    Example: "2020-07-02 01:28:13"

  - `dataSearch.phone` (string)
    Enter the loyalty member’s phone number.
    Example: "123-123-4567"

  - `dataSearch.birthDate` (string)
    Enter the loyalty member's date of birth.
    Example: "1989-12-11"

  - `dataSearch.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"

  - `dataSearch.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.

  - `dataSearch.extendedAttribute.userType` (string)
    Enter the employment status of the member as employed, unemployed, or student.
    Example: "Employed"

  - `dataSearch.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"

## Response 200 fields (application/json):

  - `siteId` (string)
    Displays Annex Cloud site ID for the loyalty program.
    Example: "29235480"

  - `data` (object)
    Displays the following details-

  - `data.userId` (string)
    Displays the unique member ID of the loyalty member.
    Example: "exsdf1038"

  - `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.email` (string)
    Displays the email address of the loyalty member.
    Example: "jacklee2023@gmail.com"

  - `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.resourceURL` (string)
    Displays the source URL of the loyalty member's creation, whether it was from a website or an application.
    Example: "website"

  - `totalRecords` (string)
    Displays the total number of records found while searching for loyalty member details.
    Example: 100


## Response 400 fields

## Response 403 fields

## Response 404 fields

## Response 500 fields
