Skip to main content

finishonlinehelp

POST v1/application/finishonlinehelps#

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

Örnek Json Request Body :#

{
"customerId" : "123456",
"staffId" : "45186"
}

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 s optional. If isSucces return true, this field will not return.
      Return Codes :
          400 : No conversation found between peers.

Örnek Response Body :#

{
"isSuccess": true,
"message": "Conversation will be stop with peers."
}
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 API request receives an error during HMAC validation, the following error codes are returned.#

Http Status CodeMesajAçıklama
400Required headers not foundOne or more of the Date, X-Requester-UserId, or X-Authorization header fields are missing.
400Authorization failed due to data format not validThe information in the X-Authorization header field is not in the correct format. Check that the field starts with "DLGA" and includes : between the accesKeyId and signature values.
400Authorization failed due to date not validX-DLG-DATE date format is not "EEE, dd MMM yyyy HH:mm:ss Z".
401Authorization failedThe request could not be verified. The signature value is not correct.
403Request time may not be correct.There is a difference of more than +/- 15 minutes between the x-dlg-date in the request header and the server time.