This API allows users to search for customers based on various criteria. If no customers match the search criteria, the server will respond with 204 success code and an empty body. This API only supports exact match searches; partial matches are not supported. For example, if a client searches for customers with email address paul@, only customers with contact point value of exam ple.c ompaul@ will be returned. The customer with contact point value of exam ple.c omdean. will not be returned. paul @exam ple. com
Method | URL | Description |
---|---|---|
GET | /ws/v12/interaction/customer?phone={VAL} | Retrieve customers based on one phone number of the customer's contact point: {VAL} |
GET | /ws/v12/interaction/customer?email={VAL} | Retrieve customers based on one email address of the customer's contact point: {VAL} |
GET | /ws/v12/interaction/customer?custom.<name>={VAL} | Retrieve customers having custom attribute <name> with value: {VAL} |
GET | /ws/v12/interaction/customer?activity={"type":"email","isRead":"false","isSecure":"true","mode":"outbound","sentDate":"{RANGE}"} | Retrieve customers having activities with specific criteria. |
NOTE: You can mix and match one or more filter criteria listed above in any order. If more than one filter criteria are used, then response will only contain customers that satisfy all filter criteria.
Authentication is required. The client must be logged in to call this API. Each API request must contain X-egain-session request header returned by Login API.
All of the following are required:
The logged in user must have the following licenses:
Name | Description | Allowed values | Default value |
---|---|---|---|
X-egain-session | Session ID obtained from Login API response header | N/A | N/A |
Accept | Content type accepted by client | application/xml or application/json | N/A |
Accept-Language | Language locale accepted by client (used for locale specific fields in resource representation and in error responses) | Supported 'Accept-Language' header codes | default system language |
One or more query parameters listed below can be supplied per API call:
Refer to Supported Common Query Parameters in ECE REST API page for detailed description of each common parameter listed below.
Name | Description | Possible values |
---|---|---|
X-egain-session | Session ID of the current user session | N/A |
Content-Type | Media type of response body | application/xml or application/json |
Summary attributes of Customer Resource
Server can be prompted to return additional attributes of resource representation using $attribute
common query parameter.
See Values of $attribute common parameter supported by Customer Resource for the list of allowed attribute names.
200 - OK
204 - No Content
400 - Bad Request
401 - Unauthorized
403 - Forbidden
406 - Not Acceptable
500 - Internal server error
Example 1 - Search for customers by phone number with pagination parameters
Example 2 - Search for customers by email address
Example 3 - Search for customers by custom attribute with range parameters
Example 4 - Search for customers by phone number and custom attribute
Example 5 - Search for customers by unread secure emails sent in provided range