finishonlinehelp
POST v1/application/finishonlinehelp#
You can terminate online help conversation between your customer and your agent via this API. Under normal circumstances, this should not be done remotely. This API has been added in case the application on the agent side closes due to an error and the conversation with the customer cannot be closed. It should only be used in cases where there is such a problem.
API requests
- Must be authenticated with HMAC Authentication. For HMAC Authentication, see the Authentication document.
- API URI : https://DIYALOG-SERVER-API-ENDPOINT/v1/application/finishonlinehelp
- HTTP Request Type POST
- HTTP Content-Type application/json
Request Body#
| Schema |
|---|
| json object |
| customerId (String) Customer number of the peer that gets online help |
| staffId (String) Agent user id of the online support peer |
Example Json Request Body :#
Responses#
| HTTP 200 Response |
|---|
| json object The API returns a json object as a response. You can get detailed information about the API result from this answer. |
| isSuccess (boolean) this field returns information about whether the API was successful or not. True indicates that the API is running successfully and processing your request False indicates that an error occurred. |
| message (string) An information message is returned regarding the result of the operation. |
| errorCode (int) Optional. Error code of the result. It is not returned when isSuccess is true. Return Codes : 400 : No conversation found between peers. |
Example Response Body :#
| HTTP 500 Response |
|---|
| string When the API receives an exception, it will return a response with the HTTP 500 status code. The API's error message is returned as text. |
If the request fails HMAC validation, the following errors are returned as plain text. See Authentication.
| HTTP status | Message | Description |
|---|---|---|
| 400 | Required headers not found | One or more of the x-dlg-date, x-dlg-requester-userid or x-dlg-authorization headers are missing. |
| 400 | Authorization failed due to data format not valid | The x-dlg-authorization value after DLGA is not in the AccessKeyId:Signature form. |
| 400 | Date format is invalid. EEE, dd MMM yyyy HH:mm:ss Z is requied | The x-dlg-date value cannot be parsed in this format. The message text is returned as shown, including its spelling. |
| 401 | Authorization failed | The x-dlg-authorization header does not contain DLGA , the AccessKeyId is unknown, or the signature is not correct. |
| 401 | You have no permission on this operation. Contact your admin. | The signature is correct, but your access key has no application permission. |
| 403 | Request time may not be correct. | The x-dlg-date value differs from the server time by more than 15 minutes. |