This API can be used to complete multiple activities assigned to the logged in user. These activities may or may not have a case and the activities may belong to different cases.
This API cannot be used to complete draft replies created for email activities.
For this API to execute successfully:
As part of completing this API request:
Method | URL | Description |
---|---|---|
PUT | /ws/v12/interaction/activity/complete | Complete one or more activities assigned to self. |
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 |
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 |
The request body is mandatory and can be in either XML or JSON format.
"activities" element must be present in the request body. At least one "activity" element must be present in the "activities" element. Each "activity" element must contain the following elements:
Name | Description |
---|---|
id | ID of the activity |
lastModified.date | Value of last modified date of the activity |
None
None
None
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 will have all the activities that were sent for completion. The response body can be in either XML or JSON format.
'activities' element will be present in the response body. At least one 'activity' element will be present in the 'activities' element. Each 'activity' element will contain the following elements:
Name | Description |
---|---|
id | ID of the activity completed. |
link | Self link of the activity completed. |
If the activity has a case, then 'case' element will be present in the response body. Each 'case' element will contain the following elements:
Name | Description |
---|---|
id | ID of the case. |
link | Link to the case. |
status.value | The status of the case. |
200 - Success
400 - Bad Request
401 - Unauthorized
403 - Forbidden
406 - Not Acceptable
409 - Conflict
500 - Internal server error
Example 1 - Complete activities of multiple cases
Example 2 - Complete single activity resulting in case getting closed
Example 3 - Complete single activity without a case