All Classes Pages
GetCustomersByIdsPage Class Reference

More...

Detailed Description

Get Customers by IDs

Overview

This API allows user to retrieve one or more customers identified by customer IDs. To provide multiple IDs, a comma separated string must be used in request URI. A maximum of 75 IDs is allowed per request. Neither pagination nor range query parameters are supported by this API.

Since
11.6

APIs

Method URL Description
GET /ws/v12/interaction/customer/{IDs} Retrieve customers by their IDs.
{IDs}: a comma separated string of customer IDs.

Authentication

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.

Permissions

All of the following are required:

  • 'View Agent Console' action.
  • If "Customer departmentalization" setting is enabled, then each of the requested customers must belong to either the user's home department, or to the department where the user is a foreign user.

Licenses

The logged in user must have the following licenses:

Request

Request headers

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

Supported API specific query parameters

   None

Supported common query parameters

Refer to Supported Common Query Parameters in ECE REST API page for detailed description of each common parameter listed below.

Response

Response headers

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

Response body XML schemas

  • schema-interaction-Customers - used in case of success
  • schema-kb-WSError - used in case of error

Summary attributes always returned in server response

   Summary attributes of Customer Resource

Additional attributes returned in server response if explicitly requested by client

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.

HTTP status codes

Success Status codes

200 - OK

  • The request was successfully executed

Failure Status codes

400 - Bad Request

  • Unsupported query or common parameter in request URL
  • Invalid value of common parameter in request URL (e.g., unallowed value of $order, unsupported $attribute value etc.)
  • $order provided without $sort
  • More than 75 IDs are supplied in request URL

401 - Unauthorized

  • X-egain-session request header is missing
  • Session is invalid or expired

403 - Forbidden

  • The user does not have sufficient permissions to view one or more of the requested resources

404 - Not Found

  • One or more of the requested resource IDs does not exist

406 - Not Acceptable

  • Invalid 'Accept-Language' header value

500 - Internal server error

Examples:

Example 1 - Get summary attributes of a single customer
Example 2 - Get multiple customers sorted on customerName
Example 3 - Get all attributes for multiple customers sorted on custom attribute
Example 4 - Get additional attributes for a single customer