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
| Attribute | Definition | Format | Notes |
|---|---|---|---|
| businessName | Name of the relevant business unit. | String | Required if there is more than one business unit |
| tierName | Name of the relevant tier in the loyalty program tier structure. | String | Optional |
| emd | Contains attributes for which values can be specified for search. | String | At 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
| Attribute | Definition | Format | Notes |
|---|---|---|---|
| count | Number of members returned by the search. | Number | Required |
| members | Contains the object(s) for members returned by search. | String | Required, the details for each member object include some or all of the following attributes. |
| accountID | Unique account identifier. | String | GUID format |
| accountStatus | Current status of account. | String | For instance: "ACTIVE" |
| loyaltyId | Unique identifier for loyalty card. | String | |
| loyaltyStatus | Current status of loyalty card. | String | For example, "ACTIVE" |
| externalIdentifier | Unique identifier used by client for member account. | String | Can be null |
| firstName | First name of member. | String | |
| lastName | Last name of member. | String | |
| Email address of member. | String | ||
| businessName | Business name associated with account, if any. | String | Used with multiple business units. Can be null. |
| pointBalance | Total points in account point balance. | Number | |
| availablePointBalance | Points available for redemption. | Number | |
| languagePreference | Preferred language of member. | String: "EN" or "FR" | |
| registrationDetails | Contains information about member registration. | Object | Contains registrationDate to registrationChannel below |
| registrationDate | Date/time at which the member registered. | String | ISO 8601 format |
| registrationDateEpoch | Date/time at which the member registered. | Number | Epoch format |
| registrationChannel | Channel through which registration took place. | String | For example: "APP" or "POS" |
| isSuspended | Whether the account is suspended. | Boolean: Enum: true or false | |
| isExpired | Whether the account is expired. | Boolean: Enum: true or false | |
| tierName | Name of the tier the member is currently assigned to. | String | Optional |
| extendedData | Contains attribute:value pair and objects that provide additional information about the member. | Object | EMD values can be null; there is a handler for processing those values. |
Error Responses
| statusCode | errorMessage | errorCode | Definition |
|---|---|---|---|
| 400 Bad Request | Member search is not supported. | INVALID_REQUEST | Member search is not enabled in configuration. |
| 400 Bad Request | Invalid External Agent Session ID. | INVALID_REQUEST | The External Agent Session ID provided does not have a valid value. |
| 400 Bad Request | Invalid search parameters: {{attribute_name}}. | INVALID_REQUEST | The value of the attribute listed is not a valid value. |
| 400 Bad Request | Invalid EMD configuration for: {{attribute1Wrong}}, {{attributeX}}. Allowed patterns: {{attribute1Right}}. | INVALID_REQUEST | The EMD configuration pattern is incorrect for one of the attributes listed. |
Request
Responses
- 200
- 400
200 - Member Details Returned for Partnership
Response Headers
Tue, 25 Feb 2025 14:51:40 GMT1876keep-alived91bcc95-79ff-4319-8d80-0e535ac68544no-referrer1;mode=block*ES-CB-V1mck-d017f8ca-be3d-48b4-baec-1549250ca47dmax-age=86400max-age=31536000; includeSubDomains; preloadvibrate 'none'; geolocation 'none'sameoriginconnect-src 'none';object-src https://*.cloudfront.net;script-src https://*.cloudfront.netFebruary 25th 2025, 2:51:38Gi7XOEHjIAMEnLA=no-cache, no-store, must-revalidateCORRELATION_ID_NOT_PROVIDED_IN_REQUESTnosniffRoot=1-67bdd8fa-292cd6502addef531e528a67;Parent=4810feda6ecf2e6c;Sampled=0;Lineage=1:5fa73ef6:0400 - Invalid External Agent Session ID
Response Headers
Fri, 21 Feb 2025 17:25:01 GMT100keep-alivec275107f-3ef6-4bb6-bd51-3cfccf130ddbno-referrer1;mode=block*ES-CB-V1mck-19a1904d-1098-490b-bbae-0bdcb44084efmax-age=86400max-age=31536000; includeSubDomains; preloadvibrate 'none'; geolocation 'none'sameoriginconnect-src 'none';object-src https://*.cloudfront.net;script-src https://*.cloudfront.netFebruary 21st 2025, 5:25:00GWGEmEXmIAMEitg=no-cache, no-store, must-revalidateCORRELATION_ID_NOT_PROVIDED_IN_REQUESTnosniffRoot=1-67b8b6e9-19e06dff581dbab616289b6c;Parent=6aae2335f189bddb;Sampled=0;Lineage=1:5fa73ef6:0