All Classes Pages
GetCustomerGrantPage Class Reference

More...

Detailed Description

Get customer grants

Overview

This API allows users to get the grants of a customer based on customer ID. The response will have all the grants.
Refer Customer grants for information about what is a grant.

Since
11.6

APIs

Method URL Description
GET /ws/v12/interaction/customer/{ID}/grant Retrieve grants for a customer based on customer ID.
{ID}: ID of the customer.

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 in the application, the customer specified through ID must belong to either the user's home department, or to a 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

   None

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

  • v12-schema-interaction-customer-Grants - used in case of success
  • schema-kb-WSError - used in case of error

Summary attributes always returned in server response

   Summary attributes

Additional attributes returned in server response if explicitly requested by client

   None

HTTP status codes

Success Status codes

200 - OK

  • The request was successfully executed, and the grants are returned in the reponse body

204 - No Content

  • The request was successfully executed, and no grants were found for the customer.

Failure Status codes

400 - Bad Request

  • Any query parameter is provided 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. Refer Permissions section for details.

404 - Not Found

  • The requested resource ID does not exist

406 - Not Acceptable

  • Invalid 'Accept-Language' header value

500 - Internal server error

Examples:

Example 1 - Get grants of a customer