Close Case
Overview
This API can be used to close a single case.
For this API to execute successfully:
- The Case ID must exist in the application.
- The status of the case must be 'open'.
- Any open activities for the case must be of type Email. The case cannot be closed if it has any open Calltrack or Chat activities
- If there are any open activities in the case, such activities
-
Must be either "in queue waiting to be assigned" or "assigned to a user" status.
-
Must not be awaiting supervision i.e., waiting for supervisor to accept or reject the activity.
- If an activity of the case is assigned to a different user, it must not be locked by the user.
As part of completing this API request:
- All open activities of the case will be completed before closing the case.
- The case will not be closed if there are any open Calltrack or Chat activities in the case.
- Since
- 11.6
APIs
Method | URL | Description |
PUT | /ws/v12/interaction/case/{id}/close | Close a 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 'Close Case' action.
- Case must either belong to the user's home department, or to a department in which the user is a foreign user.
- All the open activities of the case must either belong to the home department of the logged in user, or to a department in which the user is a foreign user.
- If activity is not assigned to the logged in user, the logged in user must have the permission to pick activities as required by Pick Activities API. Refer Pick activities permissions section for details.
Licenses
The logged in user must have the following licenses:
- Any User Licenses
- If activity is not assigned to the logged in user, the logged in user must have the licenses as required by Pick Activities API. Refer Licenses section for details.
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-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 |
Accept | Content type accepted by client. Used for error response. | application/xml or application/json | application/json |
Request Body
Request body is not allowed.
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 closed the case.
Failure Status codes
400 - Bad Request
- Any query parameter is sent in the request.
- Request body is sent.
- Any criteria for successful execution mentioned in the Overview section is violated (except when activity is locked, which will result in 403-Forbidden).
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.
- One or more activities of the case are locked by another user.
404 - Not Found
- If the case with the specified ID does not exist.
406 - Not Acceptable
- Invalid 'Accept-Language' header value.
500 - Internal server error
Examples:
Example 1 - Close a case