All Classes Pages
EditCasePage Class Reference

More...

Detailed Description

Edit Case

Overview

This API allows user to modify an existing case. Only one case can be modified at a time.
A case can be related to a maximum of 75 other cases.

For this API to execute successfully:

  • A case with the ID specified in the request body must exist.
  • The status of the specified case must be 'open'.
  • At least one attribute of the case must be provided in the request body modification.
  • If the case is being assigned to a user other than the logged in user:
    • The target user must not be disabled.
    • The target user must have any User License.
  • No more than 75 cases must be provided to relate with the case.
Since
11.6

APIs

Method URL Description
PUT /ws/v12/interaction/case Modify an existing case

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

  • User must have 'Edit Case' action.
  • The case must either belong to the user's home department, or to a department in which the user is a foreign user.
  • If the case is being assigned to a user other than the logged in user:
    • The logged in user must have 'Transfer Activities' permission on the target user.
    • Case must either belong to the home department of the target user, or to a department in which the target user is a foreign user.
  • If the current case owner is different than the logged in user, logged in user must have "Pull Activities" permission on the case owner.
  • Each of the related cases must must satisfy at least one of the following:
    • The related case belongs to user's home department
    • The related case belongs to a department where the user is a foreign user
    • The department of the related case is shared with the department of the user, and as part of this sharing, activity sharing is enabled as well.

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
Content-Type Media type sent by the 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

Request Body

The request body is mandatory. Request body can be in either XML or JSON format.

Elements required in request body

Name Description
id ID of the Case.
lastModified.date Value of last Modified date of the case.

Optional elements allowed in request body

Name Description
dueDate If provided, must be a future date. Refer supported date format here. If value is not provided, the due date for the case is removed.
owner.user.id Must be an ID of a user in the application.
severity.value Must be one of 'urgent', 'high', 'medium', or 'low'.
subject Must not exceed 1024 characters.
description Must not exceed 1024 characters.
solution Must not exceed 1024 characters.
relatedCases Relationship with other cases. The case can be related with other cases. Existing relationship with other cases can be removed as well.
No more than 75 cases can be linked with a case.
customAttributes Name must match one of the custom attributes configured in application. If the custom attribute is configured as an enumeration, the value must be one of the predefined values.
For string type of custom attribute that is not configured as an enumeration, refer list of Allowed Characters For Custom Attributes.

NOTE: To remove value of any element of type "String", set the value to an empty string (instead of setting the value to null).

Request body XML schemas:

  • schema-interaction-Case

Supported API specific query parameters

   None

Supported common query parameters

   None

Response

Response headers

Name Description Possible values
X-egain-session ID of the current user session N/A
Content-Type Media type of response body application/xml or application/json

Response body

The response body will be sent only in case of error. It can be in either XML or JSON format.

Response body XML schemas:

  • schema-kb-WSError - used in case of error

HTTP status codes

Success Status codes

204 - No Content

  • Successfully modified the case.

Failure Status codes

400 - Bad Request

  • Any query parameter is sent in the request.
  • Request body does not contain the required elements.
  • Unsupported element is present in the request body.
  • Any criteria for successful execution mentioned in the Overview and Request Body sections are violated.
  • Request body is empty.

401 - Unauthorized

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

403 - Forbidden

  • If the user does not have the appropriate permissions for this operation. Refer the Permissions section.

406 - Not Acceptable

  • Invalid 'Accept-Language' header value.

409 - Conflict

  • The lastModified date of the case in the request does not match its lastModified date on the server.

500 - Internal server error

Examples:

Example 1 - Modify all allowed elements of a case
Example 2 - Modify case to remove attribute values