Skip to main content

Member Search

POST 

/client/users/:correlation_id/member/search

This request searches for members who meet the relevant search criterion.

Search Criteria Set in Configuration

Different search match modes can be set in the configuration files. The following SearchMode types are supported:

  • exact: LOWER(column) = LOWER(?) - Response contains only members that exactly match the provided attribute value.

  • partial: LOWER(column) LIKE %value% - Response contains all that members that partially match the provided attribute value.

  • startsWith: LOWER(column) LIKE value% - Response contains all the members whose attribute value starts with the provided value.

  • endsWith: LOWER(column) LIKE %value - Response contains all the members whose attribute value ends with the provided value.

  • right: RIGHT(column, N) = value (requires length) - Response contains all the members whose attribute value's rightmost characters match with the provided value.

  • left: LEFT(column, N) = value (requires length) - Response contains all the members whose attribute value's leftmost characters match with the provided value.

  • between: column BETWEEN from AND to (requires fromKey/toKey) - Response contains all the members whose attribute value is between the provided fromKey and toKey values.

A SearchRule is set for each SearchMode used, and also includes the capability to search for specified values for Extended Member Data (EMD) attributes. Relevant elements such as the data type of the field (string, number or variant), the length of the field, and a fromKey and toKey if a value range is being searched, are included in the configuration.

The "*" value can also be used, for instance, with an EMD attribute to return all records including that attribute, regardless of the value.

Request

Body

AttributeDefinitionFormatNotes
businessNameName of the relevant business unit.StringRequired if there is more than one business unit
tierNameName of the relevant tier in the loyalty program tier structure.StringOptional
emdContains attributes for which values can be specified for search.StringAt least one key:value pair required; the format of key:value pairs is: src.attr:value
For example: "ENROLMENT.enrolmentStatus": "active"
EMD values can be null; there is a handler for processing those values.

Response

AttributeDefinitionFormatNotes
countNumber of members returned by the search.NumberRequired
membersContains the object(s) for members returned by search.StringRequired, the details for each member object include some or all of the following attributes.
accountIDUnique account identifier.StringGUID format
accountStatusCurrent status of account.StringFor instance: "ACTIVE"
loyaltyIdUnique identifier for loyalty card.String
loyaltyStatusCurrent status of loyalty card.StringFor example, "ACTIVE"
externalIdentifierUnique identifier used by client for member account.StringCan be null
firstNameFirst name of member.String
lastNameLast name of member.String
emailEmail address of member.String
businessNameBusiness name associated with account, if any.StringUsed with multiple business units. Can be null.
pointBalanceTotal points in account point balance.Number
availablePointBalancePoints available for redemption.Number
languagePreferencePreferred language of member.String: "EN" or "FR"
registrationDetailsContains information about member registration.ObjectContains registrationDate to registrationChannel below
registrationDateDate/time at which the member registered.StringISO 8601 format
registrationDateEpochDate/time at which the member registered.NumberEpoch format
registrationChannelChannel through which registration took place.StringFor example: "APP" or "POS"
isSuspendedWhether the account is suspended.Boolean: Enum: true or false
isExpiredWhether the account is expired.Boolean: Enum: true or false
tierNameName of the tier the member is currently assigned to.StringOptional
extendedDataContains attribute:value pair and objects that provide additional information about the member.ObjectEMD values can be null; there is a handler for processing those values.

Error Responses

statusCodeerrorMessageerrorCodeDefinition
400 Bad RequestMember search is not supported.INVALID_REQUESTMember search is not enabled in configuration.
400 Bad RequestInvalid External Agent Session ID.INVALID_REQUESTThe External Agent Session ID provided does not have a valid value.
400 Bad RequestInvalid search parameters: {{attribute_name}}.INVALID_REQUESTThe value of the attribute listed is not a valid value.
400 Bad RequestInvalid EMD configuration for: {{attribute1Wrong}}, {{attributeX}}. Allowed patterns: {{attribute1Right}}.INVALID_REQUESTThe EMD configuration pattern is incorrect for one of the attributes listed.

Request

Responses

200 - Member Details Returned for Partnership

Response Headers
    Date
    Example: Tue, 25 Feb 2025 14:51:40 GMT
    Content-Length
    Example: 1876
    Connection
    Example: keep-alive
    x-amzn-RequestId
    Example: d91bcc95-79ff-4319-8d80-0e535ac68544
    Referrer-Policy
    Example: no-referrer
    X-XSS-Protection
    Example: 1;mode=block
    Access-Control-Allow-Origin
    Example: *
    MCK-APPID
    Example: ES-CB-V1
    MCK-MSGID
    Example: mck-d017f8ca-be3d-48b4-baec-1549250ca47d
    Expect-CT
    Example: max-age=86400
    Strict-Transport-Security
    Example: max-age=31536000; includeSubDomains; preload
    Feature-Policy
    Example: vibrate 'none'; geolocation 'none'
    X-Frame-Options
    Example: sameorigin
    Content-Security-Policy
    Example: connect-src 'none';object-src https://*.cloudfront.net;script-src https://*.cloudfront.net
    MCK-MSGTIMESTAMP
    Example: February 25th 2025, 2:51:38
    x-amz-apigw-id
    Example: Gi7XOEHjIAMEnLA=
    cache-control
    Example: no-cache, no-store, must-revalidate
    MCK_CORRELATIONID
    Example: CORRELATION_ID_NOT_PROVIDED_IN_REQUEST
    X-Content-Type-Options
    Example: nosniff
    X-Amzn-Trace-Id
    Example: Root=1-67bdd8fa-292cd6502addef531e528a67;Parent=4810feda6ecf2e6c;Sampled=0;Lineage=1:5fa73ef6:0