getmessagingdetail
POST v1/reporting/getmessagingdetail#
With this API, you can get a dynamic link for viewing the contents of an employee's conversations with a customer between two dates. The API creates a dynamic link for the given parameters and returns it in the response. Opening this link in a browser shows the conversations made through the Diyalog platform.
The API creates the link regardless of whether there is any messaging between the two people. If there is no messaging, the dynamic link shows empty content when opened.
API requests
- Must be authenticated with HMAC Authentication. For HMAC Authentication, see the Authentication document.
- API URI : https://DIYALOG-SERVER-API-ENDPOINT/v1/reporting/getmessagingdetail
- HTTP Request Type POST
- HTTP Content-Type application/json
Request Body#
| Schema |
|---|
| json object |
| staffId (string) Employee ID. |
| customerId (string) Customer number. |
| startDate (long) Unix epoch timestamps (miliseconds). The start date of the messaging. |
| endDate (long) Unix epoch timestamps (miliseconds). The end date of the messaging. |
Example Json Request Body :#
Responses#
| HTTP 200 Response |
|---|
| json object The API returns a json object as a response. The object contains the dynamic link for viewing the messaging content. |
| json object |
| isSuccess (boolean) Indicates whether the API call was successful. If true, it succeeded and the dynamic link is returned in conversationDetailLink. If false, the API failed; in this case conversationDetailLink is empty and the error message is returned in the error field. |
| conversationDetailLink (string) A dynamic link for viewing the messaging by connecting to the Diyalog platform. When this link is opened in a browser, it connects to the Diyalog application and the message contents can be viewed in the Diyalog application. If the API fails, this field is empty. Also, if there was no messaging between the two people between the given dates, the content is empty when the link is opened. |
| error (string) Optional. If the API fails, this field contains the error message. |
Example Response Body :#
On Success :
On Error :
| HTTP 500 Response |
|---|
| string When the API encounters an error, it returns 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 reporting permission. |
| 403 | Request time may not be correct. | The x-dlg-date value differs from the server time by more than 15 minutes. |