iscustomerinonlinehelp
POST v1/application/iscustomerinonlinehelp#
With this API, you can get information on whether a customer is currently in an active live chat session.
API requests
- Must be authenticated with HMAC Authentication. For HMAC Authentication, see the Authentication document.
- API URI : https://DIYALOG-SERVER-API-ENDPOINT/v1/application/iscustomerinonlinehelp
- HTTP Request Type POST
- HTTP Content-Type application/json
#
Request BodySchema |
---|
json object |
customerId (String) Customer number of the peer that gets online help state |
#
Örnek Json Request Body :#
ResponsesHTTP 200 Response |
---|
json object TThis API returns a response in JSON format. The fields and details of the returned response are as follows: |
isInHelp (boolean) This field indicates whether the customer has an active live chat session. true indicates that the customer is in active online help sessipn false indicates that customer is not in an active online help session. |
helpType (string) Specifies whether the customer is engaged in an outbound or inbound live chat session. "inbound" indicates that the customer is in inbound online helpsessipn "outbound" indicates that customer is not in an outbound online help session. |
staffId (string) This field contains the user id of the agent providing service to the customer. |
errorCode (int) Optional. Error code of the result. It s optional. If isInHelp return true, this field will not return. Return Codes : 400 : No customer found in the system. |
#
Örnek 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 API request receives an error during HMAC validation, the following error codes are returned.Http Status Code | Mesaj | Açıklama |
---|---|---|
400 | Required headers not found | One or more of the Date, X-Requester-UserId, or X-Authorization header fields are missing. |
400 | Authorization failed due to data format not valid | The 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. |
400 | Authorization failed due to date not valid | X-DLG-DATE date format is not "EEE, dd MMM yyyy HH:mm:ss Z". |
401 | Authorization failed | The request could not be verified. The signature value is not correct. |
403 | Request 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. |